diff --git a/assets/config.csv b/assets/config.csv index bbfa195..5edcaab 100644 --- a/assets/config.csv +++ b/assets/config.csv @@ -33,6 +33,7 @@ "Localized Commands","info, about","" "Localized Commands","invite","" "Localized Commands","java, jdoodle","" +"Localized Commands","kittyrole","" "Localized Commands","leaderboard","" "Localized Commands","map","" "Localized Commands","perish, thenperish","" @@ -43,6 +44,7 @@ "Localized Commands","rafflespin","" "Localized Commands","rafflestart","" "Localized Commands","rating","" +"Localized Commands","remind","" "Localized Commands","results","" "Localized Commands","role","" "Localized Commands","roll","" @@ -158,10 +160,12 @@ "Localized Strings","GuildRoleAllowedDuplicate","Can't add the same role twice!" "Localized Strings","GuildRoleAllowedInfo","Adds role to the list of roles users are allowed to add to themselves." "Localized Strings","GuildRoleAllowedSuccess","Added %s to the allowed roles!" +"Localized Strings","GuildRoleInfo","" "Localized Strings","GuildRoleListEmpty","" "Localized Strings","GuildRoleListOutput","You can add these roles! %s" "Localized Strings","GuildRoleNotAllowedFailure","Unable to remove %s from the list!" "Localized Strings","GuildRoleNotAllowedInfo","Removes a role from the list that users are allowed to add to themselves." +"Localized Strings","GuildRoleNotAllowedNoArgs","" "Localized Strings","GuildRoleNotAllowedSuccess","Removed %s from the allowed roles!" "Localized Strings","GuildRoleRemoveFailure","I wasn't able to remove %s from %s!" "Localized Strings","GuildRoleRemoveInfo","Removes a role from you! Just remember to spell it right!" @@ -215,6 +219,7 @@ "Localized Strings","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." "Localized Strings","RatingInvalid","Invalid content rating" "Localized Strings","RatingWarning","Warning: NSFW may slip through, images are only based on tags on their respective sites!" +"Localized Strings","RemindInfo","" "Localized Strings","RoleChanged","Changed %s to role `%s`!" "Localized Strings","RoleError","You aren't allowed to do that! You must have the KittyRole '%' or higher!" "Localized Strings","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." @@ -282,6 +287,7 @@ "Command Enabler","info, about","1" "Command Enabler","invite","1" "Command Enabler","java, jdoodle","1" +"Command Enabler","kittyrole","1" "Command Enabler","leaderboard","1" "Command Enabler","map","1" "Command Enabler","perish, thenperish","1" @@ -292,6 +298,7 @@ "Command Enabler","rafflespin","1" "Command Enabler","rafflestart","1" "Command Enabler","rating","1" +"Command Enabler","remind","1" "Command Enabler","results","1" "Command Enabler","role","1" "Command Enabler","roll","1" diff --git a/src/core/CommandManager.java b/src/core/CommandManager.java index 188825f..d9a6445 100644 --- a/src/core/CommandManager.java +++ b/src/core/CommandManager.java @@ -2,7 +2,8 @@ package core; import java.util.*; import java.util.Map.Entry; -import commands.*; +import commands.general.*; +import commands.guildrole.CommandGuildRoleMain; import dataStructures.KittyChannel; import dataStructures.KittyGuild; import dataStructures.KittyRating; @@ -65,8 +66,6 @@ public class CommandManager // Admin this.register(LocCommands.stub("rating"), new CommandRating(KittyRole.Admin, KittyRating.Safe)); this.register(LocCommands.stub("indicator"), new CommandChangeIndicator(KittyRole.Admin, KittyRating.Safe)); - this.register(LocCommands.stub("guildroleallowed"), new CommandGuildRoleAllowed(KittyRole.Admin, KittyRating.Safe)); - this.register(LocCommands.stub("guildrolenotallowed"), new CommandGuildRoleNotAllowed(KittyRole.Admin, KittyRating.Safe)); // Mod this.register(LocCommands.stub("poll"), new CommandPollManage(KittyRole.Mod, KittyRating.Safe)); @@ -78,8 +77,6 @@ public class CommandManager // General this.register(LocCommands.stub("fetch"), new CommandFetch(KittyRole.General, KittyRating.Safe)); - this.register(LocCommands.stub("guildroleadd"), new CommandGuildRoleAdd(KittyRole.General, KittyRating.Safe)); - this.register(LocCommands.stub("guildroleremove"), new CommandGuildRoleRemove(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("teey"), new CommandTeey(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("perish, thenperish"), new CommandPerish(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("yeet"), new CommandYeet(KittyRole.General, KittyRating.Safe)); @@ -96,7 +93,7 @@ public class CommandManager this.register(LocCommands.stub("c++, g++, cplus, cpp"), new CommandColiru(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("java, jdoodle"), new CommandJDoodle(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("beans"), new CommandBeansShow(KittyRole.General, KittyRating.Safe)); - this.register(LocCommands.stub("role"), new CommandRole(KittyRole.General, KittyRating.Safe)); + this.register(LocCommands.stub("kittyrole"), new CommandRole(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("bet"), new CommandBetBeans(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("map"), new CommandMap(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("rpstart"), new CommandRPStart(KittyRole.General, KittyRating.Safe)); @@ -105,7 +102,6 @@ public class CommandManager this.register(LocCommands.stub("blur"), new CommandBlurry(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("eightball, 8ball"), new CommandEightBall(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("catch"), new CommandCatch(KittyRole.General, KittyRating.Safe)); - this.register(LocCommands.stub("guildrolelist"), new CommandGuildRoleList(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("bethistory"), new CommandBetHistory(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("crouton"), new CommandCrouton(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("benchmark, bench"), new CommandBenchmark(KittyRole.General, KittyRating.Safe)); @@ -117,6 +113,8 @@ public class CommandManager this.register(LocCommands.stub("charactereditURL"), new CommandCharacterEditURL(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("leaderboard"), new CommandLeaderboard(KittyRole.General, KittyRating.Safe)); this.register(LocCommands.stub("color, colour"), new CommandColor(KittyRole.General, KittyRating.Safe)); + this.register(LocCommands.stub("remind"), new CommandRemind(KittyRole.General, KittyRating.Safe)); + this.register(LocCommands.stub("role"), new CommandGuildRoleMain(KittyRole.General, KittyRating.Safe)); } // Allows the command manager to keep track of a command. Takes a pair (the un-localized and localzied commands) diff --git a/src/core/ObjectBuilderFactory.java b/src/core/ObjectBuilderFactory.java index c5567fb..7eb71d9 100644 --- a/src/core/ObjectBuilderFactory.java +++ b/src/core/ObjectBuilderFactory.java @@ -7,8 +7,6 @@ import java.util.concurrent.Semaphore; import javax.security.auth.login.LoginException; -import commands.general.*; -import commands.guildrole.CommandGuildRoleMain; import core.lua.PluginManager; import dataStructures.*; import main.Main; @@ -378,61 +376,6 @@ public class ObjectBuilderFactory commandManager = new CommandManager(commandEnabler); return commandManager; - - // Admin - manager.register(LocCommands.stub("rating"), new CommandRating(KittyRole.Admin, KittyRating.Safe)); - manager.register(LocCommands.stub("indicator"), new CommandChangeIndicator(KittyRole.Admin, KittyRating.Safe)); - - // Mod - manager.register(LocCommands.stub("poll"), new CommandPollManage(KittyRole.Mod, KittyRating.Safe)); - manager.register(LocCommands.stub("givebeans"), new CommandGiveBeans(KittyRole.Mod, KittyRating.Safe)); - manager.register(LocCommands.stub("rpg"), new CommandRPG(KittyRole.Mod, KittyRating.Safe)); - manager.register(LocCommands.stub("rafflestart"), new CommandRaffleStart(KittyRole.Mod, KittyRating.Safe)); - manager.register(LocCommands.stub("rafflespin"), new CommandRaffleSpin(KittyRole.Mod, KittyRating.Safe)); - manager.register(LocCommands.stub("raffleend"), new CommandRaffleEnd(KittyRole.Mod, KittyRating.Safe)); - - // General - manager.register(LocCommands.stub("fetch"), new CommandFetch(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("teey"), new CommandTeey(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("perish, thenperish"), new CommandPerish(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("yeet"), new CommandYeet(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("ping"), new CommandPing(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("boop"), new CommandBoop(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("roll"), new CommandRoll(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("choose"), new CommandChoose(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("help"), new CommandHelp(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("info, about"), new CommandInfo(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("vote"), new CommandPollVote(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("results"), new CommandPollResults(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("showpoll"), new CommandPollShow(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("wolfram"), new CommandWolfram(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("c++, g++, cplus, cpp"), new CommandColiru(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("java, jdoodle"), new CommandJDoodle(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("beans"), new CommandBeansShow(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("kittyrole"), new CommandRole(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("bet"), new CommandBetBeans(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("map"), new CommandMap(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("rpstart"), new CommandRPStart(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("rpend"), new CommandRPEnd(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("tony, stark, dontfeelgood, dontfeelsogood"), new CommandStark(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("catch"), new CommandCatch(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("bethistory"), new CommandBetHistory(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("crouton"), new CommandCrouton(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("benchmark, bench"), new CommandBenchmark(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("rafflejoin"), new CommandRaffleJoin(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("charactercreate"), new CommandCharacterCreate(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("searchcharacter"), new CommandCharacterSearch(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("charactereditbio"), new CommandCharacterEditBio(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("charactereditname"), new CommandCharacterEditName(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("charactereditURL"), new CommandCharacterEditURL(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("leaderboard"), new CommandLeaderboard(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("color, colour"), new CommandColor(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("remind"), new CommandRemind(KittyRole.General, KittyRating.Safe)); - manager.register(LocCommands.stub("role"), new CommandGuildRoleMain(KittyRole.General, KittyRating.Safe)); - - return manager; } // Default database manager construction. It can be constructed