feat: check if the leave command was invoked by the bot owner before leaving

This commit is contained in:
2026-04-08 23:30:26 -04:00
parent d2511f7a55
commit 7d3a309d2b
4 changed files with 76 additions and 31 deletions

View File

@@ -6,7 +6,10 @@ use songbird::Songbird;
use tokio_util::sync::CancellationToken;
use twilight_model::{
application::{command::Command, interaction::Interaction},
id::{Id, marker::{ApplicationMarker, UserMarker}},
id::{
Id,
marker::{ApplicationMarker, UserMarker},
},
};
use crate::VCs;
@@ -19,6 +22,7 @@ mod opt_out;
pub struct State {
pub cancellation_token: CancellationToken,
pub discord_application_id: Id<ApplicationMarker>,
pub discord_bot_owner_user_id: Id<UserMarker>,
pub discord_client: Arc<twilight_http::Client>,
pub discord_user_id: Id<UserMarker>,
pub songbird: Arc<Songbird>,