Cleanup in play, play not working now
This commit is contained in:
@@ -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