diff --git a/assets/commands.config b/assets/commands.config index e2280cb..3dbb66c 100644 --- a/assets/commands.config +++ b/assets/commands.config @@ -1,4 +1,6 @@ [CommandEnabler] +addguildrole=1 +allowedguildrole=1 beans=1 benchmark, bench=1 bet=1 @@ -17,6 +19,9 @@ color, colour=1 crouton=1 dbflush=1 dbstats=1 +defaultdance=1 +derp=1 +e621=1 eightball, 8ball=1 fetch=1 givebeans=1 diff --git a/assets/locCommands.config b/assets/locCommands.config index e7de63a..7a65a29 100644 --- a/assets/locCommands.config +++ b/assets/locCommands.config @@ -90,7 +90,7 @@ buildHelp= dbflush= shutdown= boop= -tony, stark, dontfeelgood, dontfeelsogood= +tony, stark, dontfeelgood, dontfeelsogood=tony, stark, dontfeelgood, dontfeelsogood, snap role= raffleend= ping= @@ -99,7 +99,8 @@ roll= blur= choose= rpstart= -guildrolenotallowed= +guildrolenotallowed=guildrolenotallowed, rolelistremove +derp= perish, thenperish= teey= searchcharacter= @@ -110,8 +111,10 @@ eightball, 8ball= vote= map= info, about= +e621= showpoll= rpg= +defaultdance= tweet= charactercreate= help= diff --git a/assets/locStrings.config b/assets/locStrings.config index d402f1e..15f21c5 100644 --- a/assets/locStrings.config +++ b/assets/locStrings.config @@ -1,307 +1,460 @@ [CommandBenchmark] -BenchmarkInfo=Allows you to lookup PC component benchmarks from UserBenchmark! You can use `bench find ` to see what's in the database, `bench info ` to look at a specific component, or the experimental `bench compare` commands! -BenchmarkInvalid=The benchmark operation you were trying to perform was invalid! + BenchmarkInvalid=The benchmark operation you were trying to perform was invalid! +BenchmarkInfo=Allows you to lookup PC component benchmarks from UserBenchmark! You can use `bench find +BenchmarkInvalid= [CommandPollManage] -PollManageInfo='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 +PollManageInfo= + PollManageInfo='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 + +[CommandBetHistory] + BetHistoryOutput=I have %s treats from betting! +BetHistoryOutput= + BetHistoryInfo=Gives how many beans I've ~~stolen~~ won from your bets! +BetHistoryInfo= [CommandGuildRoleNotAllowed] GuildRoleNotAllowedFailure= GuildRoleNotAllowedSuccess= + GuildRoleNotAllowedInfo=Removes a role from the list that users are allowed to add to themselves. GuildRoleNotAllowedInfo= - -[CommandBetHistory] -BetHistoryOutput=Kitty has %s beans! -BetHistoryInfo=Sees the amount of beans Kitty has earned through your bets! + GuildRoleNotAllowedFailure=Unable to remove %s from the list! + GuildRoleNotAllowedSuccess=Removed %s from the allowed roles! [CommandCatch] -CatchInfo=Play catch with yourself or with a friend with @! +CatchInfo= + CatchInfo=Play catch with yourself or with a friend with @! [CommandLeaderboard] -LeaderboardInfo=Shows you the 10 users with the most beans on the server -LeaderboardTitle=Server Leaderboard + LeaderboardTitle=Server Leaderboard + LeaderboardInfo=Shows you the 10 users with the most beans on the server +LeaderboardInfo= +LeaderboardTitle= [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! +GuildRoleListOutput= +GuildRoleListEmpty= + GuildRoleListOutput=You can add these roles! %s [CommandRoll] -RollError=Didn't work ;3; -RollInfo=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 + RollInfo=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 +RollError= + RollError=Didn't work ;3; +RollInfo= [CommandGuildRoleAllowed] GuildRoleAllowedInfo= -GuildRoleAllowedSuccess=Added %s to the allowed roles! -GuildRoleAllowedDuplicate=Can't add the same role twice! +GuildRoleAllowedSuccess= +GuildRoleAllowedDuplicate= [CommandStats] -StatsInfo=Displays the actively running KittyBot application information +StatsInfo= + StatsInfo=Displays the actively running KittyBot application information [CommandRole] -RoleInfo=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. -RoleStandardResponse=Your role is %s -RoleError=You aren't allowed to do that! You must have the KittyRole '%s' or higher! -RoleChanged=Changed %s to role `%s`! -RoleNeededRole=Please enter `general`, `mod`, or `admin`! + RoleChanged=Changed %s to role `%s`! +RoleInfo= +RoleStandardResponse= + RoleError=You aren't allowed to do that! You must have the KittyRole '%' or higher! + RoleStandardResponse=Your role is %s +RoleError= + RoleInfo=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. +RoleChanged= + RoleNeededRole=Please enter `general`, `mod`, or `admin`! +RoleNeededRole= [CommandJDoodle] -JDoodleInfo=Will compile any java code you put in! Supports Java 1.8 -JDoodleError=Please provide some java code to get it compiled! + JDoodleInfo=Will compile any java code you put in! Supports Java 1.8 + JDoodleError=Please provide some java code to get it compiled! +JDoodleInfo= +JDoodleError= [CommandChangeIndicator] -ChangeIndicatorInfo=Changes the command indicator to any single character. By default, it's '!'. If more than one character is provided, the first one is used! -ChangeIndicatorError=Please specify a letter or symbol to use! -ChangeIndicatorChanged=Indicator changed to `%s` + ChangeIndicatorError=Please specify a letter or symbol to use! + ChangeIndicatorInfo=Changes the command indicator to any single character. By default, it's '!'. If more than one character is provided, the first one is used! + ChangeIndicatorChanged=Indicator changed to `%s` +ChangeIndicatorInfo= +ChangeIndicatorError= +ChangeIndicatorChanged= [CommandPerish] -PerishInfo=Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned + PerishInfo=Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned +PerishInfo= [CommandTradeBeans] -TradeBeanseStealingBeans=Stealing is wrong! *Steals 10 beans from %s* -TradeBeansNoTargetError=You have to give *someone* your beans! -TradeBeansSuccess=%s gave %s %s of their beans! +TradeBeansNoTargetError= +TradeBeansSuccess= + TradeBeansStealingBeans=Hey %s! Stealing is wrong! Let's see how you like it! *steals 10 beans* + TradeBeansSuccess=%s gave %s %s beans! + TradeBeansNotEnoughError=You can't give more beans than you have! + TradeBeansIntParseError=That's not a real number! D: + TradeBeansNoTargetError=Don't forget to tag who you want to give the beans to! TradeBeansStealingBeans= -TradeBeansInfo=Gives another person some of your beans! Use is `tradebeans amount @person`! -TradeBeansIntParseError=That's not a real number! -TradeBeansNotEnoughError=You don't have enough beans! + TradeBeansInfo=Give your friends some of your beans! Just don't forget to @ them! +TradeBeansInfo= +TradeBeansIntParseError= +TradeBeansNotEnoughError= [CommandPollVote] -PollVoteNotValidNumber=That's not a vaild number! -PollVoteInfo=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! -PollVoteNoPoll=There is no poll running! -PollVoteAlreadyVoted=You already voted -PollVoteNotValidVote=%s That's not a vaild vote! -PollVoteSuccess=You successfully voted for + PollVoteInfo=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! +PollVoteInfo= +PollVoteNotValidNumber= + PollVoteAlreadyVoted=You already voted + PollVoteNoPoll=There is no poll running! +PollVoteNoPoll= +PollVoteAlreadyVoted= +PollVoteNotValidVote= + PollVoteNotValidNumber=That's not a vaild number! + PollVoteNotValidVote=%s That's not a vaild vote! + PollVoteSuccess=You successfully voted for +PollVoteSuccess= [CommandShutdown] -ShutdownSafe=Shutting down, but first syncing database and finishing current threads. -ShutdownUnsafe=Shutting down and immediately and abandoning all threads without sync. -ShutdownInfo=Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown. +ShutdownSafe= +ShutdownUnsafe= + ShutdownInfo=Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown. +ShutdownInfo= [CommandRaffleSpin] RaffleSpinInfo= -RaffleSpinSuccess=The winner issssssss %s! -RaffleSpinFailure=I can't choose a winner D: +RaffleSpinSuccess= +RaffleSpinFailure= + RaffleSpinSuccess=The winner issssssss %s! + RaffleSpinFailure=I can't choose a winner D: + RaffleSpinInfo= [CommandRaffleEnd] RaffleEndSuccess= + RaffleEndSuccess= RaffleEndInfo= -RaffleEndFailure=I don't think there's one going! + RaffleEndInfo= + RaffleEndFailure=I don't think there's one going! +RaffleEndFailure= [CommandCharacterSearch] -CharacterSearchNoCharacterFound=Couldn't find a character with that name or ID! -CharacterSearchMultipleCharacterHeader=I found a couple characters with that name, use `charactersearch UniqueID` with their Unique ID to find them! -CharacterSearchMultipleCharacter=%s is owned by %s. Unique ID is `%s` -CharacterSearchOneCharacter=I found one character with that name! \n Owner: %s | Name: %s | Bio: %s | Ref: <%s> | Unique ID: `%s` +CharacterSearchNoCharacterFound= +CharacterSearchMultipleCharacterHeader= +CharacterSearchMultipleCharacter= + CharacterSearchMultipleCharacter=%s is owned by %s. Unique ID is `%s` + CharacterSearchMultipleCharacterHeader=I found a couple characters with that name, use `charactersearch UniqueID` with their Unique ID to find them! + CharacterSearchOneCharacter=I found one character with that name! \n Owner: %s | Name: %s | Bio: %s | Ref: <%s> | Unique ID: `%s` +CharacterSearchOneCharacter= CharacterSearchInfo=Find a character with their name or Unique ID! `charactersearch name` or `charactersearch UniqueID` + CharacterSearchNoCharacterFound=Couldn't find a character with that name or ID! [CommandColor] ColorNotSearchable=Your color couldn't be parsed! Make sure it's in hex format. Try this! `!color 3F5D54` ColorInfo=Looks up the provided hex color and outputs it as hex, rgb, hsl, hsv, xyz, and cmyk. Also attempts to name the color, and provies a sample of it! Usage example: `!color #365345` (the # can be omitted) [CommandDoWork] -DoWorkFinished=I finished with my work! :D -DoWorkInfo=Occupies a core for a few seconds + DoWorkInfo=Occupies a core for a few seconds + DoWorkFinished=I finished with my work! :D +DoWorkInfo= +DoWorkFinished= [CommandRPStart] -RPStartInfo=Starts an rp, add people to it by mentioning them! + RPStartInfo=Starts an rp, add people to it by mentioning them! +RPStartInfo= [CommandBlurry] -BlurryInfo=Blurs your icon or the icon of a friend you mentioned + BlurryInfo=Blurs your icon or the icon of a friend you mentioned +BlurryInfo= [CommandRating] -RatingInfo='0' is fully sfw (Derpi and e621 searches are disabled), '1' is filtered (kitty auto appends a sfw tag on any searches), '2' is nsfw (any search will go through). Some other words are supported for setting filter as well. -RatingWarning=Warning: NSFW may slip through, images are only based on tags on their respective sites! -RatingChanged=Kittybot content set to -RatingInvalid=Invalid content rating + RatingInvalid=Invalid content rating +RatingInfo= + RatingInfo='0' is fully sfw (Derpi and e621 searches are disabled), '1' is filtered (kitty auto appends a sfw tag on any searches), '2' is nsfw (any search will go through). Some other words are supported for setting filter as well. +RatingWarning= + RatingWarning=Warning: NSFW may slip through, images are only based on tags on their respective sites! +RatingChanged= +RatingInvalid= + RatingChanged=Kittybot content set to %s [CommandDBStats] -DBStatsInfo= +DBStatsInfo=Shows current statistics for the database [CommandGiveBeans] -GiveBeansNoneMentioned=You didn't mention anyone! -GiveBeansSuccess=Gave %s %s beans! -GiveBeansInvalid=That's not a valid number! -GiveBeansInfo=Gives beans to the mentioned users! +GiveBeansNoneMentioned= + GiveBeansInvalid=That's not a valid number! +GiveBeansSuccess= + GiveBeansSuccess=Gave %s %s beans! +GiveBeansInvalid= + GiveBeansInfo=Gives beans to the mentioned users! + GiveBeansNoneMentioned=You didn't mention anyone! +GiveBeansInfo= [CommandPollShow] -PollShowNoPoll=There is no poll running! -PollShowInfo=Will show the current poll running -PollShowPoll=The current poll is `%s`\n -PollShowChoices=And the choices are:\n +PollShowInfo= +PollShowNoPoll= + PollShowNoPoll=There is no poll running! + PollShowInfo=Will show the current poll running +PollShowPoll= + PollShowChoices=And the choices are:\n +PollShowChoices= + PollShowPoll=The current poll is `%s`\n [CommandHelpBuilder] -HelpBuilderInfo=Emit help for all commands as formatted HTML + HelpBuilderInfo=Emit help for all commands as formatted HTML +HelpBuilderInfo= [CommandCharacterEditURL] -CharacterEditURLInfo= -CharacterEditURLNotValid= -CharacterEditURLSuccess= -CharacterEditURLNotAuth= -CharacterEditURLIDNotValid= +CharacterEditURLInfo=Change the image URL for your character's reference! +CharacterEditURLNotValid=That's not a valid url! +CharacterEditURLSuccess=Successfully changed your reference! +CharacterEditURLNotAuth=You're not authorized to change that character! [CommandRPG] -RPGInfo=Admin+ command only right now - experimental text RPG! Format is !rpg -RPGInvalid=Invalid RPG Command! + RPGInfo=Admin+ command only right now - experimental text RPG! Format is !rpg +RPGInfo= +RPGInvalid= + RPGInvalid=Invalid RPG Command! [CommandFetch] -FetchError=That no picture! -FetchEat=Me eat now *monch %s* -FetchInfo=Throw a custom emote and me bring it back! -FetchCatchRun=*Catches and runs away with %s* -FetchRunAway=*Runs away and doesn't return for a long time* -FetchBringBack=Me gots it! %s -FetchBringBackWrong=Me gots it! %s -FetchStare=*Stares at %s* + FetchEat=Mine now! *munches on %s* + FetchBringBack=Got it! %s + FetchError=That's not a custom emote! +FetchEat= + FetchInfo=Throw a custom emote and I'll try to bring it back.... maybe +FetchInfo= +FetchRunAway= + FetchStare=*Stares at %s* +FetchBringBack= + FetchRunAway=*Runs away and doesn't return for a long time* + FetchCatchRun=*Catches and runs away with %s* +FetchError= +FetchCatchRun= +FetchBringBackWrong= +FetchStare= + FetchBringBackWrong=Got it! %s [CommandInfo] -InfoResponse=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/ -InfoInfo=Provides author info and a link to Kitty's website +InfoResponse= + InfoResponse=I'm made by `Rin#8904` and `Reverie Wisp#3703`! You can find more info about me along with a Patreon link to support us and GitHub link for filing bugs https://kittybot.net +InfoInfo= + InfoInfo=Provides author info and a link to Kitty's website [CommandGuildRoleRemove] -GuildRoleRemoveNotAllowed=You're not allowed to add %s -GuildRoleRemoveFailure=Couldn't remove %s from %s -GuildRoleRemoveSuccess=Removed %s from %s! -GuildRoleRemoveInfo=Removes the role specified! +GuildRoleRemoveNotAllowed= +GuildRoleRemoveFailure= +GuildRoleRemoveSuccess= + GuildRoleRemoveNotAllowed=You're not allowed to add %s! +GuildRoleRemoveInfo= + GuildRoleRemoveFailure=I wasn't able to remove %s from %s! + GuildRoleRemoveInfo=Removes a role from you! Just remember to spell it right! + GuildRoleRemoveSuccess=Removed %s from %s! [CommandWolfram] -WolframError=Something went wrong! -WolframInfo=Will query wolframalpha with your question and give a full image output of the answer -WolframNoArgs=You need to provide some arguments! + WolframInfo=Will query wolframalpha with your question and give a full image output of the answer + WolframNoArgs=You need to provide some arguments! +WolframError= + WolframError=Something went wrong! +WolframInfo= +WolframNoArgs= [CommandMap] -MapInfo=Generates a map! You can pass additional information if you want with the flags `-s -w -h`. If one of the fields isn't provided, its default will be used. Note that adjusting the width and height impacts the map outcomes.\n\n**Defaults**\nDefault Seed: Random,\nDefault Width: 35(max %s),\nDefault Height: 25(max %s)\n\n**Key**\nLand: ˶\nMountain: ▲\nBeach: =\nMarsh: ¥\nLava: # -MapSeed=Seed -MapInvalid=Invalid arguments provided! -MapVersion=Using mapgen v0.1 -MapWidth=Width -MapHeight=Height + MapVersion=Using mapgen v0.1 + MapSeed=Seed + MapInfo=Generates a map! You can pass additional information if you want with the flags `-s +MapInvalid= +MapVersion= + `. If one of the fields isn't provided, its default will be used. Note that adjusting the width and height impacts the map outcomes.\n\n**Defaults**\nDefault Seed: Random,\nDefault Width: 35(max %s),\nDefault Height: 25(max %s)\n\n**Key**\nLand: ~\nMountain: ▲\nBeach: =\nForest: ¥\nLava: # + MapInvalid=Invalid arguments provided! + MapWidth=Width +MapInfo= +MapSeed= +MapWidth= + MapHeight=Height +MapHeight= [CommandBeansShow] -BeansShowDisplay=You have %s beans! -BeansShowMentioned=I looked it up and %sbeans! -BeansShowInfo=Displays how many beans you have + BeansShowDisplay=You have %s beans! +BeansShowDisplay= +BeansShowMentioned= +BeansShowInfo= + BeansShowInfo=Displays how many beans you have + BeansShowMentioned=I took a look and %sbeans! [CommandRaffleStart] -RaffleStartSuccess=Started a raffle with an entrance fee of %s beans! -RaffleStartFailure=There's already a raffle going! -RaffleStart= +RaffleStartSuccess= +RaffleStartFailure= RaffleStartInfo= [CommandHelp] -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` + 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`! General Commands: `boop, roll, choose, help, info, vote, results, showpoll, wolfram, cplus, java, beans, role, bet, yeet` +HelpInfo= +HelpDisplay= [CommandCharacterEditBio] -CharacterEditBioSuccess= -CharacterEditBioIDNotValid= -CharacterEditBioNotAuth= -CharacterEditBioInfo= +CharacterEditBioSuccess=Successfully changed your bio! +CharacterEditBioNotAuth=You're not authorized to change that character! +CharacterEditBioInfo=Change the short bio for your character! CharacterEditBioNotValid= [CommandTweet] -TweetInfo=Kitty will tweet to her personal twitter account -TweetError=Tweet command failed! + TweetInfo=Kitty will tweet to her personal twitter account + TweetError=Tweet command failed! +TweetInfo= +TweetError= [CommandGuildRoleAdd] -GuildRoleAddSuccess=Added %s to %s -GuildRoleAddFailure=Failed to add %s to %s -GuildRoleAddNotAllowed=You are not allowed to add %s! -GuildRoleAddInfo=Add a role to yourself! + AddGuildRoleFailure=Failed to add %s to %s + GuildRoleAddNotAllowed=You are not allowed to add %s! +GuildRoleAddSuccess= +GuildRoleAddFailure= + GuildRoleAddSuccess=Added %s to %s + GuildRoleAddInfo=Add a role to yourself! +GuildRoleAddNotAllowed= +GuildRoleAddInfo= [CommandCharacterEditName] -CharacterEditNameInfo= -CharacterEditNameNotValid= -CharacterEditNameIDNotValid= -CharacterEditNameSuccess= -CharacterEditNameNotAuth= +CharacterEditNameInfo=Change your character's name! +CharacterEditNameNotValid=That's not a vaild name! +CharacterEditNameSuccess=Successfully changed your name! +CharacterEditNameNotAuth=You're not authorized to change that character! [CommandColiru] -ColiruError=Please provide some c++ code to attempt to compile! -ColiruInfo=Will try to compile any c++ code you put in! Supports up to C++14 standard, uses g++. +ColiruError= + ColiruError=Please provide some c++ code to attempt to compile! +ColiruInfo= + ColiruInfo=Will try to compile any c++ code you put in! Supports up to C++14 standard, uses g++. [CommandStark] -StarkInfo=Snaps your icon or the icon of a friend you mentioned +StarkInfo= + StarkInfo=Snaps your icon or the icon of a friend you mentioned [CommandYeet] -YeetInfo=Yeet yourself or yeet a friend with @! +YeetInfo= + YeetInfo=Yeet yourself or yeet a friend with @! + +[CommandAllowedGuildRole] + GuildRoleAllowedDuplicate=Can't add the same role twice! + GuildRoleAllowedInfo=Adds role to the list of roles users are allowed to add to themselves. + GuildRoleAllowedSuccess=Added %s to the allowed roles! + +[CommandDefaultDance] + DefaultDanceInfo=y'all know forknife, get ready to dance, or make a friend dance with @! [CommandCrouton] -CroutonInfo=Crouton + CroutonInfo=Crouton +CroutonInfo= [CommandCharacterCreate] -CharacterCreateDuplicate=You can't create a character with the same name! -CharacterCreateInfo=Create a character for kitty to hold onto for you! `createcharacter name, shortbio, refURL` -CharacterCreateSuccess=You successfully created a character! -CharacterCreateNullInfo=There's not enough info! +CharacterCreateDuplicate= +CharacterCreateInfo= +CharacterCreateSuccess= +CharacterCreateNullInfo= [CommandTeey] -TeeyInfo=Teey yourself back into existance, or teey a friend with @! + TeeyInfo=Teey yourself back into existance, or teey a friend with @! +TeeyInfo= [CommandBetBeans] -BetBeansLowBet=Please bet with at least 50 beans! -BetBeansInfo=Allows you to bet your beans, set your amount after the command! Warning! House always wins!\nSets of 3 will get 2x, 4 will get 10x, and 5 will get 1000x -BetBeansNotValid=That's not a valid bet! -BetBeansLose=Sorry, you didn't win, try again! -BetBeansNotEnough=You don't have enough beans! -BetBeansWin=You won %s beans! + BetBeansLose=Sorry, you didn't win, try again! + BetBeansWin=You won %s beans! + BetBeansLowBet=Please bet with at least 20 beans! +BetBeansInfo= +BetBeansLowBet= +BetBeansNotValid= +BetBeansLose= +BetBeansNotEnough= +BetBeansWin= + BetBeansInfo=Allows you to bet your beans, set your amount after the command! Warning! House always wins!\nSets of 3 will get 2x, 4 will get 10x, and 5 will get 1000x + BetBeansNotEnough=You don't have enough beans! + BetBeansNotValid=That's not a valid bet! [CommandPollResults] -PollResultsResponse=%s people voted for %s `%s` with `%s%` !\n -PollResultsInfo=Will show current results of a poll and percentages of votes per choice +PollResultsResponse= + PollResultsResponse=%s people voted for %s `%s` with `%s%` !\n + PollResultsInfo=Will show current results of a poll and percentages of votes per choice +PollResultsInfo= [CommandRPEnd] -RPEndError=You can't end this RP! -RPEndInfo=Ends RP in channel and gives you a .txt file! -RPEndFileOut=Here's your file! + RPEndInfo=Ends RP in channel and gives you a .txt file! +RPEndError= + RPEndError=You can't end this RP! + RPEndFileOut=Here's your file! +RPEndInfo= +RPEndFileOut= [CommandBoop] -BoopPerson=%s booped %s! -BoopInfo=Kitty will react with a counter -BoopStandard=Woah! %s booped me! That's %s total! -BoopMultiple=%s booped several others - %s! + BoopMultiple=%s booped several others - %s! +BoopPerson= +BoopInfo= + BoopInfo=Kitty will react with a counter + BoopStandard=Woah! %s booped me! That's %s total! + BoopPerson=%s booped %s! +BoopStandard= +BoopMultiple= [CommandPing] -PingResponse=Pong! -PingInfo=Will respond with Pong! + PingInfo=Will respond with Pong! + PingResponse=Pong! +PingResponse= +PingInfo= [CommandChoose] -ChooseChoice=I chooooooose %s! -ChooseOne=I can't choose from *one* thing! -ChooseInfo=With an input of x,y,z where x y and z are all choices, kitty will choose one +ChooseChoice= + ChooseOne=I can't choose from *one* thing! +ChooseOne= + ChooseChoice=I chooooooose %s! + ChooseInfo=With an input of x,y,z where x y and z are all choices, kitty will choose one +ChooseInfo= [CommandEightBall] -EightBallYes4=Yes - definitely. -EightBallYes3=Without a doubt. -EightBallYes2=It is decidedly so. -EightBallYes1=It is certain. -EightBallYes8=Outlook good. -EightBallYes7=Most likely. -EightBallYes6=As I see it, yes. -EightBallYes5=You may rely on it. -EightBallMaybe1=Reply hazy, try again. -EightBallMaybe2=Ask again later. -EightBallError=Hmm? You'll need to ask a question! -EightBallMaybe3=Better not tell you now. -EightBallMaybe4=Cannot predict now. -EightBallMaybe5=Concentrate and ask again. -EightBallInfo=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. -EightBallNo5=Very doubtful. -EightBallNo3=My sources say no. -EightBallNo4=Outlook not so good. -EightBallNo1=Don't count on it. -EightBallNo2=My reply is no. -EightBallYes9=Yes. -EightBallYes10=Signs point to yes. + EightBallYes9=Yes. + EightBallInfo=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. +EightBallError= + EightBallMaybe4=Cannot predict now. + EightBallMaybe5=Concentrate and ask again. + EightBallMaybe2=Ask again later. + EightBallMaybe3=Better not tell you now. + EightBallYes10=Signs point to yes. +EightBallYes9= + EightBallMaybe1=Reply hazy, try again. +EightBallYes4= + EightBallError=Hmm? You'll need to ask a question! +EightBallYes3= +EightBallYes2= +EightBallYes1= +EightBallYes8= +EightBallYes7= +EightBallYes6= +EightBallYes5= +EightBallMaybe1= +EightBallMaybe2= +EightBallMaybe3= +EightBallMaybe4= +EightBallMaybe5= +EightBallInfo= +EightBallNo5= + EightBallNo2=My reply is no. +EightBallNo3= + EightBallNo1=Don't count on it. +EightBallNo4= + EightBallNo4=Outlook not so good. +EightBallNo1= + EightBallNo3=My sources say no. +EightBallNo2= + EightBallNo5=Very doubtful. + EightBallYes2=It is decidedly so. + EightBallYes1=It is certain. + EightBallYes4=Yes - definitely. + EightBallYes3=Without a doubt. + EightBallYes6=As I see it, yes. + EightBallYes5=You may rely on it. + EightBallYes8=Outlook good. + EightBallYes7=Most likely. +EightBallYes10= [CommandInvite] -InviteInfo=Provides a direct invite link for KittyBot +InviteInfo= + InviteInfo=Provides a direct invite link for KittyBot [CommandRaffleJoin] -RaffleJoinFailure=You can't join the raffle ;3; +RaffleJoinFailure= RaffleJoinInfo= -RaffleJoinSuccess=You joined the raffle! +RaffleJoinSuccess= [CommandDBFlush] DBFlushInfo=Takes all objects queued for the database and writes them to the database, then says how many were written. diff --git a/src/core/SubCommand.java b/src/core/SubCommand.java new file mode 100644 index 0000000..c490c06 --- /dev/null +++ b/src/core/SubCommand.java @@ -0,0 +1,64 @@ +package core; + +import dataStructures.*; +import utils.GlobalLog; +import utils.LogFilter; + +public abstract class SubCommand +{ + private KittyRole roleLevel; + private KittyRating contentRating; + + + public SubCommand(KittyRole roleLevel, KittyRating contentRating) + { + this.roleLevel = roleLevel; + this.contentRating = contentRating; + } + + private void Reject(KittyUser user, String reason) + { + GlobalLog.Warn(LogFilter.Command, this.getClass().getSimpleName() + " from " + user.name + " rejected due to command's " + reason); + } + + private boolean CanCall(KittyGuild guild, KittyChannel channel, KittyUser user) + { + if(guild.contentRating.getValue() < contentRating.getValue()) + { + Reject(user, "content rating"); + return false; + } + + //TODO: ADD CHANNEL CHECK HERE + + if(user.GetRole().getValue() >= roleLevel.getValue()) + { + return true; + } + + Reject(user, "permissions"); + return false; + } + + // Called by the Command manager - this will run the command + // if the issuing user has the permission to do so! + protected final void Invoke(KittyGuild guild, KittyChannel channel, KittyUser user, String input) + { + if(!CanCall(guild, channel, user)) + return; + + OnRun(guild, channel, user, input); + } + + public KittyRating Rating() + { + return contentRating; + } + + public KittyRole RequiredRole() + { + return roleLevel; + } + + public abstract SubCommandFormattable OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, String input); +} \ No newline at end of file diff --git a/src/core/SubCommandFormattable.java b/src/core/SubCommandFormattable.java new file mode 100644 index 0000000..6507847 --- /dev/null +++ b/src/core/SubCommandFormattable.java @@ -0,0 +1,40 @@ +package core; + +import dataStructures.KittyEmbed; +import dataStructures.Response; + +// Only one isn't null! +public class SubCommandFormattable +{ + public final KittyEmbed resEmbed; + public final String resString; + + // Default constructor is hidden and disabled. + // If somehow it is called, defaults to an empty string and no embed. + @SuppressWarnings("unused") + private SubCommandFormattable() + { + this.resEmbed = null; + this.resString = ""; + } + + public SubCommandFormattable(String res) + { + this.resEmbed = null; + this.resString = res; + } + + public SubCommandFormattable(KittyEmbed embed) + { + this.resEmbed = embed; + this.resString = null; + } + + public void Call(Response res) + { + if(resEmbed == null) + res.Call(resString); + else + res.CallEmbed(resEmbed); + } +} diff --git a/src/core/SubCommandFramework.java b/src/core/SubCommandFramework.java new file mode 100644 index 0000000..8a62ef2 --- /dev/null +++ b/src/core/SubCommandFramework.java @@ -0,0 +1,33 @@ +package core; + +import java.util.HashMap; + +import dataStructures.KittyChannel; +import dataStructures.KittyGuild; +import dataStructures.KittyUser; +import utils.GlobalLog; + +public class SubCommandFramework +{ + HashMap commands = new HashMap(); + + public SubCommandFramework() + { + + } + + public void addCommand(String name, SubCommand command) + { + name = name.toLowerCase(); + if(commands.put(name, command) != null) + GlobalLog.Error("Multiple registration of a name with name '" + name + "'!"); + + GlobalLog.Log("Registered " + name); + } + + public SubCommandFormattable run(KittyGuild guild, KittyChannel channel, KittyUser user, String input) + { + SubCommandFormattable res = commands.get(input.split(" ")[0].toLowerCase()).OnRun(guild, channel, user, input.substring(input.indexOf(" "))); + return res; + } +}