向特定齿轮添加命令

时间:2019-10-19 20:46:19

标签: discord.py-rewrite

我想将命令添加到名称为features.py的特定齿轮Features中,但是我对如何使用cog属性一无所知。

bot.command(name='add-prefix',aliases=['add-bot-prefix','bot-prefix'],cog="HOW TO I ADD IT TO Features?")
async def add_prefix(msg,prefix):
   pass
   #my code here

我的齿轮在另一个文件中

class Features(commands.Cog):
   def __init__(self,client):
       self.bot=client

def setup(bot):
    bot.add_cog(Features(bot))

0 个答案:

没有答案
相关问题