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.core.Perm;
|
||||
import com.bbn.hadder.core.Perms;
|
||||
import net.dv8tion.jda.api.EmbedBuilder;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.bbn.hadder.utils.MessageEditor;
|
||||
|
||||
@Perms(Perm.VOICE_MOVE_OTHERS)
|
||||
public class MoveAllCommand implements Command {
|
||||
|
||||
@Perms(Perm.VOICE_MOVE_OTHERS)
|
||||
@Override
|
||||
public void executed(String[] args, CommandEvent e) {
|
||||
if (args.length == 2) {
|
||||
int count = Objects.requireNonNull(e.getGuild().getVoiceChannelById(args[0])).getMembers().size();
|
||||
Objects.requireNonNull(e.getGuild().getVoiceChannelById(args[0])).getMembers().forEach(
|
||||
member -> {
|
||||
e.getGuild().moveVoiceMember(member, e.getGuild().getVoiceChannelById(args[1])).queue();
|
||||
}
|
||||
int count = e.getGuild().getVoiceChannelById(args[0]).getMembers().size();
|
||||
e.getGuild().getVoiceChannelById(args[0]).getMembers().forEach(
|
||||
member -> e.getGuild().moveVoiceMember(member, e.getGuild().getVoiceChannelById(args[1])).queue()
|
||||
);
|
||||
e.getChannel().sendMessage(new EmbedBuilder().setTitle("Successfully Moved!").setDescription("I moved " +
|
||||
count + " Members. Have fun!").build()).queue();
|
||||
e.getChannel().sendMessage(e.getMessageEditor().getMessage(MessageEditor.MessageType.INFO,
|
||||
"commands.misc.moveall.success.title", "",
|
||||
"commands.misc.moveall.success.description", String.valueOf(count))
|
||||
.build()).queue();
|
||||
} 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.description = I can't find the specified 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.moderation.ban.success.title = Successfully banned
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue