common / me.schlaubi.regnumutils.command.spi / Context

Context

interface Context

The context of an command execution.

Properties

args

abstract val args: Arguments

The Arguments of the exexcution

author

open val author: User

The author of the message.

channel

open val channel: TextChannel

The TextChannel of message

command

abstract val command: Command

The Command that was executed

commandClient

abstract val commandClient: CommandClient

The CommandClient which has processed the command

guild

open val guild: Guild

The guild of the channel.

jda

open val jda: JDA

The JDA instance.

me

open val me: Member

The self member of the bot.

member

open val member: Member

The member of the author.

message

abstract val message: Message

The message which invoked the command

messageId

open val messageId: Long

The id of message

selfUser

open val selfUser: SelfUser

the SelfUser of the botz

Functions

notifyUserAboutPermissionError

open fun notifyUserAboutPermissionError(): Unit

Sends the user an permission error via DM.

respond

open fun respond(content: String): MessageAction
open fun respond(content: String, delay: Long, unit: TimeUnit = TimeUnit.SECONDS): CompletionStage<Message!>
open fun respond(embed: MessageEmbed): MessageAction
open fun respond(embed: MessageEmbed, delay: Long, unit: TimeUnit = TimeUnit.SECONDS): CompletionStage<Message!>
open fun respond(embedBuilder: EmbedBuilder): MessageAction
open fun respond(embedBuilder: EmbedBuilder, delay: Long, unit: TimeUnit = TimeUnit.SECONDS): CompletionStage<Message!>

sendUsage

open fun sendUsage(): MessageAction

Sends a usage message.