Adds GUILD_MESSAGE_REACTIONS GatewayIntents

main
Joey Pollack 2 years ago
parent 3df314d30c
commit 018855a9a7

@ -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

Loading…
Cancel
Save