+ Added poll results, poll show, poll vote, rating, role
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package commands;
|
||||
|
||||
import core.Command;
|
||||
import core.Localizer;
|
||||
import dataStructures.*;
|
||||
|
||||
public class CommandRole extends Command
|
||||
@@ -8,20 +9,20 @@ public class CommandRole extends Command
|
||||
public CommandRole (KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String HelpText() { return "Will show the current role you have, Admins can change others roles with input of 'role x @y' with x being blacklist, general, mod, or admin. Blacklist will not allow the user to interact with kitty anymore, general mod and admin will give the user access to those commands."; }
|
||||
public String HelpText() { return Localizer.Stub("Will show the current role you have, Admins can change others roles with input of 'role x @y' with x being blacklist, general, mod, or admin. Blacklist will not allow the user to interact with kitty anymore, general mod and admin will give the user access to those commands."); }
|
||||
|
||||
@Override
|
||||
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
if(input.args.isEmpty())
|
||||
{
|
||||
res.Call("Your role is " + user.GetRole().name() + "!");
|
||||
res.Call(Localizer.Stub("Your role is") + " " + user.GetRole().name() + "!");
|
||||
return;
|
||||
}
|
||||
|
||||
if(user.GetRole().getValue() < KittyRole.Admin.getValue())
|
||||
{
|
||||
res.Call("You aren't allowed to do that! You must have the KittyRole '" + KittyRole.Admin.toString() + "' or higher!");
|
||||
res.Call(String.format(Localizer.Stub("You aren't allowed to do that! You must have the KittyRole '%' or higher!"), KittyRole.Admin.toString()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +46,7 @@ public class CommandRole extends Command
|
||||
break;
|
||||
|
||||
default:
|
||||
res.Call("Please enter `general`, `mod`, or `admin`!");
|
||||
res.Call(Localizer.Stub("Please enter `general`, `mod`, or `admin`!"));
|
||||
return;
|
||||
}
|
||||
String users = "";
|
||||
@@ -55,6 +56,6 @@ public class CommandRole extends Command
|
||||
users += input.mentions[i].name + " ";
|
||||
}
|
||||
|
||||
res.Call("Changed " + users + " to role `" + newRole.name() + "`!");
|
||||
res.Call(String.format(Localizer.Stub("Changed %s to role `%s`!"), users, newRole.name()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user