Unpause feature
This commit is contained in:
parent
78dfaa6f7b
commit
3af62f2f25
2 changed files with 24 additions and 0 deletions
|
|
@ -43,6 +43,19 @@ public class PlayCommand implements Command {
|
|||
"commands.music.join.error.channel.description")
|
||||
.build()).queue();
|
||||
}
|
||||
} else if (event.getAudioManager().getPlayer(event.getGuild()).isPaused()) {
|
||||
if (event.getMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().getChannel().equals(event.getMember().getVoiceState().getChannel())) {
|
||||
event.getAudioManager().getPlayer(event.getGuild()).setPaused(false);
|
||||
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
|
||||
"commands.music.play.success.unpause.title",
|
||||
"commands.music.play.success.unpause.description")
|
||||
.build()).queue();
|
||||
} else {
|
||||
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
|
||||
"commands.music.play.error.connected.title",
|
||||
"commands.music.play.error.connected.description")
|
||||
.build()).queue();
|
||||
}
|
||||
} else event.getHelpCommand().sendHelp(this, event);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -199,6 +199,10 @@ commands.music.play.error.load.title = %extra% Load failed %extra%
|
|||
commands.music.play.error.load.description = Unfortunately I can not load the given song
|
||||
commands.music.play.error.match.title = %extra% No matches %extra%
|
||||
commands.music.play.error.match.description = I can not find a song named this on YouTube
|
||||
commands.music.play.success.unpause.title = Successfully continued
|
||||
commands.music.play.success.unpause.description = I successfully continued playing the song.
|
||||
commands.music.play.error.connected.title = No channel
|
||||
commands.music.play.error.connected.description = You have to be in the same voice channel as the bot to continue the song.
|
||||
commands.music.play.help.description = Plays the specified song.
|
||||
commands.music.stop.success.title = Successfully stopped
|
||||
commands.music.stop.success.description = I successfully stopped the song.
|
||||
|
|
@ -226,6 +230,13 @@ commands.music.volume.error.int.description = The volume have to be between 1 an
|
|||
commands.music.volume.error.connected.title = No channel
|
||||
commands.music.volume.error.connected.description = You have to be in the same voice channel as the bot to change the volume.
|
||||
commands.music.volume.help.description = Change the volume of the music.
|
||||
commands.music.pause.success.title = Successfully paused
|
||||
commands.music.pause.success.description = I successfully paused the played song.
|
||||
commands.music.pause.error.paused.title = Already paused
|
||||
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.nsfw.gif.error.title = GIF not showing? Click here
|
||||
commands.nsfw.img.error.title = Image not showing? Click here
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue