Skip to content

Breaking Changes in JDA Chewtils 2.0

Olivia edited this page Dec 5, 2022 · 8 revisions

Because JDA-Chewtils 2.0 relies on JDA 5, some changes need to be made internally!

This page is only for users migrating from JDA-Chewtils 1.0 or JDA-Utilities to JDA-Chewtils 2.0. If you are new to both, you do not need to worry!

Some breaking changes occurred! Watch out!

Applies to everyone

  • CooldownScope is now its own class. It must be imported if it was used.

Only applies to JDA-Chewtils 1.0 users

  • SlashCommandEvent is replaced with an equivalent in package com.jagrosh.jdautilities.command.

    To fix this, you can do a simple find and replace across the entire project:

    Find: import net.dv8tion.jda.api.events.interaction.SlashCommandEvent;
    Replace: import com.jagrosh.jdautilities.command.SlashCommandEvent;

  • this.getClient() in SlashCommand is deprecated. Please use event.getClient() instead.

  • OptionHelper's optX methods are now deprecated. Please use event.optX() where event is a SlashCommandEvent

    • Simple fix for this is replacing OptionHelper with event and removing the event, argument.