diff --git a/src/main.rs b/src/main.rs index 492fde7..aa44a3e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,6 @@ use std::env; +use serenity::all::{ComponentInteractionData, ComponentInteractionDataKind, Interaction}; use serenity::async_trait; use serenity::model::channel::Message; use serenity::prelude::*; @@ -29,9 +30,16 @@ impl EventHandler for Handler { } } } - // async fn interaction_create(&self, ctx: Context, interaction: Interaction){ - - // } + async fn interaction_create(&self, ctx: Context, interaction: Interaction){ + if let Interaction::Component(comp) = interaction{ + println!("Received component interaction {comp:?}"); + if matches!(comp.data.kind, ComponentInteractionDataKind::Button){ + let compid = comp.data.custom_id; + println!("helloworld {compid:?}"); + + } + } + } } #[tokio::main]