GuildCommandEvent

data class GuildCommandEvent<T : TypeContainer>(val rawInputs: RawInputs, val discord: Discord, val message: Message, val author: User, val channel: GuildMessageChannel, val guild: Guild) : CommandEvent<T>

An event that can only be fired in a guild.

Constructors

Link copied to clipboard
constructor(rawInputs: RawInputs, discord: Discord, message: Message, author: User, channel: GuildMessageChannel, guild: Guild)

Properties

Link copied to clipboard
lateinit var args: T

The parsed input to the command.

Link copied to clipboard
open override val author: User

The User who invoked this command.

Link copied to clipboard
open override val channel: GuildMessageChannel

The MessageChannel this command was invoked in.

Link copied to clipboard

The Command that is resolved from the invocation.

Link copied to clipboard

The DiscordContext of this event.

Link copied to clipboard
open override val discord: Discord

The Discord instance.

Link copied to clipboard
open override val guild: Guild

The (nullable) guild this command was invoked in.

Link copied to clipboard
open override val message: Message

The Message that invoked this command.

Link copied to clipboard
open override val rawInputs: RawInputs

The RawInputs of the command.

Functions

Link copied to clipboard
open fun clone(input: RawInputs): CommandEvent<T>

Clone this event's context data with new inputs.

Link copied to clipboard
suspend fun getMember(): Member?

Try to resolve the member from the user/guild data.

Link copied to clipboard
suspend fun prefix(): String

Determine the relevant prefix in the current context.

Link copied to clipboard
suspend fun reactWith(emoji: DiscordEmoji): Unit?

Add a reaction to the command invocation message.

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.