Use when_mentioned_or
This commit is contained in:
parent
503cb105cd
commit
0c8dfa162b
|
@ -1,6 +1,8 @@
|
||||||
import yaml
|
import yaml
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
from discord.ext import commands
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
global_config = {}
|
global_config = {}
|
||||||
|
|
||||||
|
@ -113,4 +115,6 @@ 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 bot.cache.prefixes.get(message.guild.id) or default_prefix
|
return commands.when_mentioned_or(
|
||||||
|
bot.cache.prefixes.get(message.guild.id) or default_prefix
|
||||||
|
)(bot, message)
|
||||||
|
|
Loading…
Reference in a new issue