def _command_check(self, ctx):
# if the channel is not private, delete the command immediately regardless of the response
if not isinstance(ctx.message.channel, discord.PrivateChannel):
self._bot.loop.create_task(self._bot.client.delete_message(ctx.message))
# if privileged, check the member role
if hasattr(ctx.command, 'privileged'):
if not self._bot.is_operator(ctx.message.author):
raise dec.CommandError('You don\'t have a permission to use the *{}* command'.format(ctx.command))
return True
#
# Listeners
#
评论列表
文章目录