Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -60,10 +60,13 @@ async def on_message(self, message):
|
|
60 |
self.is_processing = False
|
61 |
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
async def generate_response(message):
|
69 |
global conversation_history
|
|
|
60 |
self.is_processing = False
|
61 |
|
62 |
|
63 |
+
def is_message_in_specific_channel(self, message):
|
64 |
+
result = message.channel.id == SPECIFIC_CHANNEL_ID or (
|
65 |
+
isinstance(message.channel, discord.Thread) and message.channel.parent_id == SPECIFIC_CHANNEL_ID
|
66 |
+
)
|
67 |
+
logging.debug(f"Checking if message is in specific channel: {result}")
|
68 |
+
return result
|
69 |
+
|
70 |
|
71 |
async def generate_response(message):
|
72 |
global conversation_history
|