Verified Commit f0fc2128 authored by Mathias B.'s avatar Mathias B.
Browse files

Commencement de la gestion de l'assignation et désassignation des rôles

parent b2cb556f
......@@ -10,6 +10,7 @@ use serenity::async_trait;
use serenity::model::prelude::*;
use serenity::prelude::*;
use tracing::{debug, info};
use serenity::client::bridge::gateway::event::ShardStageUpdateEvent;
pub struct Handler;
......@@ -305,6 +306,11 @@ impl EventHandler for Handler {
reaction.emoji, reaction.guild_id
process_handler_result(crate::modules::ticketing::reaction_add(&ctx, &reaction).await);
process_handler_result(crate::modules::role_reaction::reaction_add(&ctx, &reaction).await);
async fn reaction_remove(&self, ctx: Context, removed_reaction: Reaction) {
process_handler_result(crate::modules::role_reaction::reaction_remove(&ctx, &reaction).await);
async fn ready(&self, _ctx: Context, ready: Ready) {
......@@ -12,3 +12,4 @@ pub mod synchrotron;
pub mod testing;
pub mod ticketing;
pub mod welcome;
pub mod role_reaction;
use serenity::client::Context;
use serenity::model::channel::Reaction;
pub async fn reaction_add(ctx: &Context, reaction: &Reaction) -> eyre::Result<()> {
// Récupérer le message correspondant au menu
// Récupérer la réaction en base afin de déterminer le rôle
// Assigner le rôle
pub async fn reaction_remove(ctx: &Context, reaction: &Reaction) {
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment