Correct when_mentioned_or usage
This commit is contained in:
parent
99fe741438
commit
8756b39357
|
@ -115,6 +115,8 @@ db_opts = {
|
||||||
def command_prefix(bot, message):
|
def command_prefix(bot, message):
|
||||||
if not message.guild:
|
if not message.guild:
|
||||||
return default_prefix
|
return default_prefix
|
||||||
return commands.when_mentioned_or(
|
prefixes = bot.cache.prefixes.get(message.guild.id)
|
||||||
bot.cache.prefixes.get(message.guild.id) or default_prefix
|
if prefixes:
|
||||||
)(bot, message)
|
return commands.when_mentioned_or(prefixes)(bot, message)
|
||||||
|
else:
|
||||||
|
return commands.when_mentioned_or(*default_prefix)(bot, message)
|
||||||
|
|
Loading…
Reference in a new issue