Skip to content

Commit 42c6a5a

Browse files
committed
Add MESSAGE_CONTENT intent
1 parent 456244b commit 42c6a5a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/main.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,16 @@ async fn app() -> Result<(), Error> {
216216

217217
cmds.add("?help", Command::help());
218218

219-
let mut client = Client::builder(&config.discord_token, GatewayIntents::default())
220-
.event_handler(Events {
221-
http: Arc::new(HttpClient::new()),
222-
db: pool.clone(),
223-
cmds: Arc::new(cmds),
224-
})
225-
.await?;
219+
let mut client = Client::builder(
220+
&config.discord_token,
221+
GatewayIntents::default().union(GatewayIntents::MESSAGE_CONTENT),
222+
)
223+
.event_handler(Events {
224+
http: Arc::new(HttpClient::new()),
225+
db: pool.clone(),
226+
cmds: Arc::new(cmds),
227+
})
228+
.await?;
226229

227230
client.start().await?;
228231

0 commit comments

Comments
 (0)