Examples: support new Serenity Intents init

Fixes up the serenity examples to account for a bunch of API changes on `next`/v0.11.

Tested using `cargo make ready`.
This commit is contained in:
Kyle Simpson
2022-04-24 11:23:44 +01:00
parent e3476e7965
commit d3a40fe691
4 changed files with 22 additions and 8 deletions

View File

@@ -27,6 +27,7 @@ use serenity::{
},
},
model::{channel::Message, gateway::Ready},
prelude::GatewayIntents,
Result as SerenityResult,
};
@@ -56,7 +57,10 @@ async fn main() {
.prefix("~"))
.group(&GENERAL_GROUP);
let mut client = Client::builder(&token)
let intents = GatewayIntents::non_privileged()
| GatewayIntents::MESSAGE_CONTENT;
let mut client = Client::builder(&token, intents)
.event_handler(Handler)
.framework(framework)
.register_songbird()