Update to Tokio 1 and Serenity 0.10 (#9)

This commit is contained in:
Natsu Kagami 2021-01-15 18:50:33 +00:00 committed by GitHub
parent 40f6c6e553
commit 901d55814d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 238 additions and 281 deletions

View file

@ -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();
}

View file

@ -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
}
}