mirror of
https://github.com/Noratrieb/killjoy-turret.git
synced 2026-01-15 23:25:02 +01:00
reaction listener
This commit is contained in:
parent
c41c3ff851
commit
51ecb30f61
2 changed files with 34 additions and 6 deletions
18
src/main.rs
18
src/main.rs
|
|
@ -1,22 +1,28 @@
|
|||
mod autorole;
|
||||
mod commands;
|
||||
mod general;
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::fs;
|
||||
|
||||
use crate::autorole::{AutoRoleData, AutoRoleDataKey, AUTOROLE_GROUP};
|
||||
use crate::commands::MY_HELP;
|
||||
use serenity::client::Context;
|
||||
use serenity::framework::StandardFramework;
|
||||
use serenity::http::Http;
|
||||
use serenity::model::id::UserId;
|
||||
use serenity::model::prelude::*;
|
||||
use serenity::{async_trait, model::gateway::Ready, prelude::*};
|
||||
|
||||
use crate::autorole::{AutoRoleData, AutoRoleDataKey, AUTOROLE_GROUP};
|
||||
use crate::commands::MY_HELP;
|
||||
|
||||
mod autorole;
|
||||
mod commands;
|
||||
mod general;
|
||||
|
||||
struct Handler;
|
||||
|
||||
#[async_trait]
|
||||
impl EventHandler for Handler {
|
||||
async fn reaction_add(&self, ctx: Context, add_reaction: Reaction) {
|
||||
autorole::handle_reaction(&ctx, &add_reaction)
|
||||
}
|
||||
|
||||
async fn ready(&self, _: Context, ready: Ready) {
|
||||
println!("{} is connected!", ready.user.name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue