Fix: remove strict TextChannel check, broaden channel support
This commit is contained in:
@@ -70,12 +70,10 @@ class Assistant(commands.Cog):
|
|||||||
async def on_message(self, message: discord.Message):
|
async def on_message(self, message: discord.Message):
|
||||||
if message.author.bot:
|
if message.author.bot:
|
||||||
return
|
return
|
||||||
if not isinstance(message.channel, discord.TextChannel):
|
if not message.guild:
|
||||||
return
|
return
|
||||||
|
|
||||||
guild = message.guild
|
guild = message.guild
|
||||||
if guild is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
# Debug: react with 1️⃣ to confirm listener fires
|
# Debug: react with 1️⃣ to confirm listener fires
|
||||||
if self.bot.user in message.mentions:
|
if self.bot.user in message.mentions:
|
||||||
|
|||||||
Reference in New Issue
Block a user