Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,18 +84,15 @@ class MyClient(discord.Client):
|
|
| 84 |
await self.text_to_speech_and_send(channel, response_text)
|
| 85 |
finally:
|
| 86 |
self.is_processing = False
|
| 87 |
-
|
| 88 |
async def find_or_create_private_thread(self, message, thread_name):
|
| 89 |
-
#
|
| 90 |
-
|
| 91 |
-
# ์ด๋ฏธ ์กด์ฌํ๋ ์ฐ๋ ๋ ๊ฒ์
|
| 92 |
-
for thread in threads:
|
| 93 |
if thread.name == thread_name and not thread.archived:
|
| 94 |
return thread
|
| 95 |
# ์๋ก์ด ํ๋ผ์ด๋น ์ฐ๋ ๋ ์์ฑ
|
| 96 |
return await message.channel.create_thread(name=thread_name, message=message, auto_archive_duration=60, type=discord.ChannelType.private_thread)
|
| 97 |
-
|
| 98 |
-
|
| 99 |
def is_message_in_specific_channel(self, message):
|
| 100 |
return message.channel.id == SPECIFIC_CHANNEL_ID or (
|
| 101 |
isinstance(message.channel, discord.Thread) and message.channel.parent_id == SPECIFIC_CHANNEL_ID
|
|
|
|
| 84 |
await self.text_to_speech_and_send(channel, response_text)
|
| 85 |
finally:
|
| 86 |
self.is_processing = False
|
| 87 |
+
|
| 88 |
async def find_or_create_private_thread(self, message, thread_name):
|
| 89 |
+
# ์กด์ฌํ๋ ์ฐ๋ ๋ ๊ฒ์
|
| 90 |
+
for thread in message.channel.threads: # threads๋ ์ด์ ๋ฆฌ์คํธ๋ ๋ฐ๋ณต ๊ฐ๋ฅํ ๊ฐ์ฒด์ผ ๊ฒ์
๋๋ค.
|
|
|
|
|
|
|
| 91 |
if thread.name == thread_name and not thread.archived:
|
| 92 |
return thread
|
| 93 |
# ์๋ก์ด ํ๋ผ์ด๋น ์ฐ๋ ๋ ์์ฑ
|
| 94 |
return await message.channel.create_thread(name=thread_name, message=message, auto_archive_duration=60, type=discord.ChannelType.private_thread)
|
| 95 |
+
\
|
|
|
|
| 96 |
def is_message_in_specific_channel(self, message):
|
| 97 |
return message.channel.id == SPECIFIC_CHANNEL_ID or (
|
| 98 |
isinstance(message.channel, discord.Thread) and message.channel.parent_id == SPECIFIC_CHANNEL_ID
|