i18n stuff
This commit is contained in:
parent
e031eb1532
commit
8de3748f1a
2 changed files with 11 additions and 11 deletions
|
|
@ -20,24 +20,22 @@ import com.bbn.hadder.commands.Command;
|
||||||
import com.bbn.hadder.commands.CommandEvent;
|
import com.bbn.hadder.commands.CommandEvent;
|
||||||
import com.bbn.hadder.core.Perm;
|
import com.bbn.hadder.core.Perm;
|
||||||
import com.bbn.hadder.core.Perms;
|
import com.bbn.hadder.core.Perms;
|
||||||
import net.dv8tion.jda.api.EmbedBuilder;
|
import com.bbn.hadder.utils.MessageEditor;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
|
@Perms(Perm.VOICE_MOVE_OTHERS)
|
||||||
public class MoveAllCommand implements Command {
|
public class MoveAllCommand implements Command {
|
||||||
|
|
||||||
@Perms(Perm.VOICE_MOVE_OTHERS)
|
|
||||||
@Override
|
@Override
|
||||||
public void executed(String[] args, CommandEvent e) {
|
public void executed(String[] args, CommandEvent e) {
|
||||||
if (args.length == 2) {
|
if (args.length == 2) {
|
||||||
int count = Objects.requireNonNull(e.getGuild().getVoiceChannelById(args[0])).getMembers().size();
|
int count = e.getGuild().getVoiceChannelById(args[0]).getMembers().size();
|
||||||
Objects.requireNonNull(e.getGuild().getVoiceChannelById(args[0])).getMembers().forEach(
|
e.getGuild().getVoiceChannelById(args[0]).getMembers().forEach(
|
||||||
member -> {
|
member -> e.getGuild().moveVoiceMember(member, e.getGuild().getVoiceChannelById(args[1])).queue()
|
||||||
e.getGuild().moveVoiceMember(member, e.getGuild().getVoiceChannelById(args[1])).queue();
|
|
||||||
}
|
|
||||||
);
|
);
|
||||||
e.getChannel().sendMessage(new EmbedBuilder().setTitle("Successfully Moved!").setDescription("I moved " +
|
e.getChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
|
||||||
count + " Members. Have fun!").build()).queue();
|
"commands.misc.moveall.success.title", "",
|
||||||
|
"commands.misc.moveall.success.description", String.valueOf(count))
|
||||||
|
.build()).queue();
|
||||||
} else e.getHelpCommand().sendHelp(this, e);
|
} else e.getHelpCommand().sendHelp(this, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ commands.misc.code.success.description = This message contains some information
|
||||||
commands.misc.code.error.title = Code not found
|
commands.misc.code.error.title = Code not found
|
||||||
commands.misc.code.error.description = I can't find the specified invite code.
|
commands.misc.code.error.description = I can't find the specified invite code.
|
||||||
commands.misc.code.help.description = Shows information about a invite code.
|
commands.misc.code.help.description = Shows information about a invite code.
|
||||||
|
commands.misc.moveall.success.title = Successfully moved
|
||||||
|
commands.misc.moveall.success.description = I successfully moved %extra% members. Have fun!
|
||||||
commands.misc.moveall.help.description = Moves all users in the source channel to the target channel.
|
commands.misc.moveall.help.description = Moves all users in the source channel to the target channel.
|
||||||
|
|
||||||
commands.moderation.ban.success.title = Successfully banned
|
commands.moderation.ban.success.title = Successfully banned
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue