3232import com .mcmoddev .mmdbot .modules .commands .bot .management .CmdRename ;
3333import com .mcmoddev .mmdbot .modules .commands .bot .management .CmdRestart ;
3434import com .mcmoddev .mmdbot .modules .commands .bot .management .CmdShutdown ;
35+ import com .mcmoddev .mmdbot .modules .commands .community .CmdEvaluate ;
3536import com .mcmoddev .mmdbot .modules .commands .community .contextmenu .GuildOnlyMenu ;
3637import com .mcmoddev .mmdbot .modules .commands .community .contextmenu .message .ContextMenuAddQuote ;
3738import com .mcmoddev .mmdbot .modules .commands .community .contextmenu .message .ContextMenuGist ;
5455import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdAddTrick ;
5556import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdEditTrick ;
5657import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdListTricks ;
58+ import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdRawTrick ;
59+ import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdRunTrick ;
5760import com .mcmoddev .mmdbot .modules .commands .community .server .tricks .CmdTrick ;
5861import com .mcmoddev .mmdbot .modules .commands .moderation .CmdCommunityChannel ;
5962import com .mcmoddev .mmdbot .modules .commands .moderation .CmdMute ;
6467import com .mcmoddev .mmdbot .modules .commands .moderation .CmdWarning ;
6568import com .mcmoddev .mmdbot .utilities .ThreadedEventListener ;
6669import com .mcmoddev .mmdbot .utilities .Utils ;
70+ import com .mcmoddev .mmdbot .utilities .tricks .Tricks ;
6771import net .dv8tion .jda .api .hooks .EventListener ;
6872import net .dv8tion .jda .api .interactions .commands .build .CommandData ;
6973
@@ -138,13 +142,16 @@ public static void setupCommandModule() {
138142 new CmdWarning (),
139143 new CmdTrick (),
140144 new CmdInvite (),
141- new CmdDictionary ());
145+ new CmdDictionary (),
146+ new CmdEvaluate (),
147+ new CmdRawTrick ());
142148
143149 // addSlashCommand(Tricks.getTricks().stream().map(CmdRunTrickSeparated::new).toArray(SlashCommand[]::new));
144150
145151 commandClient .addCommand (new CmdRefreshScamLinks ());
146152 commandClient .addCommand (new CmdReact ());
147153 commandClient .addCommand (new CmdGist ());
154+ commandClient .addCommand (new CmdEvaluate ());
148155
149156 commandClient .addCommand (new CmdAddTrick .Prefix ());
150157 commandClient .addCommand (new CmdEditTrick .Prefix ());
@@ -153,6 +160,10 @@ public static void setupCommandModule() {
153160 addContextMenu (new ContextMenuAddQuote ());
154161 addContextMenu (new ContextMenuUserInfo ());
155162
163+ if (MMDBot .getConfig ().prefixTricksEnabled ()) {
164+ Tricks .getTricks ().stream ().map (CmdRunTrick .Prefix ::new ).forEach (commandClient ::addCommand );
165+ }
166+
156167 if (MMDBot .getConfig ().isCommandModuleEnabled ()) {
157168 // Wrap the command and button listener in another thread, so that if a runtime exception
158169 // occurs while executing a command, the event thread will not be stopped
0 commit comments