mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
Massive dependencies bump
This commit is contained in:
parent
dd1867e222
commit
8632f0e99c
24 changed files with 744 additions and 841 deletions
|
@ -36,7 +36,7 @@ async fn clean(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
|
|||
let channel = msg.channel_id.to_channel(&ctx).await?;
|
||||
match &channel {
|
||||
Channel::Private(_) => {
|
||||
let self_id = ctx.http.get_current_application_info().await?.id;
|
||||
let self_id = ctx.http.get_current_user().await?.id;
|
||||
messages
|
||||
.into_iter()
|
||||
.filter(|v| v.author.id == self_id)
|
||||
|
|
|
@ -85,7 +85,7 @@ pub async fn soft_ban(ctx: &Context, msg: &Message, mut args: Args) -> CommandRe
|
|||
pub async fn soft_ban_init(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
|
||||
let role_id = args.single::<RoleId>()?;
|
||||
let data = ctx.data.read().await;
|
||||
let guild = msg.guild(&ctx).await.unwrap();
|
||||
let guild = msg.guild(&ctx).unwrap();
|
||||
// Check whether the role_id is the one we wanted
|
||||
if !guild.roles.contains_key(&role_id) {
|
||||
return Err(Error::msg(format!("{} is not a role in this server.", role_id)).into());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue