def is_owner(ctx):
"""Check owner."""
if isinstance(ctx.message.channel, discord.PrivateChannel):
# Yes, I keep a "backdoor" in the bot
author = ctx.message.author
return author.name + "#" + author.discriminator == "Maël Pedretti#1416"
return ctx.message.channel.server.owner == ctx.message.author
评论列表
文章目录