Skip to content

Commit

Permalink
fix: Make users not able to invite others into modmail threads
Browse files Browse the repository at this point in the history
  • Loading branch information
melothemarten committed May 1, 2024
1 parent 849901a commit 6263afc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/modmail.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{anyhow, Error};
use poise::serenity_prelude as serenity;
use poise::serenity_prelude::Mentionable;
use poise::serenity_prelude::{EditThread, Mentionable};
use tracing::{debug, info};

use crate::types::{Context, Data};
Expand Down Expand Up @@ -172,7 +172,7 @@ async fn create_modmail_thread(

let modmail_name = format!("Modmail #{}", ctx.id() % 10000);

let modmail_thread = modmail_channel
let mut modmail_thread = modmail_channel
.create_thread(
ctx,
serenity::CreateThread::new(modmail_name).kind(serenity::ChannelType::PrivateThread),
Expand All @@ -181,7 +181,7 @@ async fn create_modmail_thread(

// disallow users from inviting others to modmail threads
modmail_thread
.edit_thread(ctx, |edit_thread| edit_thread.invitable(false))
.edit_thread(ctx, EditThread::new().invitable(false))
.await?;

let thread_message_content = format!(
Expand Down

0 comments on commit 6263afc

Please sign in to comment.