Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
msaroufim committed Nov 12, 2024
1 parent 22cad7a commit 37385c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions discord-bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ async def on_message(message):
for attachment in message.attachments:
logger.info(f"Processing attachment: {attachment.filename}")
if attachment.filename == "train.py":
# Reply to the original message
initial_reply = await message.reply("Found train.py! Starting training process...")

# Create a new thread from the reply
thread = await initial_reply.create_thread(
# Create a thread directly from the original message
thread = await message.create_thread(
name=f"Training Job - {datetime.now().strftime('%Y-%m-%d %H:%M')}",
auto_archive_duration=1440 # Archive after 24 hours of inactivity
)

# Send initial message in the thread
await thread.send("Found train.py! Starting training process...")

try:
# Download the file content
logger.info("Downloading train.py content")
Expand Down

0 comments on commit 37385c6

Please sign in to comment.