mirror of
https://github.com/aikar/commands.git
synced 2026-06-22 23:00:36 +00:00
Deny permissions if command is issued by a webhook (#156)
This commit is contained in:
committed by
Daniel Ennis
parent
65ff5a5500
commit
7742dc3238
@@ -22,6 +22,11 @@ public class JDACommandPermissionResolver implements CommandPermissionResolver {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return false on webhook messages, as they cannot have permissions defined.
|
||||
if (event.getIssuer().isWebhookMessage()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Integer permissionOffset = discordPermissionOffsets.get(permission);
|
||||
if (permissionOffset == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user