Enable GUILD_MEMBERS intent

This commit is contained in:
Yash Karandikar 2022-07-23 21:37:10 -05:00
parent c9bb6843d1
commit 946e9f8b84

View file

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