Skip to content

Commit

Permalink
chore(deps): update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
darbyjack committed Jul 8, 2024
1 parent b92f069 commit 26e74c8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("org.springframework.boot") version "3.3.1"
id("io.spring.dependency-management") version "1.1.5"
id("io.spring.dependency-management") version "1.1.6"
id("com.github.ben-manes.versions") version "0.51.0"
id("java")
}
Expand All @@ -26,11 +26,15 @@ dependencies {
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
implementation("dev.triumphteam:triumph-cmd-jda-slash:2.0.0-SNAPSHOT")
implementation("org.incendo:cloud-jda5:1.0.0-beta.3")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.1")
implementation("com.google.guava:guava:33.2.1-jre")

implementation("net.dv8tion:JDA:5.0.0-beta.24") {
exclude(module = "opus-java")
}

developmentOnly("org.springframework.boot:spring-boot-devtools")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

import com.mcbanners.discordapi.commands.BannerCommand;
import com.mcbanners.discordapi.commands.ServerCommand;
import dev.triumphteam.cmd.slash.SlashCommandManager;
import dev.triumphteam.cmd.slash.choices.ChoiceKey;
import dev.triumphteam.cmd.slash.sender.SlashSender;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Activity;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.utils.MemberCachePolicy;
import net.dv8tion.jda.api.utils.cache.CacheFlag;
import okhttp3.OkHttpClient;
import org.incendo.cloud.discord.jda5.JDA5CommandManager;
import org.incendo.cloud.discord.jda5.JDAInteraction;
import org.incendo.cloud.execution.ExecutionCoordinator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
Expand All @@ -25,7 +25,7 @@
@EnableDiscoveryClient
public class DiscordAPIApplication {
public static JDA jda;
public static SlashCommandManager<SlashSender> manager;
public static JDA5CommandManager<JDAInteraction> manager;
public static OkHttpClient httpClient = new OkHttpClient();

public static void main(String[] args) throws LoginException {
Expand All @@ -43,7 +43,10 @@ public static void main(String[] args) throws LoginException {

jda.getPresence().setActivity(Activity.playing("MCBanners.com"));

manager = SlashCommandManager.create(jda);
manager = new JDA5CommandManager<>(
ExecutionCoordinator.simpleCoordinator(),
JDAInteraction.InteractionMapper.identity()
);


manager.registerChoices(ChoiceKey.of("platforms"), () ->
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/mcbanners/discordapi/commands/Command.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.mcbanners.discordapi.commands;

import org.checkerframework.checker.nullness.qual.NonNull;
import org.incendo.cloud.discord.jda5.JDA5CommandManager;
import org.incendo.cloud.discord.jda5.JDAInteraction;

public interface Command {
void register(@NonNull JDA5CommandManager<JDAInteraction> commandManager);
}

0 comments on commit 26e74c8

Please sign in to comment.