From eda6295a8dd6bafd152d0a99ee63443bf401ff29 Mon Sep 17 00:00:00 2001 From: Stephen <webmaster@scd31.com> Date: Sat, 8 Oct 2022 12:41:39 -0300 Subject: [PATCH] gateway intents fix --- src/main.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index f627ec1..158132c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,10 +19,15 @@ async fn main() { let config = config::get_conf(); let token = config.token; - let mut client = Client::builder(&token, GatewayIntents::default()) - .event_handler(Dispatcher::default()) - .await - .expect("Error creating client"); + let mut client = Client::builder( + &token, + GatewayIntents::GUILD_MESSAGES + .union(GatewayIntents::GUILD_MESSAGE_REACTIONS) + .union(GatewayIntents::MESSAGE_CONTENT), + ) + .event_handler(Dispatcher::default()) + .await + .expect("Error creating client"); if let Err(e) = client.start().await { eprintln!("Client error: {}", e); } -- GitLab