def no_pm():
def predicate(ctx):
if ctx.command.name == "help":
return True
if ctx.guild is None:
raise commands.NoPrivateMessage('This command cannot be used in private messages.')
return True
return commands.check(predicate)
评论列表
文章目录