diff --git a/build.gradle b/build.gradle index 2074d811..6dfc5517 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { id 'com.github.johnrengelman.shadow' version '2.0.2' } -def versionInfo = [major: '3', minor: '1', revision: '0'] +def versionInfo = [major: '4', minor: '0', revision: '0'] task build { group = 'build' @@ -36,11 +36,11 @@ allprojects { version = versionInfo.values().join('.') ext { - jdaVersion = '4.3.0_313' - slf4jVersion = '1.7.25' + jdaVersion = '5.0.0-beta.8' + slf4jVersion = '2.0.7' okhttpVersion = '3.13.0' findbugsVersion = '3.0.2' - jsonVersion = '20160810' + jsonVersion = '20230227' junitVersion = '4.13.1' // TODO Move to junit 5? dependencies { @@ -92,9 +92,6 @@ allprojects { repositories { mavenLocal() mavenCentral() - maven { - url "https://m2.dv8tion.net/releases" - } } build { diff --git a/command/src/main/java/com/jagrosh/jdautilities/command/Command.java b/command/src/main/java/com/jagrosh/jdautilities/command/Command.java index 40d2ff49..e41fb517 100644 --- a/command/src/main/java/com/jagrosh/jdautilities/command/Command.java +++ b/command/src/main/java/com/jagrosh/jdautilities/command/Command.java @@ -20,10 +20,10 @@ import java.util.function.BiConsumer; import java.util.function.Predicate; import net.dv8tion.jda.api.Permission; -import net.dv8tion.jda.api.entities.ChannelType; +import net.dv8tion.jda.api.entities.channel.ChannelType; import net.dv8tion.jda.api.entities.GuildVoiceState; -import net.dv8tion.jda.api.entities.TextChannel; -import net.dv8tion.jda.api.entities.VoiceChannel; +import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; +import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel; /** *

Commands In JDA-Utilities

@@ -247,7 +247,7 @@ public final void run(CommandEvent event) if(p.name().startsWith("VOICE")) { GuildVoiceState gvc = event.getMember().getVoiceState(); - VoiceChannel vc = gvc == null ? null : gvc.getChannel(); + VoiceChannel vc = gvc == null ? null : gvc.getChannel().asVoiceChannel(); if(vc==null) { terminate(event, event.getClient().getError()+" You must be in a voice channel to use that!"); @@ -354,7 +354,7 @@ public boolean isCommandFor(String input) } /** - * Checks whether a command is allowed in a {@link net.dv8tion.jda.api.entities.TextChannel TextChannel} + * Checks whether a command is allowed in a {@link net.dv8tion.jda.api.entities.channel.concrete.TextChannel TextChannel} * by searching the channel topic for topic tags relating to the command. * *

{-{@link com.jagrosh.jdautilities.command.Command#name name}}, @@ -766,7 +766,7 @@ public enum CooldownScope USER("U:%d",""), /** - * Applies the cooldown to the {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel} the + * Applies the cooldown to the {@link net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion MessageChannel} the * command is called in. * *

The key for this is generated in the format @@ -778,7 +778,7 @@ public enum CooldownScope /** * Applies the cooldown to the calling {@link net.dv8tion.jda.api.entities.User User} local to the - * {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel} the command is called in. + * {@link net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion MessageChannel} the command is called in. * *

The key for this is generated in the format *