mirror of
https://gitlab.com/niansa/SomeBot.git
synced 2025-03-06 20:48:26 +01:00
Corrected "authorization" -> "permission"
This commit is contained in:
parent
d3f399aa20
commit
f261d4553d
2 changed files with 3 additions and 3 deletions
|
@ -114,7 +114,7 @@ public:
|
||||||
bot->add_chatcommand(Bot::ChatCommand({"captcha"}, "Configure a captcha channel", dpp::slashcommand().add_option(dpp::command_option(dpp::command_option_type::co_channel, "channel", "Channel in which the challenge is shown", true)).add_option(dpp::command_option(dpp::command_option_type::co_role, "role", "Role given after solving challenge", true))), [&](const dpp::slashcommand_t& event) {
|
bot->add_chatcommand(Bot::ChatCommand({"captcha"}, "Configure a captcha channel", dpp::slashcommand().add_option(dpp::command_option(dpp::command_option_type::co_channel, "channel", "Channel in which the challenge is shown", true)).add_option(dpp::command_option(dpp::command_option_type::co_role, "role", "Role given after solving challenge", true))), [&](const dpp::slashcommand_t& event) {
|
||||||
// Check that user has the correct permissions
|
// Check that user has the correct permissions
|
||||||
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_channels | dpp::permissions::p_manage_roles)) {
|
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_channels | dpp::permissions::p_manage_roles)) {
|
||||||
event.reply(dpp::message("You need channel and role management authorization to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
event.reply(dpp::message("You need channel and role management permissions to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Update database
|
// Update database
|
||||||
|
@ -129,7 +129,7 @@ public:
|
||||||
bot->add_chatcommand(Bot::ChatCommand({"no_captcha", "kein_captcha", "captcha_stop"}, "Deaktiviere das Captcha"), [&](const dpp::slashcommand_t& event) {
|
bot->add_chatcommand(Bot::ChatCommand({"no_captcha", "kein_captcha", "captcha_stop"}, "Deaktiviere das Captcha"), [&](const dpp::slashcommand_t& event) {
|
||||||
// Check that user has the correct permissions
|
// Check that user has the correct permissions
|
||||||
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_channels | dpp::permissions::p_manage_roles)) {
|
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_channels | dpp::permissions::p_manage_roles)) {
|
||||||
event.reply(dpp::message("You need channel and role management authorization to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
event.reply(dpp::message("You need channel and role management permissions to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Update database
|
// Update database
|
||||||
|
|
|
@ -31,7 +31,7 @@ public:
|
||||||
.add_option(dpp::command_option(dpp::command_option_type::co_string, "content", "Text", false))), [&](const dpp::slashcommand_t& event) {
|
.add_option(dpp::command_option(dpp::command_option_type::co_string, "content", "Text", false))), [&](const dpp::slashcommand_t& event) {
|
||||||
// Check that user has the correct permissions
|
// Check that user has the correct permissions
|
||||||
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_messages)) {
|
if (!event.command.get_guild().base_permissions(event.command.member).has(dpp::permissions::p_manage_messages)) {
|
||||||
event.reply(dpp::message("You need message management authorization to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
event.reply(dpp::message("You need message management permissions to use this command.").set_flags(dpp::message_flags::m_ephemeral));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get color
|
// Get color
|
||||||
|
|
Loading…
Add table
Reference in a new issue