seawolf2357 commited on
Commit
725cdfa
·
verified ·
1 Parent(s): 4110e6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -104,9 +104,9 @@ class MyClient(discord.Client):
104
  self.is_processing = False
105
 
106
  def is_message_in_specific_channel(self, message):
107
- return message.channel.id == SPECIFIC_CHANNEL_ID or (
108
  isinstance(message.channel, discord.Thread) and message.channel.parent_id == SPECIFIC_CHANNEL_ID
109
- )
110
 
111
  def is_math_question(self, content):
112
  return bool(re.search(r'\b(solve|equation|calculate|math)\b', content, re.IGNORECASE))
 
104
  self.is_processing = False
105
 
106
  def is_message_in_specific_channel(self, message):
107
+ return isinstance(message.channel, discord.TextChannel) and (message.channel.id == SPECIFIC_CHANNEL_ID or (
108
  isinstance(message.channel, discord.Thread) and message.channel.parent_id == SPECIFIC_CHANNEL_ID
109
+ ))
110
 
111
  def is_math_question(self, content):
112
  return bool(re.search(r'\b(solve|equation|calculate|math)\b', content, re.IGNORECASE))