Skip to content

Commit

Permalink
i think its fixed???
Browse files Browse the repository at this point in the history
  • Loading branch information
not-coded committed Jul 30, 2024
1 parent 4c0c090 commit d672356
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/com/nexia/discord/Discord.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import com.nexia.discord.commands.discord.base.BaseSlashCommand;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.hooks.ListenerAdapter;
import org.jetbrains.annotations.NotNull;

public class Discord extends ListenerAdapter {
@Override
public void onSlashCommandInteraction(SlashCommandInteractionEvent event) {
public void onSlashCommandInteraction(@NotNull SlashCommandInteractionEvent event) {
if(BaseSlashCommand.slashCommands.isEmpty()) return;
String command = event.getName();

for(BaseSlashCommand slashCommand : BaseSlashCommand.slashCommands) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class BaseSlashCommand {

OptionData[] optionData;

public static ArrayList<BaseSlashCommand> slashCommands;
public static ArrayList<BaseSlashCommand> slashCommands = new ArrayList<>();

public BaseSlashCommand(String name, String description, @NotNull OptionData... optionData) {
this.name = name;
Expand Down

0 comments on commit d672356

Please sign in to comment.