Generalized Localizer File

This commit is contained in:
Alex Stewart
2019-04-14 00:25:52 -07:00
parent fbd047849c
commit e0c761dfc0
36 changed files with 268 additions and 213 deletions
+5 -5
View File
@@ -9,20 +9,20 @@ public class CommandRole extends Command
public CommandRole (KittyRole level, KittyRating rating) { super(level, rating); }
@Override
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."); }
public String HelpText() { return Localizer.Stub("RoleInfo"); }
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
if(input.args.isEmpty())
{
res.Call(Localizer.Stub("Your role is") + " " + user.GetRole().name() + "!");
res.Call(Localizer.Stub("RoleStandardResponse") + " " + user.GetRole().name() + "!");
return;
}
if(user.GetRole().getValue() < KittyRole.Admin.getValue())
{
res.Call(String.format(Localizer.Stub("You aren't allowed to do that! You must have the KittyRole '%' or higher!"), KittyRole.Admin.toString()));
res.Call(String.format(Localizer.Stub("RoleError"), KittyRole.Admin.toString()));
return;
}
@@ -46,7 +46,7 @@ public class CommandRole extends Command
break;
default:
res.Call(Localizer.Stub("Please enter `general`, `mod`, or `admin`!"));
res.Call(Localizer.Stub("RoleNeededRole"));
return;
}
String users = "";
@@ -56,6 +56,6 @@ public class CommandRole extends Command
users += input.mentions[i].name + " ";
}
res.Call(String.format(Localizer.Stub("Changed %s to role `%s`!"), users, newRole.name()));
res.Call(String.format(Localizer.Stub("RoleChanged"), users, newRole.name()));
}
}