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:
@@ -21,8 +21,8 @@ use serenity::{
|
||||
macros::{command, group},
|
||||
},
|
||||
},
|
||||
model::{channel::Message, gateway::Ready, misc::Mentionable},
|
||||
prelude::Mutex,
|
||||
model::{channel::Message, gateway::Ready},
|
||||
prelude::{GatewayIntents, Mentionable, Mutex},
|
||||
Result as SerenityResult,
|
||||
};
|
||||
|
||||
@@ -94,7 +94,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()
|
||||
|
||||
Reference in New Issue
Block a user