Skip to content

Commit

Permalink
Rename thread when tied to task
Browse files Browse the repository at this point in the history
  • Loading branch information
gabber235 committed Sep 6, 2024
1 parent cd8ac5e commit a80c494
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion discord_bot/src/discord/create_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
Context, WinstonError,
};
use poise::{
serenity_prelude::{CreateEmbed, CreateMessage},
serenity_prelude::{CreateEmbed, CreateMessage, EditThread},
CreateReply,
};

Expand Down Expand Up @@ -79,6 +79,10 @@ pub async fn create_task(
)
.await?;

channel
.edit_thread(ctx, EditThread::default().name(title))
.await?;

Ok(())
}

Expand Down
1 change: 1 addition & 0 deletions discord_bot/src/webhooks/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ async fn update_discord_channel(task_id: &str, moved: bool) -> Result<(), Winsto
.edit_thread(
&discord,
EditThread::default()
.name(task.name)
.applied_tags(new_tags)
.locked(lock)
.archived(lock),
Expand Down

0 comments on commit a80c494

Please sign in to comment.