+ Added roll, RPEnd, RPG, RPStart, Shutdown

This commit is contained in:
Matthew Cech
2019-04-06 23:45:41 -07:00
parent 52afd92db1
commit 1bdbfbac17
6 changed files with 109 additions and 75 deletions
+86 -62
View File
@@ -1,25 +1,25 @@
[CommandEightBall]
It is certain. =
Ask again later. =
My sources say no. =
You may rely on it. =
Concentrate and ask again. =
Answers a yes or no question! Warning = Kitty can not actually tell the future, she claims no responsibility for any lion mauling, lack of lottery wins, or felony charges. =
Without a doubt. =
It is decidedly so. =
My reply is no. =
Signs point to yes. =
Reply hazy, try again. =
Answers a yes or no question! Warning: Kitty can not actually tell the future, she claims no responsibility for any lion mauling, lack of lottery wins, or felony charges. =
Yes. =
Yes - definitely. =
It is certain. =
Concentrate and ask again. =
It is decidedly so. =
As I see it, yes. =
Outlook good. =
Outlook not so good. =
Cannot predict now. =
Signs point to yes. =
Most likely. =
Reply hazy, try again. =
Very doubtful. =
Answers a yes or no question! Warning: Kitty can not actually tell the future, she claims no responsibility for any lion mauling, lack of lottery wins, or felony charges. =
Don't count on it. =
Yes. =
Yes - definitely. =
Better not tell you now. =
[CommandColiru]
@@ -32,100 +32,124 @@ Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you menti
Displays how many beans you have =
You have %s beans! =
[CommandPollResults]
%s people voted for %s `%s` with `%s%` !\n =
Will show current results of a poll and percentages of votes per choice =
%s people voted for %s `%s` with `%s%` !\n =
[CommandShutdown]
Forced immediate shutdown, threads abandoned without sync. =
Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown. =
Forced shutdown, database synced before abandoning threads. =
[CommandBetBeans]
Please bet with at least 50 beans! =
That's not a valid bet! =
You don't have enough beans! =
Please bet with at least 50 beans! =
You won %s beans! =
Sorry, you didn't win, try again! =
Allows you to bet your beans, set your amount after the command! Warning! House always wins!\nSets of 3 will get 5x, 4 will get 10x, and 5 will get 1000x =
You don't have enough beans! =
[CommandRole]
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. =
Changed %s to role `%s`! =
You aren't allowed to do that! You must have the KittyRole '%' or higher! =
Please enter `general`, `mod`, or `admin`! =
Your role is =
[CommandPollShow]
There is no poll running! =
And the choices are:\n =
Will show the current poll running =
The current poll is `%s`\n =
[CommandPing]
Pong! =
Will respond with Pong! =
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. =
Changed %s to role `%s`! =
[CommandChangeIndicator]
Changes the command indicator to any single character. By default, it's '!'. If more than one character is provided, the first one is used! =
Indicator changed to `%s` =
[CommandPollManage]
'start' will start a new poll with the query of the line you put after, 'choice' will add a choice to the poll, 'stop' will end the poll =
[CommandHelpBuilder]
commands =
Emit help for all commands as formatted HTML =
[CommandMap]
Invalid arguments provided! =
Using mapgen v0.1 =
Width =
Seed =
Height =
[CommandPollVote]
You successfully voted for =
You already voted =
That's not a vaild number! =
%s That's not a vaild vote! =
Vote in a poll with the choice number, won't work if no poll is running, you can't change your vote once you have cast it! Be careful! =
[CommandRating]
Kittybot content set to =
Warning: NSFW may slip through, images are only based on tags on their respective sites! =
Invalid content rating =
[CommandInfo]
I'm made by `Rin#8904` and `Reverie Wisp#3703`!\nYou can find more info about me along with a Patreon link to support us and GitHub link for filing bugs https = //www.rinsnowmew.com/bot/ =
I'm made by `Rin#8904` and `Reverie Wisp#3703`!\nYou can find more info about me along with a Patreon link to support us and GitHub link for filing bugs https://www.rinsnowmew.com/bot/ =
Provides author info and a link to Kitty's website =
[CommandJDoodle]
Will compile any java code you put in! Supports Java 1.8 =
[CommandMap]
Invalid arguments provided! =
Seed =
Using mapgen v0.1 =
Height =
Width =
You successfully voted for =
[CommandDoWork]
I finished with my work! = D =
I finished with my work! :D =
Occupies a core for a few seconds =
[CommandPollResults]
Will show current results of a poll and percentages of votes per choice =
%s people voted for %s `%s` with `%s%` !\n =
[CommandBoop]
%s booped %s! =
Woah! %s booped me! That's %s total! =
Kitty will react with a counter =
%s booped several others - %s! =
[CommandHelp]
You can get help with a specific command by typing `!help command`!\nYou can also look at <https = //www.rinsnowmew.com/bot/info/#commands>\nGeneral Commands: `boop, roll, choose, help, info, vote, results, showpoll, wolfram, cplus, java, beans, role, bet, yeet` =
You can get help with a specific command by typing `!help command`!\nYou can also look at <https://www.rinsnowmew.com/bot/info/#commands>\nGeneral Commands: `boop, roll, choose, help, info, vote, results, showpoll, wolfram, cplus, java, beans, role, bet, yeet` =
Lets you look up specific commands, or get a link to a list of all commands. =
[CommandInvite]
Provies a direct invite link for KittyBot =
[CommandPing]
Will respond with Pong! =
Pong! =
[CommandBoop]
Woah! %s booped me! That's %s total! =
%s booped several others - %s! =
%s booped %s! =
Kitty will react with a counter =
[CommandInfo]
I'm made by `Rin#8904` and `Reverie Wisp#3703`!\nYou can find more info about me along with a Patreon link to support us and GitHub link for filing bugs https://www.rinsnowmew.com/bot/ =
I'm made by `Rin#8904` and `Reverie Wisp#3703`!\nYou can find more info about me along with a Patreon link to support us and GitHub link for filing bugs https = //www.rinsnowmew.com/bot/ =
Provides author info and a link to Kitty's website =
[CommandBlurry]
Blurs your icon or the icon of a friend you mentioned =
[CommandHelpBuilder]
Emit help for all commands as formatted HTML =
commands =
[CommandRating]
Warning = NSFW may slip through, images are only based on tags on their respective sites! =
Kittybot content set to =
Warning: NSFW may slip through, images are only based on tags on their respective sites! =
Invalid content rating =
[CommandRPEnd]
Here's your file! =
You can't end this RP! =
Ends RP in channel =
[CommandPollShow]
Will show the current poll running =
The current poll is `%s`\n =
And the choices are = \n =
There is no poll running! =
And the choices are:\n =
[CommandGiveBeans]
That's not a valid number! =
Gave %s %s beans! =
Gives beans to the mentioned users! =
You didn't mention anyone! =
Gave %s %s beans! =
[CommandRPG]
Admin+ command only right now - experimental text RPG! Format is !rpg <rpg command> =
Invalid RPG Command! =
[CommandPollManage]
'start' will start a new poll with the query of the line you put after, 'choice' will add a choice to the poll, 'stop' will end the poll =
[CommandRPStart]
Starts an rp, add people to it by mentioning them! =
[CommandJDoodle]
Will compile any java code you put in! Supports Java 1.8 =
[CommandRoll]
Based on input of xdy where x is number of dice and y is faces kitty will roll that amount of dice, display the individual rolls and total =
Didn't work ;3; =
[CommandInvite]
Provies a direct invite link for KittyBot =
[CommandChoose]
With an input of x,y,z where x y and z are all choices, kitty will choose one =
+12 -5
View File
@@ -5,6 +5,7 @@ import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import core.Command;
import core.Localizer;
import core.RPManager;
import dataStructures.*;
@@ -13,24 +14,30 @@ public class CommandRPEnd extends Command
public CommandRPEnd (KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return "Ends RP in channel"; }
public String HelpText() { return Localizer.Stub("Ends RP in channel"); }
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
{
File sending = null;
try {
try
{
sending = RPManager.instance.endRP(channel, user);
} catch (FileNotFoundException | UnsupportedEncodingException e)
}
catch (FileNotFoundException | UnsupportedEncodingException e)
{
System.out.println("I don't know how you got here");
}
if(sending != null)
{
res.CallFile(sending, "txt");
res.Call("Here's your file!");
res.Call(Localizer.Stub("Here's your file!"));
}
else
res.Call("You can't end this RP!");
{
res.Call(Localizer.Stub("You can't end this RP!"));
}
}
}
+3 -2
View File
@@ -1,6 +1,7 @@
package commands;
import core.Command;
import core.Localizer;
import core.rpg.RPGFramework;
import dataStructures.KittyChannel;
import dataStructures.KittyGuild;
@@ -22,7 +23,7 @@ public class CommandRPG extends Command
}
@Override
public String HelpText() { return "Admin+ command only right now - experimental text RPG! Format is !rpg <rpg command>"; };
public String HelpText() { return Localizer.Stub("Admin+ command only right now - experimental text RPG! Format is !rpg <rpg command>"); };
@Override
@@ -42,7 +43,7 @@ public class CommandRPG extends Command
if(result == null)
{
res.Call("Invalid RPG Command!");
res.Call(Localizer.Stub("Invalid RPG Command!"));
return;
}
+2 -1
View File
@@ -3,6 +3,7 @@ package commands;
import java.util.ArrayList;
import core.Command;
import core.Localizer;
import core.RPManager;
import dataStructures.*;
@@ -11,7 +12,7 @@ public class CommandRPStart extends Command
public CommandRPStart (KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return "Starts an rp, add people to it by mentioning them!"; }
public String HelpText() { return Localizer.Stub("Starts an rp, add people to it by mentioning them!"); }
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
+2 -2
View File
@@ -16,7 +16,7 @@ public class CommandRoll extends Command
public CommandRoll(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return "Based on input of xdy where x is number of dice and y is faces kitty will roll that amount of dice, display the individual rolls and total"; }
public String HelpText() { return Localizer.Stub("Based on input of xdy where x is number of dice and y is faces kitty will roll that amount of dice, display the individual rolls and total"); }
@Override
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
@@ -27,7 +27,7 @@ public class CommandRoll extends Command
}
catch(Exception e)
{
res.Call("Didn't work ;3;");
res.Call(Localizer.Stub("Didn't work ;3;"));
}
}
+4 -3
View File
@@ -2,6 +2,7 @@ package commands;
import core.Command;
import core.DatabaseManager;
import core.Localizer;
import core.Stats;
import dataStructures.KittyChannel;
import dataStructures.KittyGuild;
@@ -17,7 +18,7 @@ public class CommandShutdown extends Command
public CommandShutdown(KittyRole level, KittyRating rating) { super(level, rating); }
@Override
public String HelpText() { return "Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown."; }
public String HelpText() { return Localizer.Stub("Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown."); }
// Called when the command is run!
@Override
@@ -41,12 +42,12 @@ public class CommandShutdown extends Command
if(isSafe)
{
DatabaseManager.instance.Upkeep(); // Force upkeep, this works so long as on main thread.
res.CallImmediate("Forced shutdown, database synced before abandoning threads.");
res.CallImmediate(Localizer.Stub("Forced shutdown, database synced before abandoning threads."));
System.exit(0);
}
else
{
res.CallImmediate("Forced immediate shutdown, threads abandoned without sync.");
res.CallImmediate(Localizer.Stub("Forced immediate shutdown, threads abandoned without sync."));
System.exit(0);
}
}