def on_message(message):
default_prefix = get_default_prefix()
if not isinstance(message.channel, discord.TextChannel):
bot.command_prefix = [default_prefix]
else:
guild_prefix = db.hget(f'{config}:prefix', message.guild.id)
if guild_prefix:
bot.command_prefix = [guild_prefix, default_prefix]
else:
bot.command_prefix = [default_prefix]
await bot.process_commands(message)
评论列表
文章目录