@@ -20,14 +20,12 @@ public class CounterStrikeBotListener extends ListenerAdapter {
2020 private RetakeService retakeService ;
2121 private CsFunService csFunService ;
2222 private DiscordService discordService ;
23- private GregflixService gregflixService ;
2423
2524 public CounterStrikeBotListener (Properties properties , DataService dataService , MessageService messageService ) {
2625 csStatsService = new CsStatsService (properties , dataService );
2726 csFunService = new CsFunService (dataService , messageService );
2827 retakeService = new RetakeService (properties , dataService , messageService );
2928 discordService = new DiscordService (properties , dataService , retakeService , messageService );
30- gregflixService = new GregflixService (properties , messageService , dataService );
3129 }
3230
3331 @ Override
@@ -97,38 +95,4 @@ public void onReady(ReadyEvent event){
9795 JDA jda = event .getJDA ();
9896 CompletableFuture .runAsync ( () -> discordService .scheduleAllTasks (jda ));
9997 }
100-
101- @ Override
102- public void onMessageReceived (MessageReceivedEvent messageReceivedEvent ) {
103- String locale = "en" ;
104-
105- if (messageReceivedEvent .getChannel ().getType ().equals (ChannelType .PRIVATE )) {
106- if (!messageReceivedEvent .getAuthor ().isBot ()) {
107- messageReceivedEvent .getAuthor ().openPrivateChannel ().queue ((privateChannel -> {
108- gregflixService .handleGregflixEvent (messageReceivedEvent , locale , privateChannel );
109- }));
110- }
111- }
112- }
113-
114- @ Override
115- public void onButtonInteraction (ButtonInteractionEvent buttonInteractionEvent ) {
116- String locale = discordService .getUserLocale (buttonInteractionEvent );
117- buttonInteractionEvent .getMessageChannel ().sendMessage (gregflixService .handleButtonEvent (buttonInteractionEvent , locale )).queue ();
118- }
119-
120- @ Override
121- public void onMessageReactionAdd (MessageReactionAddEvent messageReactionAddEvent ) {
122- String locale = "en" ;
123-
124- if (messageReactionAddEvent .getChannel ().getType ().equals (ChannelType .PRIVATE )) {
125- if (!messageReactionAddEvent .getUser ().isBot ()) {
126- messageReactionAddEvent .retrieveMessage ().queue ((message -> {
127- if (message .getAuthor ().isBot () && message .getContentDisplay ().matches ("[^\\ n]+?--[^\\ n]+?--[^\\ n]+?--[^\\ n]+?" )) {
128- gregflixService .handleGregflixReactionEvent (messageReactionAddEvent , locale );
129- }
130- }));
131- }
132- }
133- }
13498}
0 commit comments