package us.cyrien.minecordbot.commands.discordCommand;

import com.jagrosh.jdautilities.commandclient.CommandEvent;
import net.dv8tion.jda.core.exceptions.RateLimitedException;
import us.cyrien.minecordbot.Bot;
import us.cyrien.minecordbot.Minecordbot;
import us.cyrien.minecordbot.commands.MCBCommand;
import us.cyrien.minecordbot.localization.Locale;

public class SetNameCmd extends MCBCommand {

    public SetNameCmd(Minecordbot minecordbot) {
        super(minecordbot);
        this.name = "setname";
        this.aliases = new String[]{"setname", "sn"};
        this.arguments = "<username>";
        this.help = Locale.getCommandsMessage("setusername.description").finish();
        this.ownerCommand = true;
        this.category = Bot.OWNER;
        this.type = Type.EMBED;
    }

    @Override
    protected void doCommand(CommandEvent event) {
        try {
            event.getSelfUser().getManager().setName(event.getArgs()).complete(false);
            String replyMsg = Locale.getCommandsMessage("setusername.changed").finish();
            respond(event, embedMessage(event, replyMsg, ResponseLevel.LEVEL_1));
        } catch (RateLimitedException e) {
            respond(event, embedMessage(event, Locale.getCommandsMessage("setusername.limit").finish(), ResponseLevel.LEVEL_3));
        }
    }
}

@@ -113,69 +113,8 @@
 nt;%0A
-import net.dv8tion.jda.core.exceptions.RateLimitedException;%0A
 impo
@@ -793,26 +793,8 @@
 ) %7B%0A
-        try %7B%0A    
     
@@ -859,29 +859,17 @@
 ()).
-complete(false);%0A    
+queue();%0A
     
@@ -949,36 +949,32 @@
 nish();%0A        
-    
 respond(event, e
@@ -1031,190 +1031,8 @@
 ));%0A
-        %7D catch (RateLimitedException e) %7B%0A            respond(event, embedMessage(event, Locale.getCommandsMessage(%22setusername.limit%22).finish(), ResponseLevel.LEVEL_3));%0A        %7D%0A
     

Resolve Issue #102 Cont..