Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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))
|