我想将命令添加到名称为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))