mirror of
https://forge.gzod01.fr/werobot/discoWeRo-Bot.git
synced 2024-11-17 10:28:03 +00:00
helloo
This commit is contained in:
parent
9622c3d0bc
commit
86975d8a76
1 changed files with 11 additions and 3 deletions
14
src/main.rs
14
src/main.rs
|
@ -1,5 +1,6 @@
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
|
use serenity::all::{ComponentInteractionData, ComponentInteractionDataKind, Interaction};
|
||||||
use serenity::async_trait;
|
use serenity::async_trait;
|
||||||
use serenity::model::channel::Message;
|
use serenity::model::channel::Message;
|
||||||
use serenity::prelude::*;
|
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]
|
#[tokio::main]
|
||||||
|
|
Loading…
Reference in a new issue