|
33 | 33 | import com.mcmoddev.mmdbot.commander.commands.GistCommand; |
34 | 34 | import com.mcmoddev.mmdbot.commander.commands.RoleSelectCommand; |
35 | 35 | import com.mcmoddev.mmdbot.commander.commands.curseforge.CurseForgeCommand; |
36 | | -import com.mcmoddev.mmdbot.commander.commands.menu.message.AddQuoteContextMenu; |
37 | 36 | import com.mcmoddev.mmdbot.commander.commands.menu.message.GistContextMenu; |
38 | 37 | import com.mcmoddev.mmdbot.commander.commands.menu.user.UserInfoContextMenu; |
39 | | -import com.mcmoddev.mmdbot.commander.commands.tricks.AddTrickCommand; |
40 | | -import com.mcmoddev.mmdbot.commander.commands.tricks.EditTrickCommand; |
41 | | -import com.mcmoddev.mmdbot.commander.commands.tricks.RunTrickCommand; |
42 | 38 | import com.mcmoddev.mmdbot.commander.config.Configuration; |
43 | 39 | import com.mcmoddev.mmdbot.commander.config.GuildConfiguration; |
44 | 40 | import com.mcmoddev.mmdbot.commander.config.PermissionList; |
45 | | -import com.mcmoddev.mmdbot.commander.custompings.CustomPings; |
46 | | -import com.mcmoddev.mmdbot.commander.custompings.CustomPingsListener; |
47 | 41 | import com.mcmoddev.mmdbot.commander.docs.ConfigBasedElementLoader; |
48 | 42 | import com.mcmoddev.mmdbot.commander.docs.DocsCommand; |
49 | 43 | import com.mcmoddev.mmdbot.commander.docs.NormalDocsSender; |
50 | | -import com.mcmoddev.mmdbot.commander.eventlistener.FilePreviewListener; |
51 | 44 | import com.mcmoddev.mmdbot.commander.eventlistener.ReferencingListener; |
52 | | -import com.mcmoddev.mmdbot.commander.eventlistener.ThreadListener; |
53 | | -import com.mcmoddev.mmdbot.commander.migrate.QuotesMigrator; |
54 | | -import com.mcmoddev.mmdbot.commander.migrate.TricksMigrator; |
55 | | -import com.mcmoddev.mmdbot.commander.reminders.Reminders; |
56 | | -import com.mcmoddev.mmdbot.commander.reminders.SnoozingListener; |
57 | | -import com.mcmoddev.mmdbot.commander.tricks.Tricks; |
58 | 45 | import com.mcmoddev.mmdbot.commander.updatenotifiers.UpdateNotifiers; |
59 | 46 | import com.mcmoddev.mmdbot.commander.util.EventListeners; |
60 | 47 | import com.mcmoddev.mmdbot.commander.util.mc.MCVersions; |
@@ -180,8 +167,8 @@ public Logger getLogger() { |
180 | 167 |
|
181 | 168 | private static final Set<GatewayIntent> INTENTS = Set.of( |
182 | 169 | GatewayIntent.DIRECT_MESSAGES, |
183 | | - GatewayIntent.GUILD_BANS, |
184 | | - GatewayIntent.GUILD_EMOJIS_AND_STICKERS, |
| 170 | + GatewayIntent.GUILD_MODERATION, |
| 171 | + GatewayIntent.GUILD_EXPRESSIONS, |
185 | 172 | GatewayIntent.GUILD_MESSAGE_REACTIONS, |
186 | 173 | GatewayIntent.GUILD_MESSAGES, |
187 | 174 | GatewayIntent.GUILD_MEMBERS, |
@@ -403,27 +390,6 @@ record SlashCommandRegistration(Object fieldValue, RegisterSlashCommand annotati |
403 | 390 | EventListeners.COMMANDS_LISTENER.addListener(new EvaluateCommand.ModalListener()); |
404 | 391 | } |
405 | 392 |
|
406 | | - // Tricks |
407 | | - if (generalConfig.features().tricks().tricksEnabled()) { |
408 | | - commandClient.addCommand(new AddTrickCommand.Prefix()); |
409 | | - commandClient.addCommand(new EditTrickCommand.Prefix()); |
410 | | - EventListeners.COMMANDS_LISTENER.addListeners(new AddTrickCommand.ModalListener()); |
411 | | - if (generalConfig.features().tricks().prefixEnabled()) { |
412 | | - Tricks.getTricks().stream().map(RunTrickCommand.Prefix::new).forEach(commandClient::addCommand); |
413 | | - } |
414 | | - } |
415 | | - |
416 | | - // Quotes |
417 | | - if (generalConfig.features().areQuotesEnabled()) { |
418 | | - commandClient.addContextMenu(new AddQuoteContextMenu()); |
419 | | - } |
420 | | - |
421 | | - // Reminders |
422 | | - if (generalConfig.features().reminders().areEnabled()) { |
423 | | - Reminders.scheduleAllReminders(); |
424 | | - EventListeners.COMMANDS_LISTENER.addListeners(SnoozingListener.INSTANCE); |
425 | | - } |
426 | | - |
427 | 393 | // Docs |
428 | 394 | { |
429 | 395 | try { |
@@ -457,7 +423,7 @@ record SlashCommandRegistration(Object fieldValue, RegisterSlashCommand annotati |
457 | 423 | if (generalConfig.features().areOldChannelChecksEnabled()) { |
458 | 424 | Events.MISC_BUS.addListener((final TaskScheduler.CollectTasksEvent ct) -> OldChannelsHelper.registerListeners(ct, event.getJDA())); |
459 | 425 | } |
460 | | - }), CustomPingsListener.LISTENER.get()) |
| 426 | + })) |
461 | 427 | .disableCache(CacheFlag.CLIENT_STATUS) |
462 | 428 | .disableCache(CacheFlag.ONLINE_STATUS) |
463 | 429 | .disableCache(CacheFlag.VOICE_STATE) |
@@ -506,14 +472,6 @@ public void shutdown() { |
506 | 472 | // be assigned again |
507 | 473 | } |
508 | 474 |
|
509 | | - @Override |
510 | | - public void migrateData() throws IOException { |
511 | | - new TricksMigrator(runPath).migrate(); |
512 | | - new QuotesMigrator(runPath).migrate(); |
513 | | - Reminders.MIGRATOR.migrate(Reminders.CURRENT_SCHEMA_VERSION, Reminders.PATH_RESOLVER.apply(runPath)); |
514 | | - CustomPings.MIGRATOR.migrate(CustomPings.CURRENT_SCHEMA_VERSION, CustomPings.PATH_RESOLVER.apply(runPath)); |
515 | | - } |
516 | | - |
517 | 475 | @Override |
518 | 476 | public BotType<?> getType() { |
519 | 477 | return BOT_TYPE; |
|
0 commit comments