forked from Fascinated/Bat
return a msg if it's not your cancel request
This commit is contained in:
parent
7083bebef1
commit
0a80db8195
@ -101,7 +101,6 @@ public class RequestSubCommand extends BatSubCommand implements EventListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VoiceChannel targetChannel = targetVoiceState.getChannel().asVoiceChannel();
|
VoiceChannel targetChannel = targetVoiceState.getChannel().asVoiceChannel();
|
||||||
|
|
||||||
// User is already in the target channel
|
// User is already in the target channel
|
||||||
if (voiceState.getChannel().getId().equals(targetChannel.getId())) {
|
if (voiceState.getChannel().getId().equals(targetChannel.getId())) {
|
||||||
event.replyEmbeds(EmbedUtils.errorEmbed()
|
event.replyEmbeds(EmbedUtils.errorEmbed()
|
||||||
|
@ -27,6 +27,9 @@ public class RequestListener implements EventListener {
|
|||||||
.filter(request -> request.getMember().getId().equals(event.getUser().getId()))
|
.filter(request -> request.getMember().getId().equals(event.getUser().getId()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
if (optionalDragRequest.isEmpty()) {
|
if (optionalDragRequest.isEmpty()) {
|
||||||
|
event.replyEmbeds(EmbedUtils.errorEmbed()
|
||||||
|
.setDescription("You do not have a request to cancel.")
|
||||||
|
.build()).queue();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DragRequest dragRequest = optionalDragRequest.get();
|
DragRequest dragRequest = optionalDragRequest.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user