We have multiple bots using slash commands so if this instance can't find a command it shouldn't respond to it

This commit is contained in:
Teriuihi 2023-01-04 02:28:49 +01:00
parent 9ed3146a73
commit f93ad8b4fb

View File

@ -63,13 +63,13 @@ public class CommandManager extends ListenerAdapter {
.filter(discordCommand -> discordCommand.getName().equalsIgnoreCase(commandName))
.findFirst();
if (first.isEmpty()) {
event.replyEmbeds(new EmbedBuilder()
.setTitle("Invalid command")
.setDescription("We couldn't find a command called [" + commandName + "], please report this issue to a Teri")
.setColor(Color.RED)
.build())
.setEphemeral(true)
.queue();
// event.replyEmbeds(new EmbedBuilder()
// .setTitle("Invalid command")
// .setDescription("We couldn't find a command called [" + commandName + "], please report this issue to a Teri")
// .setColor(Color.RED)
// .build())
// .setEphemeral(true)
// .queue();
return;
}
first.get().execute(event);