+Added GuildRoleList command
Lists roles that are allowed by admins to be added by general users
This commit is contained in:
@@ -41,3 +41,4 @@ guildroleallowed=1
|
|||||||
fetch=1
|
fetch=1
|
||||||
guildrolenotallowed=1
|
guildrolenotallowed=1
|
||||||
catch=1
|
catch=1
|
||||||
|
guildrolelist=1
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ guildrolenotallowed=
|
|||||||
bet=
|
bet=
|
||||||
perish, thenperish=
|
perish, thenperish=
|
||||||
teey=
|
teey=
|
||||||
|
guildrolelist=
|
||||||
stats=
|
stats=
|
||||||
beans=
|
beans=
|
||||||
eightball, 8ball=
|
eightball, 8ball=
|
||||||
|
|||||||
@@ -13,6 +13,11 @@ CatchInfo=
|
|||||||
BeansShowDisplay=You have %s beans!
|
BeansShowDisplay=You have %s beans!
|
||||||
BeansShowInfo=Displays how many beans you have
|
BeansShowInfo=Displays how many beans you have
|
||||||
|
|
||||||
|
[CommandGuildRoleList]
|
||||||
|
GuildRoleListOutput=The allowed roles are %s!
|
||||||
|
GuildRoleListEmpty=There are no roles allowed!
|
||||||
|
GuildRoleListInfo=Outputs a list of the roles you are allowed to add to yourself!
|
||||||
|
|
||||||
[CommandHelp]
|
[CommandHelp]
|
||||||
HelpInfo=Lets you look up specific commands, or get a link to a list of all commands.
|
HelpInfo=Lets you look up specific commands, or get a link to a list of all commands.
|
||||||
HelpDisplay=You can get help with a specific command by typing `!help command`!\nGeneral Commands: `boop, roll, choose, help, info, vote, results, showpoll, wolfram, cplus, java, beans, role, bet, yeet`
|
HelpDisplay=You can get help with a specific command by typing `!help command`!\nGeneral Commands: `boop, roll, choose, help, info, vote, results, showpoll, wolfram, cplus, java, beans, role, bet, yeet`
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package commands;
|
||||||
|
|
||||||
|
import core.Command;
|
||||||
|
import core.LocStrings;
|
||||||
|
import dataStructures.*;
|
||||||
|
import network.NetworkColiru;
|
||||||
|
|
||||||
|
public class CommandGuildRoleList extends Command
|
||||||
|
{
|
||||||
|
NetworkColiru compiler = new NetworkColiru();
|
||||||
|
|
||||||
|
public CommandGuildRoleList(KittyRole level, KittyRating rating) { super(level, rating);}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||||
|
{
|
||||||
|
String roles = "";
|
||||||
|
if(guild.allowedRole.isEmpty())
|
||||||
|
{
|
||||||
|
res.Call(String.format(LocStrings.Stub("GuildRoleListEmpty")));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for(int i = 0; i < guild.allowedRole.size(); i++)
|
||||||
|
{
|
||||||
|
if(i > 0)
|
||||||
|
roles += " and ";
|
||||||
|
roles += guild.allowedRole.get(i);
|
||||||
|
}
|
||||||
|
res.Call(String.format(LocStrings.Stub("GuildRoleListOutput"), roles));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -376,6 +376,7 @@ public class ObjectBuilderFactory
|
|||||||
manager.Register(LocCommands.Stub("blur"), new CommandBlurry(KittyRole.General, KittyRating.Safe));
|
manager.Register(LocCommands.Stub("blur"), new CommandBlurry(KittyRole.General, KittyRating.Safe));
|
||||||
manager.Register(LocCommands.Stub("eightball, 8ball"), new CommandEightBall(KittyRole.General, KittyRating.Safe));
|
manager.Register(LocCommands.Stub("eightball, 8ball"), new CommandEightBall(KittyRole.General, KittyRating.Safe));
|
||||||
manager.Register(LocCommands.Stub("catch"), new CommandCatch(KittyRole.General, KittyRating.Safe));
|
manager.Register(LocCommands.Stub("catch"), new CommandCatch(KittyRole.General, KittyRating.Safe));
|
||||||
|
manager.Register(LocCommands.Stub("guildrolelist"), new CommandGuildRoleList(KittyRole.General, KittyRating.Safe));
|
||||||
|
|
||||||
return manager;
|
return manager;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user