DiscordContext

open class DiscordContext(    val discord: Discord,     val message: Message?,     val author: User,     val channel: MessageChannelBehavior,     val guild: Guild?) : Responder

The discord context of the command execution.

Constructors

Link copied to clipboard
fun DiscordContext(    discord: Discord,     message: Message?,     author: User,     channel: MessageChannelBehavior,     guild: Guild?)

Functions

Link copied to clipboard
suspend fun prefix(): String

Determine the relevant prefix from the configured prefix block.

Link copied to clipboard
open suspend fun respond(message: Any = "", embed: suspend EmbedBuilder.() -> Unit? = null): Message?

Create a response message with text and/or an embed.

Link copied to clipboard
open suspend fun respondMenu(menuBuilder: suspend MenuBuilder.() -> Unit): Message

Respond with a Menu.

Properties

Link copied to clipboard
val author: User

The User who invoked this command.

Link copied to clipboard
open override val channel: MessageChannelBehavior

The MessageChannel this command was invoked in.

Link copied to clipboard
val discord: Discord

The Discord instance.

Link copied to clipboard
open val guild: Guild?

The Guild this command was invoked in.

Link copied to clipboard
open val message: Message?

The Message that invoked this command.