1
0
Fork 0
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:
niansa 2023-12-07 01:36:56 +01:00
parent d3f399aa20
commit f261d4553d
2 changed files with 3 additions and 3 deletions

View file

@ -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) {
// 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)) {
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;
}
// 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) {
// 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)) {
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;
}
// Update database

View file

@ -31,7 +31,7 @@ public:
.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
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;
}
// Get color