forked from karx/dircord
Enable GUILD_MEMBERS intent
This commit is contained in:
parent
c9bb6843d1
commit
946e9f8b84
|
@ -6,6 +6,7 @@ mod irc_discord;
|
||||||
use std::{borrow::Cow, collections::HashMap, env, fs::File, io::Read, sync::Arc};
|
use std::{borrow::Cow, collections::HashMap, env, fs::File, io::Read, sync::Arc};
|
||||||
|
|
||||||
use serenity::{
|
use serenity::{
|
||||||
|
client::bridge::gateway::GatewayIntents,
|
||||||
http::Http,
|
http::Http,
|
||||||
model::{
|
model::{
|
||||||
guild::Member,
|
guild::Member,
|
||||||
|
@ -90,7 +91,10 @@ async fn main() -> anyhow::Result<()> {
|
||||||
|
|
||||||
let conf: DircordConfig = toml::from_str(&data)?;
|
let conf: DircordConfig = toml::from_str(&data)?;
|
||||||
|
|
||||||
|
let intents = GatewayIntents::non_privileged() | GatewayIntents::GUILD_MEMBERS;
|
||||||
|
|
||||||
let mut discord_client = DiscordClient::builder(&conf.token)
|
let mut discord_client = DiscordClient::builder(&conf.token)
|
||||||
|
.intents(intents)
|
||||||
.event_handler(Handler)
|
.event_handler(Handler)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue