fix for dev error showing instead of other errors. show shard number on help pages. cache guilds on join

This commit is contained in:
2021-02-14 14:10:01 +00:00
parent e9e321ebb1
commit 93e372e53e
6 changed files with 65 additions and 33 deletions

View File

@@ -398,7 +398,16 @@ impl Framework for RegexFramework {
if command.check_permissions(&ctx, &guild, &member).await {
dbg!(command.name);
GuildData::from_guild(guild, &pool).await;
{
let guild_id = guild.id.as_u64().to_owned();
GuildData::from_guild(guild, &pool).await.expect(
&format!(
"Failed to create new guild object for {}",
guild_id
),
);
}
(command.func)(&ctx, &msg, args).await;
} else if command.required_perms == PermissionLevel::Restricted