mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
Update to Tokio 1 and Serenity 0.10 (#9)
This commit is contained in:
parent
40f6c6e553
commit
901d55814d
19 changed files with 238 additions and 281 deletions
|
@ -53,7 +53,7 @@ async fn clean(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
|
|||
};
|
||||
msg.react(&ctx, '🌋').await?;
|
||||
if let Channel::Guild(_) = &channel {
|
||||
tokio::time::delay_for(std::time::Duration::from_secs(2)).await;
|
||||
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
|
||||
msg.delete(&ctx).await.ok();
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ pub async fn watch_soft_bans(cache_http: Arc<CacheAndHttp>, data: AppData) {
|
|||
}
|
||||
}
|
||||
// Sleep the thread for a minute
|
||||
tokio::time::delay_for(std::time::Duration::from_secs(60)).await
|
||||
tokio::time::sleep(std::time::Duration::from_secs(60)).await
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue