Skip to content

Commit e1c9621

Browse files
committed
Update JDA and Chewtils, almost updated the bot but not fully finished
Signed-off-by: KiriCattus <19393068+KiriCattus@users.noreply.github.com>
1 parent e548393 commit e1c9621

72 files changed

Lines changed: 131 additions & 6505 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

gradle/libs.versions.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ lombok = { id = "io.freefair.lombok", version = "8.1.0" }
66
launch4j = { id = 'edu.sc.seis.launch4j', version = '3.0.4' }
77

88
[versions]
9-
jda = "5.0.0-beta.4"
10-
# https://github.com/Matyrobbrt/JDA-Chewtils/commit/c2bfe64e447817aa5ddac0dab0f12bcede0fe37d
9+
jda = "6.3.2"
1110
chewtils = "39a83bd8"
1211
guava = "32.1.2-jre"
1312
gson = "2.10.1"
@@ -17,7 +16,7 @@ sqlite = "3.42.0.0"
1716
flyway = "9.21.1"
1817
annotations = "24.0.1"
1918
lombok = "1.18.28"
20-
graal = "23.0.1"
19+
graal = "25.0.2"
2120
reflections = "0.10.2"
2221
jdbi = "3.40.0"
2322
junit = "5.10.0"

src/commander/java/com/mcmoddev/mmdbot/commander/TheCommander.java

Lines changed: 3 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,15 @@
3333
import com.mcmoddev.mmdbot.commander.commands.GistCommand;
3434
import com.mcmoddev.mmdbot.commander.commands.RoleSelectCommand;
3535
import com.mcmoddev.mmdbot.commander.commands.curseforge.CurseForgeCommand;
36-
import com.mcmoddev.mmdbot.commander.commands.menu.message.AddQuoteContextMenu;
3736
import com.mcmoddev.mmdbot.commander.commands.menu.message.GistContextMenu;
3837
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;
4238
import com.mcmoddev.mmdbot.commander.config.Configuration;
4339
import com.mcmoddev.mmdbot.commander.config.GuildConfiguration;
4440
import com.mcmoddev.mmdbot.commander.config.PermissionList;
45-
import com.mcmoddev.mmdbot.commander.custompings.CustomPings;
46-
import com.mcmoddev.mmdbot.commander.custompings.CustomPingsListener;
4741
import com.mcmoddev.mmdbot.commander.docs.ConfigBasedElementLoader;
4842
import com.mcmoddev.mmdbot.commander.docs.DocsCommand;
4943
import com.mcmoddev.mmdbot.commander.docs.NormalDocsSender;
50-
import com.mcmoddev.mmdbot.commander.eventlistener.FilePreviewListener;
5144
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;
5845
import com.mcmoddev.mmdbot.commander.updatenotifiers.UpdateNotifiers;
5946
import com.mcmoddev.mmdbot.commander.util.EventListeners;
6047
import com.mcmoddev.mmdbot.commander.util.mc.MCVersions;
@@ -180,8 +167,8 @@ public Logger getLogger() {
180167

181168
private static final Set<GatewayIntent> INTENTS = Set.of(
182169
GatewayIntent.DIRECT_MESSAGES,
183-
GatewayIntent.GUILD_BANS,
184-
GatewayIntent.GUILD_EMOJIS_AND_STICKERS,
170+
GatewayIntent.GUILD_MODERATION,
171+
GatewayIntent.GUILD_EXPRESSIONS,
185172
GatewayIntent.GUILD_MESSAGE_REACTIONS,
186173
GatewayIntent.GUILD_MESSAGES,
187174
GatewayIntent.GUILD_MEMBERS,
@@ -403,27 +390,6 @@ record SlashCommandRegistration(Object fieldValue, RegisterSlashCommand annotati
403390
EventListeners.COMMANDS_LISTENER.addListener(new EvaluateCommand.ModalListener());
404391
}
405392

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-
427393
// Docs
428394
{
429395
try {
@@ -457,7 +423,7 @@ record SlashCommandRegistration(Object fieldValue, RegisterSlashCommand annotati
457423
if (generalConfig.features().areOldChannelChecksEnabled()) {
458424
Events.MISC_BUS.addListener((final TaskScheduler.CollectTasksEvent ct) -> OldChannelsHelper.registerListeners(ct, event.getJDA()));
459425
}
460-
}), CustomPingsListener.LISTENER.get())
426+
}))
461427
.disableCache(CacheFlag.CLIENT_STATUS)
462428
.disableCache(CacheFlag.ONLINE_STATUS)
463429
.disableCache(CacheFlag.VOICE_STATE)
@@ -506,14 +472,6 @@ public void shutdown() {
506472
// be assigned again
507473
}
508474

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-
517475
@Override
518476
public BotType<?> getType() {
519477
return BOT_TYPE;

src/commander/java/com/mcmoddev/mmdbot/commander/commands/CustomPingsCommand.java

Lines changed: 0 additions & 232 deletions
This file was deleted.

0 commit comments

Comments
 (0)