Make commands util class grab API instance
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Instead of passing it as an argument, let the class grab the instance itself.
This commit is contained in:
parent
8b9ce25684
commit
fddabae3c3
@ -4,6 +4,7 @@ import net.dv8tion.jda.api.JDA;
|
||||
import net.dv8tion.jda.api.interactions.commands.Command;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.CommandData;
|
||||
import net.dv8tion.jda.api.interactions.commands.build.Commands;
|
||||
import wtf.beatrice.hidekobot.HidekoBot;
|
||||
import wtf.beatrice.hidekobot.listeners.MessageListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -20,8 +21,10 @@ public class SlashCommandsUtil
|
||||
add(Commands.slash("coinflip", "Flip a coin and get head or tails."));
|
||||
}};
|
||||
|
||||
public static void updateSlashCommands(JDA jdaInstance)
|
||||
public static void updateSlashCommands()
|
||||
{
|
||||
JDA jdaInstance = HidekoBot.getAPI();
|
||||
|
||||
List<CommandData> toAdd = new ArrayList<>();
|
||||
List<Command> toDelete = new ArrayList<>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user