diff --git a/commands.config b/commands.config index bfd9bc4..63fd985 100644 --- a/commands.config +++ b/commands.config @@ -44,3 +44,4 @@ catch=1 guildrolelist=1 benchmark, bench=1 bethistory=1 +crouton=1 diff --git a/locCommands.config b/locCommands.config index 5241e69..d71456e 100644 --- a/locCommands.config +++ b/locCommands.config @@ -41,6 +41,7 @@ guildroleallowed= help= buildHelp= fetch= +crouton= invite= shutdown= diff --git a/locStrings.config b/locStrings.config index 9034ab8..d7dded5 100644 --- a/locStrings.config +++ b/locStrings.config @@ -15,7 +15,7 @@ BetHistoryOutput=Kitty has %s beans! BetHistoryInfo=Sees the amount of beans Kitty has earned through your bets! [CommandCatch] -CatchInfo= +CatchInfo=Play catch with yourself or with a friend with @! [CommandBeansShow] BeansShowDisplay=You have %s beans! @@ -95,6 +95,9 @@ ShutdownSafe=Shutting down, but first syncing database and finishing current thr 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. +[CommandCrouton] +CroutonInfo=Crouton + [CommandTeey] TeeyInfo=Teey yourself back into existance, or teey a friend with @! diff --git a/src/commands/CommandCrouton.java b/src/commands/CommandCrouton.java new file mode 100644 index 0000000..e86d47c --- /dev/null +++ b/src/commands/CommandCrouton.java @@ -0,0 +1,40 @@ +package commands; + +import java.awt.Color; + +import core.Command; +import core.LocStrings; +import dataStructures.KittyChannel; +import dataStructures.KittyEmbed; +import dataStructures.KittyGuild; +import dataStructures.KittyRating; +import dataStructures.KittyRole; +import dataStructures.KittyUser; +import dataStructures.Response; +import dataStructures.UserInput; + +public class CommandCrouton extends Command +{ + public CommandCrouton(KittyRole level, KittyRating rating) { super(level, rating); } + + @Override + public String HelpText() { return LocStrings.Stub("CroutonInfo"); }; + + @Override + public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res) + { + KittyEmbed embed = new KittyEmbed(); + embed.authorImage = "https://crouton.net/crouton.png"; + embed.authorLink = "https://crouton.net/"; + embed.authorText = "Crouton"; + embed.color = new Color(255f / 255, 153f / 255, 51f / 255); // Crouton + embed.descriptionText = "Crouton"; + embed.footerText = "Crouton"; + embed.title = "Crouton"; + + embed.imageURL = "https://crouton.net/crouton.png"; + + res.CallEmbed(embed); + } +} + diff --git a/src/core/ObjectBuilderFactory.java b/src/core/ObjectBuilderFactory.java index 8a3c193..92aeadb 100644 --- a/src/core/ObjectBuilderFactory.java +++ b/src/core/ObjectBuilderFactory.java @@ -374,6 +374,7 @@ public class ObjectBuilderFactory manager.Register(LocCommands.Stub("catch"), new CommandCatch(KittyRole.General, KittyRating.Safe)); manager.Register(LocCommands.Stub("guildrolelist"), new CommandGuildRoleList(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));