Package com.reign.kat.lib.command
Class Context
java.lang.Object
com.reign.kat.lib.command.Context
- Direct Known Subclasses:
- ButtonInteractionContext,- MessageContext,- SlashCommandContext,- VoiceContext
- 
Field SummaryFieldsModifier and TypeFieldDescriptionList of command argumentsfinal net.dv8tion.jda.api.entities.MemberMember who invoked the commandfinal net.dv8tion.jda.api.entities.channel.middleman.GuildChannelGuild TextChannel the command was sent in.final CommandInvoked commandfinal net.dv8tion.jda.api.entities.channel.concrete.PrivateChannelPrivateChannel the command was sent in.final net.dv8tion.jda.api.entities.GuildGuild the command was sent in.final net.dv8tion.jda.api.JDAfinal net.dv8tion.jda.api.entities.channel.middleman.AudioChannelThe VoiceChannel the author is in.
- 
Constructor SummaryConstructorsConstructorDescriptionContext(VoiceCommandEvent event, Command command, List<String> args) Context(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, Command command, List<String> args) Context(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event, Command command, List<String> args) Context(net.dv8tion.jda.api.events.message.MessageReceivedEvent event, Command command, List<String> args) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleannet.dv8tion.jda.api.entities.channel.middleman.MessageChannelchannel()abstract net.dv8tion.jda.api.events.Eventevent()net.dv8tion.jda.api.interactions.InteractionHookhook()booleanisDM()booleanisGuild()abstract Stringprefix()voidAlias to send(String...voidreply(net.dv8tion.jda.api.entities.MessageEmbed... embeds) Alias to send(MessageEmbed...abstract voidabstract voidsend(net.dv8tion.jda.api.entities.MessageEmbed... embeds) voidReply to the user with a generic error embedvoidsendError(net.dv8tion.jda.api.entities.MessageEmbed... embeds) Reply to the user with error an embed(s)
- 
Field Details- 
jdapublic final net.dv8tion.jda.api.JDA jda
- 
argsList of command arguments
- 
commandInvoked command
- 
authorpublic final net.dv8tion.jda.api.entities.Member authorMember who invoked the command
- 
channelpublic final net.dv8tion.jda.api.entities.channel.middleman.GuildChannel channelGuild TextChannel the command was sent in. null if not in a guild
- 
dmChannelpublic final net.dv8tion.jda.api.entities.channel.concrete.PrivateChannel dmChannelPrivateChannel the command was sent in. null if not in a DM
- 
voiceChannelpublic final net.dv8tion.jda.api.entities.channel.middleman.AudioChannel voiceChannelThe VoiceChannel the author is in. null if not in a voiceChannel / is a DM
- 
guildpublic final net.dv8tion.jda.api.entities.Guild guildGuild the command was sent in. null if not in a guild
 
- 
- 
Constructor Details- 
Context
- 
Context
- 
Context
- 
Context
 
- 
- 
Method Details- 
eventpublic abstract net.dv8tion.jda.api.events.Event event()
- 
prefix
- 
send
- 
sendpublic abstract void send(net.dv8tion.jda.api.entities.MessageEmbed... embeds) 
- 
canProvideInteractionHookpublic boolean canProvideInteractionHook()
- 
hookpublic net.dv8tion.jda.api.interactions.InteractionHook hook()
- 
replyAlias to send(String... msgs)- Parameters:
- msgs- String messages to send
 
- 
replypublic void reply(net.dv8tion.jda.api.entities.MessageEmbed... embeds) Alias to send(MessageEmbed... embeds)- Parameters:
- embeds- MessageEmbed embeds to send
 
- 
sendErrorReply to the user with a generic error embed
- 
sendErrorpublic void sendError(net.dv8tion.jda.api.entities.MessageEmbed... embeds) Reply to the user with error an embed(s)
- 
channelpublic net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel()
- 
isGuildpublic boolean isGuild()
- 
isDMpublic boolean isDM()
 
-