mirror of
https://gitlab.com/pancakes1234/wdiscordbotserver.git
synced 2025-06-16 07:14:21 -06:00
Update message listener to allow bot responses while ignoring other bot messages
This commit is contained in:
parent
55fd1c22e8
commit
03a6648973
@ -916,7 +916,7 @@ class AICog(commands.Cog):
|
|||||||
# --- Listener ---
|
# --- Listener ---
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_message(self, message: discord.Message):
|
async def on_message(self, message: discord.Message):
|
||||||
if message.author == self.bot.user or message.author.bot: return
|
if message.author == self.bot.user: return # Allow bot responses
|
||||||
ctx = await self.bot.get_context(message);
|
ctx = await self.bot.get_context(message);
|
||||||
if ctx.valid: return # Let command processing handle valid commands
|
if ctx.valid: return # Let command processing handle valid commands
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user