public final class JDAVisitors
extends java.lang.Object
Accept individual functions using Lamp.Builder#accept(LampBuilderVisitor)
| Constructor and Description |
|---|
JDAVisitors() |
| Modifier and Type | Method and Description |
|---|---|
static <A extends SlashCommandActor> |
embedResponseHandlers()
Registers response handlers for
MessageEmbed and EmbedBuilder |
static <A extends SlashCommandActor> |
jdaContextParameters()
Registers the following types as context parameters:
JDA
SelfUser
Guild
SlashCommandInteractionEvent
|
static <A extends SlashCommandActor> |
jdaExceptionHandler()
Registers the default
CommandExceptionHandler for JDA
exceptions |
static <A extends SlashCommandActor> |
jdaParameterTypes()
Registers parameter types for the following JDA types:
Role
User
Member
TextChannel
VoiceChannel
StageChannel
NewsChannel
ThreadChannel
ScheduledEvent
Category
Emoji
As these types are identified by either a snowflake ID or a name, Lamp will first
try to use the snowflake ID (often masked as a @mention). |
static <A extends SlashCommandActor> |
jdaSenderResolver()
Registers
SenderResolvers for these parameters:
SlashCommandInteractionEvent
User
Member
MessageChannel
|
static @NotNull revxrsal.commands.LampVisitor<SlashCommandActor> |
slashCommands(@NotNull net.dv8tion.jda.api.JDA jda)
Instructs Lamp to send all the currently registered commands to Discord
|
static <A extends SlashCommandActor> |
slashCommands(@NotNull net.dv8tion.jda.api.JDA jda,
@NotNull SlashActorFactory<A> actorFactory)
Instructs Lamp to send all the currently registered commands to Discord
|
@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampVisitor<A> slashCommands(@NotNull @NotNull net.dv8tion.jda.api.JDA jda, @NotNull @NotNull SlashActorFactory<A> actorFactory)
actorFactory - The actor factory. This allows for supplying custom implementations
of SlashActorFactoryjda - JDA instance to bind commands into@NotNull public static @NotNull revxrsal.commands.LampVisitor<SlashCommandActor> slashCommands(@NotNull @NotNull net.dv8tion.jda.api.JDA jda)
jda - JDA instance to bind commands into@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> jdaSenderResolver()
SenderResolvers for these parameters:
SlashCommandInteractionEventUserMemberMessageChannelA - The actor type@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> embedResponseHandlers()
MessageEmbed and EmbedBuilderA - The actor type@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> jdaContextParameters()
JDASelfUserGuildSlashCommandInteractionEventA - The actor type@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> jdaParameterTypes()
RoleUserMemberTextChannelVoiceChannelStageChannelNewsChannelThreadChannelScheduledEventCategoryEmojiA - The actor type@NotNull public static <A extends SlashCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> jdaExceptionHandler()
CommandExceptionHandler for JDA
exceptionsA - The actor type