+Added mentioning capability to beanshowing
This commit is contained in:
@@ -19,6 +19,7 @@ CatchInfo=
|
|||||||
|
|
||||||
[CommandBeansShow]
|
[CommandBeansShow]
|
||||||
BeansShowDisplay=You have %s beans!
|
BeansShowDisplay=You have %s beans!
|
||||||
|
BeansShowMentioned=I looked it up and %sbeans!
|
||||||
BeansShowInfo=Displays how many beans you have
|
BeansShowInfo=Displays how many beans you have
|
||||||
|
|
||||||
[CommandGuildRoleList]
|
[CommandGuildRoleList]
|
||||||
|
|||||||
@@ -14,6 +14,16 @@ public class CommandBeansShow extends Command
|
|||||||
@Override
|
@Override
|
||||||
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||||
{
|
{
|
||||||
|
if(input.mentions == null)
|
||||||
res.Call(String.format(LocStrings.Stub("BeansShowDisplay"), user.GetBeans()));
|
res.Call(String.format(LocStrings.Stub("BeansShowDisplay"), user.GetBeans()));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
String mentionedBeans = "";
|
||||||
|
for(KittyUser mentioned:input.mentions)
|
||||||
|
{
|
||||||
|
mentionedBeans += mentioned.name + " has " + mentioned.GetBeans() + " ";
|
||||||
|
}
|
||||||
|
res.Call(String.format(LocStrings.Stub("BeansShowMentioned"), mentionedBeans));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user