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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFromGuild() {
|
||||||
|
return event.isFromGuild();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InteractionHook getInteractionHook() {
|
public InteractionHook getInteractionHook() {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ public class MusicChannelContext extends AbstractContext implements NoMessageCon
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFromGuild() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteMessage() {
|
public void deleteMessage() {
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,11 @@ public class SlashCommandContext extends CommandContext {
|
|||||||
return event.isAcknowledged();
|
return event.isAcknowledged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFromGuild() {
|
||||||
|
return event.isFromGuild();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InteractionHook getInteractionHook() {
|
public InteractionHook getInteractionHook() {
|
||||||
if (!event.isAcknowledged())
|
if (!event.isAcknowledged())
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ public class AsyncMessage extends AbstractContext {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isFromGuild() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteMessage() {
|
public void deleteMessage() {
|
||||||
if (hook != null) {
|
if (hook != null) {
|
||||||
|
|||||||
Reference in new issue
Block a user