Examples: Fix serenity-next cache accesses (#99)

Serenity's cache design has changed, this (finally) prevents the examples from failing to compile on CI.
This commit is contained in:
Kyle Simpson
2021-10-10 20:52:26 +01:00
parent 67ad7c9e49
commit f1ed41ea28
4 changed files with 26 additions and 26 deletions

View File

@@ -179,7 +179,7 @@ async fn join(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
},
};
let guild = msg.guild(&ctx.cache).await.unwrap();
let guild = msg.guild(&ctx.cache).unwrap();
let guild_id = guild.id;
let manager = songbird::get(ctx).await
@@ -227,7 +227,7 @@ async fn join(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
#[command]
#[only_in(guilds)]
async fn leave(ctx: &Context, msg: &Message) -> CommandResult {
let guild = msg.guild(&ctx.cache).await.unwrap();
let guild = msg.guild(&ctx.cache).unwrap();
let guild_id = guild.id;
let manager = songbird::get(ctx).await