mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Modify CustomCommands to use on_message_without_command (#3811)
This commit is contained in:
parent
0c94ce6cc3
commit
d5c960096e
@ -498,7 +498,7 @@ class CustomCommands(commands.Cog):
|
|||||||
await ctx.send(box(p, lang="yaml"))
|
await ctx.send(box(p, lang="yaml"))
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_message(self, message):
|
async def on_message_without_command(self, message):
|
||||||
is_private = isinstance(message.channel, discord.abc.PrivateChannel)
|
is_private = isinstance(message.channel, discord.abc.PrivateChannel)
|
||||||
|
|
||||||
# user_allowed check, will be replaced with self.bot.user_allowed or
|
# user_allowed check, will be replaced with self.bot.user_allowed or
|
||||||
@ -510,7 +510,7 @@ class CustomCommands(commands.Cog):
|
|||||||
|
|
||||||
ctx = await self.bot.get_context(message)
|
ctx = await self.bot.get_context(message)
|
||||||
|
|
||||||
if ctx.prefix is None or ctx.valid:
|
if ctx.prefix is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user