removed some stuff from perm checks that is no longer needed

This commit is contained in:
jellywx 2021-06-27 17:15:50 +01:00
parent 540f120d7d
commit 2e153cffab

View File

@ -299,7 +299,7 @@ impl RegexFramework {
enum PermissionCheck {
None, // No permissions
Basic(bool, bool, bool, bool), // Send + Embed permissions (sufficient to reply)
Basic(bool, bool), // Send + Embed permissions (sufficient to reply)
All, // Above + Manage Webhooks (sufficient to operate)
}
@ -325,8 +325,6 @@ impl Framework for RegexFramework {
PermissionCheck::Basic(
guild_perms.manage_webhooks(),
channel_perms.embed_links(),
channel_perms.add_reactions(),
channel_perms.manage_messages(),
)
} else {
PermissionCheck::None
@ -442,12 +440,7 @@ impl Framework for RegexFramework {
}
}
PermissionCheck::Basic(
manage_webhooks,
embed_links,
add_reactions,
manage_messages,
) => {
PermissionCheck::Basic(manage_webhooks, embed_links) => {
let response = lm
.get(&language.await, "no_perms_general")
.replace(
@ -457,14 +450,6 @@ impl Framework for RegexFramework {
.replace(
"{embed_links}",
if embed_links { "" } else { "" },
)
.replace(
"{add_reactions}",
if add_reactions { "" } else { "" },
)
.replace(
"{manage_messages}",
if manage_messages { "" } else { "" },
);
let _ = msg.channel_id.say(&ctx, response).await;