From 018855a9a78cade28f52a0ca6a9fac5116adf248 Mon Sep 17 00:00:00 2001 From: Joey Pollack Date: Tue, 28 May 2024 13:23:20 -0400 Subject: [PATCH] Adds GUILD_MESSAGE_REACTIONS GatewayIntents --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6ba324b..81e2b70 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ use std::time::Duration; use serenity::async_trait; use serenity::prelude::*; use serenity::model::channel::{Message, Reaction}; -use serenity::model::gateway::Ready; +use serenity::model::gateway::{Gateway, Ready}; use serenity::model::id::GuildId; use serenity::http::Http; @@ -46,12 +46,14 @@ impl EventHandler for Handler async fn reaction_add(&self, ctx: Context, add_reaction: Reaction) { + println!("reaction_add event"); utils::Logger::log_message(ctx, &format!("reaction add event: {:#?}", add_reaction)).await; // todo!() } async fn reaction_remove(&self, ctx: Context, removed_reaction: Reaction) { + println!("reaction_remove event"); utils::Logger::log_message(ctx, &format!("reaction removed event: {:#?}", removed_reaction)).await; } @@ -138,6 +140,7 @@ async fn main() let intents = GatewayIntents::GUILD_MESSAGES | GatewayIntents::DIRECT_MESSAGES | GatewayIntents::GUILDS + | GatewayIntents::GUILD_MESSAGE_REACTIONS | GatewayIntents::MESSAGE_CONTENT; // Create a new instance of the Client, logging in as a bot. This will