feat: graceful shutdown, try making join and leave work (but some bug fixes are still needed)

This commit is contained in:
2026-04-08 22:18:32 -04:00
parent 288a784870
commit d2511f7a55
6 changed files with 272 additions and 97 deletions

View File

@@ -3,9 +3,10 @@ use std::{fmt::Debug, sync::Arc};
use futures::future::BoxFuture;
use patricia_tree::StringPatriciaMap;
use songbird::Songbird;
use tokio_util::sync::CancellationToken;
use twilight_model::{
application::{command::Command, interaction::Interaction},
id::{Id, marker::ApplicationMarker},
id::{Id, marker::{ApplicationMarker, UserMarker}},
};
use crate::VCs;
@@ -16,8 +17,10 @@ mod opt_out;
#[derive(Debug, Clone)]
pub struct State {
pub discord_client: Arc<twilight_http::Client>,
pub cancellation_token: CancellationToken,
pub discord_application_id: Id<ApplicationMarker>,
pub discord_client: Arc<twilight_http::Client>,
pub discord_user_id: Id<UserMarker>,
pub songbird: Arc<Songbird>,
pub vcs: Arc<VCs>,
}