fix(CommandProcessor): missing guild check and if command exists before execution
This commit is contained in:
1 parent
4fa790259e
commit
ccf56298d8
4 files changed
+20
No files matched your search
@@ -66,6 +66,11 @@ public class MessageCommandContext extends CommandContext {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFromGuild() {
|
||||
return event.isFromGuild();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionHook getInteractionHook() {
|
||||
return null;
|
||||
|
||||
@@ -37,6 +37,11 @@ public class MusicChannelContext extends AbstractContext implements NoMessageCon
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFromGuild() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMessage() {
|
||||
|
||||
|
||||
@@ -33,6 +33,11 @@ public class SlashCommandContext extends CommandContext {
|
||||
return event.isAcknowledged();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFromGuild() {
|
||||
return event.isFromGuild();
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionHook getInteractionHook() {
|
||||
if (!event.isAcknowledged())
|
||||
|
||||
@@ -47,6 +47,11 @@ public class AsyncMessage extends AbstractContext {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFromGuild() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMessage() {
|
||||
if (hook != null) {
|
||||
|
||||
Reference in new issue
Block a user