From 0a80db81959bfbfa8bb9a3ef930ebb7b8a465390 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 4 Jul 2024 01:04:38 +0100 Subject: [PATCH] return a msg if it's not your cancel request --- .../bat/features/drag/command/RequestSubCommand.java | 1 - .../bat/features/drag/listeners/request/RequestListener.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/bat/features/drag/command/RequestSubCommand.java b/src/main/java/cc/fascinated/bat/features/drag/command/RequestSubCommand.java index c19ecba..4c35631 100644 --- a/src/main/java/cc/fascinated/bat/features/drag/command/RequestSubCommand.java +++ b/src/main/java/cc/fascinated/bat/features/drag/command/RequestSubCommand.java @@ -101,7 +101,6 @@ public class RequestSubCommand extends BatSubCommand implements EventListener { } VoiceChannel targetChannel = targetVoiceState.getChannel().asVoiceChannel(); - // User is already in the target channel if (voiceState.getChannel().getId().equals(targetChannel.getId())) { event.replyEmbeds(EmbedUtils.errorEmbed() diff --git a/src/main/java/cc/fascinated/bat/features/drag/listeners/request/RequestListener.java b/src/main/java/cc/fascinated/bat/features/drag/listeners/request/RequestListener.java index 406df14..f447e7c 100644 --- a/src/main/java/cc/fascinated/bat/features/drag/listeners/request/RequestListener.java +++ b/src/main/java/cc/fascinated/bat/features/drag/listeners/request/RequestListener.java @@ -27,6 +27,9 @@ public class RequestListener implements EventListener { .filter(request -> request.getMember().getId().equals(event.getUser().getId())) .findFirst(); if (optionalDragRequest.isEmpty()) { + event.replyEmbeds(EmbedUtils.errorEmbed() + .setDescription("You do not have a request to cancel.") + .build()).queue(); return; } DragRequest dragRequest = optionalDragRequest.get();