We have multiple bots using slash commands so if this instance can't find a button/modal/selectmenu it shouldn't respond to it
This commit is contained in:
parent
f93ad8b4fb
commit
265ddd82c3
|
|
@ -36,13 +36,13 @@ public class ButtonManager extends ListenerAdapter {
|
|||
.filter(discordModal -> discordModal.getButtonId().equalsIgnoreCase(buttonId))
|
||||
.findFirst();
|
||||
if (first.isEmpty()) {
|
||||
event.replyEmbeds(new EmbedBuilder()
|
||||
.setTitle("Invalid command")
|
||||
.setDescription("Unable to process button with id: [" + buttonId + "], please report this issue to a Teri")
|
||||
.setColor(Color.RED)
|
||||
.build())
|
||||
.setEphemeral(true)
|
||||
.queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
// event.replyEmbeds(new EmbedBuilder()
|
||||
// .setTitle("Invalid command")
|
||||
// .setDescription("Unable to process button with id: [" + buttonId + "], please report this issue to a Teri")
|
||||
// .setColor(Color.RED)
|
||||
// .build())
|
||||
// .setEphemeral(true)
|
||||
// .queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
return;
|
||||
}
|
||||
first.get().execute(event);
|
||||
|
|
|
|||
|
|
@ -35,13 +35,13 @@ public class ModalManager extends ListenerAdapter {
|
|||
.filter(discordModal -> discordModal.getModalId().equalsIgnoreCase(modalId))
|
||||
.findFirst();
|
||||
if (first.isEmpty()) {
|
||||
event.replyEmbeds(new EmbedBuilder()
|
||||
.setTitle("Invalid command")
|
||||
.setDescription("Unable to process modal with id: [" + modalId + "], please report this issue to a Teri")
|
||||
.setColor(Color.RED)
|
||||
.build())
|
||||
.setEphemeral(true)
|
||||
.queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
// event.replyEmbeds(new EmbedBuilder()
|
||||
// .setTitle("Invalid command")
|
||||
// .setDescription("Unable to process modal with id: [" + modalId + "], please report this issue to a Teri")
|
||||
// .setColor(Color.RED)
|
||||
// .build())
|
||||
// .setEphemeral(true)
|
||||
// .queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
return;
|
||||
}
|
||||
first.get().execute(event);
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ public class SelectMenuManager extends ListenerAdapter {
|
|||
.filter(discordModal -> discordModal.getSelectMenuId().equalsIgnoreCase(selectMenuId))
|
||||
.findFirst();
|
||||
if (first.isEmpty()) {
|
||||
event.replyEmbeds(new EmbedBuilder()
|
||||
.setTitle("Invalid command")
|
||||
.setDescription("Unable to process select menu with id: [" + selectMenuId + "], please report this issue to a Teri")
|
||||
.setColor(Color.RED)
|
||||
.build())
|
||||
.setEphemeral(true)
|
||||
.queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
// event.replyEmbeds(new EmbedBuilder()
|
||||
// .setTitle("Invalid command")
|
||||
// .setDescription("Unable to process select menu with id: [" + selectMenuId + "], please report this issue to a Teri")
|
||||
// .setColor(Color.RED)
|
||||
// .build())
|
||||
// .setEphemeral(true)
|
||||
// .queue(RestAction.getDefaultSuccess(), Util::handleFailure);
|
||||
return;
|
||||
}
|
||||
first.get().execute(event);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user