BotContext

interface BotContext(source)

Collection of utilities for dispatched events, such as access to clients

Inheritors

Properties

Link copied to clipboard
abstract val botUser: User
Link copied to clipboard

Create an instance of a channel client for the Message.channelId

Link copied to clipboard
abstract val client: RestClient
Link copied to clipboard

Get the interaction client from an interaction

Link copied to clipboard

Create an instance of a guild client for the Message.channelId or null if there is no guild

Functions

Link copied to clipboard
open fun channel(channelId: String): ChannelClient

Create an instance of a channel client

Link copied to clipboard
open fun command(applicationId: String): CommandClient

Create an instance of a command client

Link copied to clipboard
open suspend fun Message.delete()

Deletes the message

Link copied to clipboard
open suspend fun Message.edit(messageEdit: MessageEdit)

Edit this message

Link copied to clipboard
open fun global(): GlobalClient

Create an instance of the global client

Link copied to clipboard
open fun guild(guildId: String): GuildClient

Create an instance of a guild client

Link copied to clipboard
open fun interaction(applicationId: String, interactionToken: String): InteractionClient

Create an instance of an interaction client

Link copied to clipboard
open fun invite(inviteCode: String): InviteClient

Create an instance of an invite client

Link copied to clipboard
open suspend fun Message.react(emoji: String)

Add a reaction to this message.

Link copied to clipboard
open suspend fun Message.reply(message: String): Message
open suspend fun Message.reply(message: String = "", block: Embed.() -> Unit): Message

Sends a reply to an existing message using the Discord reply feature.

Link copied to clipboard
open suspend fun Message.replyEmbed(message: String = "", block: Embed.() -> Unit): Message

Sends a reply to an existing message using the Discord reply feature.

Link copied to clipboard
open suspend fun Message.respond(message: String): Message

Send a message in the same channel as this message.

open suspend fun Message.respond(message: String = "", block: Embed.() -> Unit): Message

Send an embed in the same channel as this message.

Link copied to clipboard
open suspend fun Message.respondAndDelete(message: String): Message
open suspend fun Message.respondAndDelete(message: String = "", block: Embed.() -> Unit): Message

Send a message in the same channel as this message and delete the original message.

Link copied to clipboard
open suspend fun Message.respondEmbed(message: String = "", block: Embed.() -> Unit): Message

Send an embed in the same channel as this message.

Link copied to clipboard
open fun webhook(webhookId: String): WebhookClient

Create an instance of a webhook client