more logging. only build commands once

This commit is contained in:
2021-09-17 10:59:42 +01:00
parent 9f7853c074
commit 8db0a05785
3 changed files with 18 additions and 12 deletions

View File

@ -44,18 +44,6 @@ impl EventHandler for Handler {
ctx.set_activity(Activity::watching("for /play")).await;
}
async fn cache_ready(&self, ctx: Context, _: Vec<GuildId>) {
let framework = ctx
.data
.read()
.await
.get::<RegexFramework>()
.cloned()
.expect("RegexFramework not found in context");
framework.build_slash(ctx).await;
}
async fn guild_create(&self, ctx: Context, guild: Guild, is_new: bool) {
if is_new {
if let Ok(token) = env::var("DISCORDBOTS_TOKEN") {