嗨,这是我关于StackOverflow的第一个问题。 我想发出一个命令,在特定的服务器上禁用特定的命令,就像:-!禁用pingsi这将禁用服务器中的ping命令。我还想让机器人发送命令{Command}在{guild}中被禁用,所以让我给你发送一个初学者-
@bot.command
@has_permissions(administrator=True)
async def disable(ctx, command)
command = ...
就像这样,对不起,我要的是完整的代码,我希望你明白
为每台服务器创建字典可能是最简单的方法之一。使用此方法,您只需在每个命令之前添加3行代码,以检查它是否已启用。请注意,此示例不包括存储数据,也不包括需要添加到commandsEnabled dictionary的更多命令
相关问题 更多 >
编程相关推荐