我希望使用bot.add_command通过我的机器人创建一个自定义命令系统,但是我不确定是否可以在另一个文件中编写python代码,我在测试时正在对其进行测试,但我问:这可能吗?那是我上面要求的正确方法吗?还是还有另一种方法
ive尝试了我粘贴为测试的代码以查看我是否可以做到这一点
async def create(self, ctx, *args):
print(args)
arglist = list(args)
argjoined = ""
done = " ".join(arglist)
await ctx.send(done)
if "user" in done.lower() and "mention" in done.lower():
done.replace("user", f"{ctx.author.mention}")
done.replace("mention", "{member.mention}")
await ctx.send(done)```
I expect it to store and create commands for a certain role to use and the possibility to delete it through commands, so probably a separate py file