Skip to content

fixed unknown class referenced #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.requests.GatewayIntent;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.togetherjava.tjbot.commands.Features;
import org.togetherjava.tjbot.commands.system.BotCore;
import org.togetherjava.tjbot.config.Config;
import org.togetherjava.tjbot.db.Database;
import org.togetherjava.tjbot.commands.SlashCommandAdapter;

import javax.security.auth.login.LoginException;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
Expand All @@ -19,10 +24,8 @@
/**
* Main class of the application. Use {@link #main(String[])} to start an instance of it.
* <p>
* New commands can be created by implementing
* {@link net.dv8tion.jda.api.events.interaction.SlashCommandInteractionEvent} or extending
* {@link org.togetherjava.tjbot.commands.SlashCommandAdapter}. They can then be registered in
* {@link Features}.
* New commands can be created by implementing {@link SlashCommandInteractionEvent} or extending
* {@link SlashCommandAdapter}. They can then be registered in {@link Features}.
*/
public enum Application {
;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.togetherjava.tjbot.commands.componentids;

import org.jetbrains.annotations.NotNull;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
import net.dv8tion.jda.api.entities.Emoji;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.components.ComponentInteraction;
import net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle;
import net.dv8tion.jda.api.interactions.components.buttons.Button;

import org.togetherjava.tjbot.commands.SlashCommand;

import org.jetbrains.annotations.NotNull;

/**
Expand All @@ -11,9 +16,8 @@
* Component IDs are used during button or selection menu events. They can carry arbitrary data and
* are persisted by the system.
* <p>
* See
* {@link org.togetherjava.tjbot.commands.SlashCommand#onSlashCommand(SlashCommandInteractionEvent)}
* for more context on how to use this.
* See {@link SlashCommand#onSlashCommand(SlashCommandInteractionEvent)} for more context on how to
* use this.
* <p>
* The interface {@link ComponentIdParser} is the counterpart to this, offering parsing back the
* payload from the ID.
Expand All @@ -25,8 +29,8 @@ public interface ComponentIdGenerator {
* interactions, such as button or selection menus.
* <p>
* See {@link ComponentInteraction#getComponentId()} and
* {@link net.dv8tion.jda.api.interactions.components.Button#of(ButtonStyle, String, Emoji)} for
* details on where the generated ID can be used.
* {@link Button#of(ButtonStyle, String, Emoji)} for details on where the generated ID can be
* used.
*
* @param componentId the component ID payload to persist and generate a valid ID for
* @param lifespan the lifespan of the generated and persisted component ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import net.dv8tion.jda.api.entities.Emoji;
import net.dv8tion.jda.api.interactions.components.ComponentInteraction;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle;
import net.dv8tion.jda.api.interactions.components.buttons.Button;

import org.jetbrains.annotations.NotNull;

import java.util.Optional;
Expand All @@ -26,8 +30,8 @@ public interface ComponentIdParser {
* interactions, such as button or selection menus.
* <p>
* See {@link ComponentInteraction#getComponentId()} and
* {@link net.dv8tion.jda.api.interactions.components.Button#of(ButtonStyle, String, Emoji)} for
* details on where the ID was originally transported with.
* {@link Button#of(ButtonStyle, String, Emoji)} for details on where the ID was originally
* transported with.
*
* @param uuid the UUID to parse which represents the component ID
* @return the payload associated to the given UUID, if empty the component ID either never
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.fasterxml.jackson.dataformat.csv.CsvMapper;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent;
import org.togetherjava.tjbot.commands.SlashCommand;
import org.jetbrains.annotations.NotNull;
import org.jooq.Result;
import org.slf4j.Logger;
Expand All @@ -26,8 +28,7 @@
/**
* Thread-safe storage for component IDs. Can put, persist and get back component IDs based on
* UUIDs. Component IDs are used for button and selection menu commands, see
* {@link org.togetherjava.tjbot.commands.SlashCommand#onSlashCommand(SlashCommandInteractionEvent)}
* for details.
* {@link SlashCommand#onSlashCommand(SlashCommandInteractionEvent)} for details.
* <p>
* Use {@link #putOrThrow(UUID, ComponentId, Lifespan)} to put and persist a component ID; and
* {@link #get(UUID)} to get it back. Component IDs are persisted during application runs and can
Expand Down