Greg dev #197

Merged
greg6775 merged 7 commits from greg-dev into master 2019-12-12 20:54:14 +01:00
2 changed files with 14 additions and 14 deletions
Showing only changes of commit b2f7347072 - Show all commits

View file

@ -28,27 +28,27 @@ public class JoinCommand implements Command {
.build()).queue();
} else {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING)
.setTitle("Already connected")
.setDescription("I am already connected to your voice channel.")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.connecting.already.title"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.connecting.already.description"))
.build()).queue();
}
} else {
event.getGuild().getAudioManager().openAudioConnection(vc);
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
.setTitle("Successfully connected")
.setDescription("I successfully connected to " + vc.getName() + ".")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.success.title"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.success.description", vc.getName()))
.build()).queue();
}
} else {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING)
.setTitle("Already trying to connect")
.setDescription("Hadder is already trying to connect. Please wait a moment.")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.connecting.trying.title"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.connecting.trying.description"))
.build()).queue();
}
} else {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING)
.setTitle("No Voice Channel")
.setDescription("You aren't in a Voice Channel.")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.channel.title"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.join.error.channel.description"))
.build()).queue();
}
}
@ -60,7 +60,7 @@ public class JoinCommand implements Command {
@Override
public String description() {
return "Joins your voice channel";
return MessageEditor.handle("en", "commands.music.join.help.description");
}
@Override

View file

@ -15,13 +15,13 @@ public class LeaveCommand implements Command {
if (event.getGuild().getSelfMember().getVoiceState().inVoiceChannel()) {
event.getGuild().getAudioManager().closeAudioConnection();
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.INFO)
.setTitle("Successfully disconnected")
.setDescription("I successfully disconnected from the Voice Channel")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.leave.success.title"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.leave.success.description"))
.build()).queue();
} else {
event.getTextChannel().sendMessage(new MessageEditor().setDefaultSettings(MessageEditor.MessageType.WARNING)
.setTitle("Not connected")
.setDescription("I'm currently in no Voice Channel on this Guild")
.setTitle(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.leave.error.tile"))
.setDescription(MessageEditor.handle(event.getRethink().getLanguage(event.getAuthor().getId()), "commands.music.leave.error.description"))
.build()).queue();
}
}
@ -33,7 +33,7 @@ public class LeaveCommand implements Command {
@Override
public String description() {
return "Leaves a voice channel";
return MessageEditor.handle("en", "commands.music.leave.help.description");
}
@Override