leave_guild instead of leave
This commit is contained in:
parent
5e125052c5
commit
cb378dd042
|
@ -10,12 +10,12 @@ use serenity::{
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
#[group]
|
#[group]
|
||||||
#[commands(leave, send_message)]
|
#[commands(leave_guild, send_message)]
|
||||||
pub(crate) struct Owner;
|
pub(crate) struct Owner;
|
||||||
|
|
||||||
#[command]
|
#[command]
|
||||||
#[owners_only]
|
#[owners_only]
|
||||||
pub async fn leave(ctx: &Context, _msg: &Message, mut args: Args) -> CommandResult {
|
pub async fn leave_guild(ctx: &Context, _msg: &Message, mut args: Args) -> CommandResult {
|
||||||
let guild = GuildId::try_from(args.single::<u64>()?)?;
|
let guild = GuildId::try_from(args.single::<u64>()?)?;
|
||||||
guild.leave(&ctx.http).await?;
|
guild.leave(&ctx.http).await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue