mirror of
https://github.com/Syping/dtranslatebot.git
synced 2024-11-22 05:40:23 +01:00
fix if condition
This commit is contained in:
parent
d5c8574063
commit
8884fd2876
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ void bot::slashcommands::process_edit_command(dpp::cluster *bot, bot::settings::
|
|||
{
|
||||
try {
|
||||
dpp::permission user_permissions = event.command.get_resolved_permission(event.command.usr.id);
|
||||
if (user_permissions.has(dpp::p_manage_webhooks))
|
||||
if (!user_permissions.has(dpp::p_manage_webhooks))
|
||||
throw dpp::exception("Unauthorized to use command");
|
||||
|
||||
dpp::command_interaction interaction = event.command.get_command_interaction();
|
||||
|
@ -231,7 +231,7 @@ void bot::slashcommands::process_translate_command(dpp::cluster *bot, bot::setti
|
|||
{
|
||||
try {
|
||||
dpp::permission user_permissions = event.command.get_resolved_permission(event.command.usr.id);
|
||||
if (user_permissions.has(dpp::p_manage_webhooks))
|
||||
if (!user_permissions.has(dpp::p_manage_webhooks))
|
||||
throw dpp::exception("Unauthorized to use command");
|
||||
|
||||
std::variant<dpp::channel,dpp::webhook> v_target;
|
||||
|
|
Loading…
Reference in a new issue