Cleanup in play, play not working now
This commit is contained in:
@@ -26,3 +26,4 @@ tokio = { version = "1.42.0", features = ["macros", "rt-multi-thread", "signal"]
|
||||
regex = "1.11.0"
|
||||
axum = "0.7.7"
|
||||
lazy_static = "1.5.0"
|
||||
futures = "0.3.31"
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::sync::Arc;
|
||||
|
||||
use serenity::all::{CommandInteraction, CommandOptionType, CreateCommand, CreateCommandOption};
|
||||
use serenity::model::prelude::GuildId;
|
||||
use serenity::{prelude::*, async_trait};
|
||||
use serenity::{prelude::*, async_trait, futures};
|
||||
use songbird::input::{Input, YoutubeDl};
|
||||
use songbird::tracks::TrackHandle;
|
||||
use songbird::{Event, EventHandler, Songbird, TrackEvent};
|
||||
@@ -10,7 +10,7 @@ use songbird::{Event, EventHandler, Songbird, TrackEvent};
|
||||
use crate::data::guilds::GuildCache;
|
||||
use crate::bot::ytdlp::{YtDlp, YtDlpItem};
|
||||
use crate::error::{SirenResult, Error as SirenError};
|
||||
use crate::HttpKey;
|
||||
use crate::{signal_shutdown, HttpKey};
|
||||
|
||||
use super::{get_songbird, is_valid_url, join_voice_channel};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use serenity::all::{CreateInteractionResponse, Interaction};
|
||||
use serenity::all::{CreateInteractionResponse, Interaction, ResumedEvent};
|
||||
use serenity::async_trait;
|
||||
use serenity::model::gateway::Ready;
|
||||
use serenity::model::channel::Message;
|
||||
@@ -85,11 +85,15 @@ impl EventHandler for Handler {
|
||||
}
|
||||
}
|
||||
|
||||
async fn resume(&self, _: Context, _: ResumedEvent) {
|
||||
log::debug!("Resumed");
|
||||
}
|
||||
|
||||
async fn interaction_create(&self, ctx: Context, interaction: Interaction) {
|
||||
if let Interaction::Ping(ping) = interaction {
|
||||
log::debug!("Received interaction ping: {:?}", ping);
|
||||
log::trace!("Received interaction ping: {:?}", ping);
|
||||
} else if let Interaction::Command(command) = interaction {
|
||||
log::debug!("Received command interaction: {command:#?}");
|
||||
log::trace!("Received command interaction: {command:#?}");
|
||||
match command.data.name.as_str() {
|
||||
// Match commands without returns
|
||||
"play" => commands::audio::play::run(&ctx, &command).await,
|
||||
@@ -105,7 +109,7 @@ impl EventHandler for Handler {
|
||||
_ => {}
|
||||
}
|
||||
} else if let Interaction::Modal(modal) = interaction {
|
||||
log::debug!("Received interaction modal: {:?}", modal);
|
||||
log::trace!("Received interaction modal: {:?}", modal);
|
||||
create_modal_response(&ctx, &modal).await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user