我想在重写中列出我的Discord bot中的所有命令。我使用python3.6编写这个
我试图通过
print(bot.commands)
这只为我提供了以下回报:
{<discord.ext.commands.core.Command object at 0x00000209EE6AD4E0>, <discord.ext.commands.core.Command object at 0x00000209EE6AD470>}
我希望通常的输出是clear()
,因为这是迄今为止我在bot中编程的唯一命令,该命令按预期工作。但它只打印了上面的内容
这些是bot拥有的
Command
对象。之所以有两个,是因为您的bot有一个内置的help
命令,它完全符合您的需要。如果您的clear
命令是然后运行
^{pr2}$!help
将得到输出我想你在找这样的东西。在
相关问题 更多 >
编程相关推荐