removed some stuff from perm checks that is no longer needed
This commit is contained in:
parent
540f120d7d
commit
2e153cffab
@ -299,7 +299,7 @@ impl RegexFramework {
|
|||||||
|
|
||||||
enum PermissionCheck {
|
enum PermissionCheck {
|
||||||
None, // No permissions
|
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)
|
All, // Above + Manage Webhooks (sufficient to operate)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -325,8 +325,6 @@ impl Framework for RegexFramework {
|
|||||||
PermissionCheck::Basic(
|
PermissionCheck::Basic(
|
||||||
guild_perms.manage_webhooks(),
|
guild_perms.manage_webhooks(),
|
||||||
channel_perms.embed_links(),
|
channel_perms.embed_links(),
|
||||||
channel_perms.add_reactions(),
|
|
||||||
channel_perms.manage_messages(),
|
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
PermissionCheck::None
|
PermissionCheck::None
|
||||||
@ -442,12 +440,7 @@ impl Framework for RegexFramework {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PermissionCheck::Basic(
|
PermissionCheck::Basic(manage_webhooks, embed_links) => {
|
||||||
manage_webhooks,
|
|
||||||
embed_links,
|
|
||||||
add_reactions,
|
|
||||||
manage_messages,
|
|
||||||
) => {
|
|
||||||
let response = lm
|
let response = lm
|
||||||
.get(&language.await, "no_perms_general")
|
.get(&language.await, "no_perms_general")
|
||||||
.replace(
|
.replace(
|
||||||
@ -457,14 +450,6 @@ impl Framework for RegexFramework {
|
|||||||
.replace(
|
.replace(
|
||||||
"{embed_links}",
|
"{embed_links}",
|
||||||
if embed_links { "✅" } else { "❌" },
|
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;
|
let _ = msg.channel_id.say(&ctx, response).await;
|
||||||
|
Loading…
Reference in New Issue
Block a user