Error messages
This commit is contained in:
parent
da08e3504c
commit
c687cef65d
2 changed files with 17 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package com.bbn.hadder.commands.music;
|
|||
|
||||
import com.bbn.hadder.commands.Command;
|
||||
import com.bbn.hadder.commands.CommandEvent;
|
||||
import com.bbn.hadder.utils.MessageEditor;
|
||||
|
||||
/**
|
||||
* @author Skidder / GregTCLTK
|
||||
|
|
@ -11,7 +12,20 @@ public class LoopCommand implements Command {
|
|||
|
||||
@Override
|
||||
public void executed(String[] args, CommandEvent event) {
|
||||
|
||||
if (event.getAudioManager().hasPlayer(event.getGuild()) && event.getAudioManager().getPlayer(event.getGuild()).getPlayingTrack() != null) {
|
||||
if (event.getMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().getChannel().equals(event.getMember().getVoiceState().getChannel())) {
|
||||
|
||||
} else {
|
||||
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
|
||||
"commands.music.loop.error.connected.title",
|
||||
"commands.music.loop.error.connected.description")
|
||||
.build()).queue();
|
||||
}
|
||||
} else {
|
||||
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
|
||||
"commands.music.info.error.title",
|
||||
"commands.music.info.error.description").build()).queue();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -237,6 +237,8 @@ commands.music.pause.error.paused.description = The song is already paused.
|
|||
commands.music.pause.error.connected.title = No channel
|
||||
commands.music.pause.error.connected.description = You have to be in the same voice channel as the bot to pause the song.
|
||||
commands.music.pause.help.description = Pause the playing song.
|
||||
commands.music.loop.error.connected.title = No channel
|
||||
commands.music.loop.error.connected.description = You have to be in the same voice channel as the bot to set the repeat status.
|
||||
commands.music.loop.help.description = Repeats a song/queue.
|
||||
|
||||
commands.nsfw.gif.error.title = GIF not showing? Click here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue