add loop command
All checks were successful
tests / fmt (push) Successful in 57s
tests / clippy (push) Successful in 1m16s
tests / pre-commit (push) Successful in 1m14s
tests / build (push) Successful in 1m30s
tests / test (push) Successful in 1m36s

This commit is contained in:
2024-06-17 14:56:39 +02:00
parent 55fe212424
commit 54c36688b7
10 changed files with 223 additions and 18 deletions

View File

@@ -1,15 +1,25 @@
use songbird::Songbird;
use dashmap::DashMap;
use songbird::{input::YoutubeDl, Songbird};
use std::sync::Arc;
use twilight_cache_inmemory::InMemoryCache;
use twilight_http::Client as HttpClient;
use twilight_model::id::{marker::GuildMarker, Id};
use twilight_standby::Standby;
use uuid::Uuid;
pub(crate) type State = Arc<StateRef>;
#[derive(Debug)]
pub(crate) struct Settings {
pub(crate) loop_queue: bool,
}
#[derive(Debug)]
pub(crate) struct StateRef {
pub(crate) http: HttpClient,
pub(crate) cache: InMemoryCache,
pub(crate) songbird: Songbird,
pub(crate) standby: Standby,
pub(crate) guild_settings: DashMap<Id<GuildMarker>, Settings>,
pub(crate) tracks: DashMap<Id<GuildMarker>, DashMap<Uuid, YoutubeDl>>,
}