From 946e9f8b8407eafb0070db8d7c757ab22f4dbc31 Mon Sep 17 00:00:00 2001 From: Yash Karandikar Date: Sat, 23 Jul 2022 21:37:10 -0500 Subject: [PATCH] Enable GUILD_MEMBERS intent --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 9f8fdd0..a271f6d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,7 @@ mod irc_discord; use std::{borrow::Cow, collections::HashMap, env, fs::File, io::Read, sync::Arc}; use serenity::{ + client::bridge::gateway::GatewayIntents, http::Http, model::{ guild::Member, @@ -90,7 +91,10 @@ async fn main() -> anyhow::Result<()> { let conf: DircordConfig = toml::from_str(&data)?; + let intents = GatewayIntents::non_privileged() | GatewayIntents::GUILD_MEMBERS; + let mut discord_client = DiscordClient::builder(&conf.token) + .intents(intents) .event_handler(Handler) .await?;