Package-level declarations

Types

Link copied to clipboard
open class FilterStrategy(val test: (provided: String, candidate: String) -> Boolean)

Sealed interface representing matching strategies for autocomplete.

Link copied to clipboard
object Mentions

Object with easy access to unusual mentionable sections of Discord.

Link copied to clipboard

Type alias representing a mutable string keyed map.

Link copied to clipboard

Type alias representing a mutable map with string keys and values.

Link copied to clipboard
typealias StringKeyedMap<T> = Map<String, T & Any>

Type alias representing a string keyed map.

Link copied to clipboard

Type alias representing a map with string keys and values.

Properties

Link copied to clipboard
val MessageData.authorId: Snowflake

Message author's ID.

Link copied to clipboard
val MessageData.authorIsBot: Boolean

Whether the message author is a bot.

Link copied to clipboard
val User.createdAt: Instant

The user's creation timestamp.

Link copied to clipboard

Provides direct access to the map KordEx registers for Event.customContext.

Link copied to clipboard
val AutoCompleteInteractionCreateEvent.focusedOption: OptionValue<*>

Retrieve the option that's currently focused in the client.

Link copied to clipboard
val Message.isCrossPost: Boolean

Whether this message was sent from a different guild's followed announcement channel.

Link copied to clipboard
val Message.isEphemeral: Boolean

Whether this is an ephemeral message from the Interactions system.

Link copied to clipboard
val Message.isPublished: Boolean

Whether this message was published to the guilds that are following its channel.

Link copied to clipboard
val Message.isUrgent: Boolean

Whether this message came from Discord's urgent message system.

Link copied to clipboard
const val MAX_SUGGESTIONS: Int = 25

The max number of suggestions allowed.

Link copied to clipboard
val NsfwLevel.ordinal: Int

The way Discord assigned values for these makes me believe that they didn't intend for NSFW levels to be compared based on severity. Nonetheless, bots will want this, so we supply sorting ordinals here..

Link copied to clipboard

When isCrossPost, whether the source message has been deleted from the original guild.

Link copied to clipboard

The user's Discord profile URL.

Link copied to clipboard
val Message.suppressEmbeds: Boolean

Whether this message's embeds should be serialized.

Link copied to clipboard
val Permission.Companion.TimeoutMembers: Permission.ModerateMembers

Because it hasn't been called "Moderate Members" since the DMD testing finished.

Link copied to clipboard
val Member.timeoutUntil: <Error class: unknown class>?
var MemberModifyBuilder.timeoutUntil: <Error class: unknown class>?

A more sensible name than communicationDisabledUntil.

Link copied to clipboard
val Kord.users: Flow<User>

Flow containing all User objects in the cache.

Link copied to clipboard
val Permission.Companion.Video: Permission.Stream

Because "Stream" is a confusing name, people may look for "Video" instead.

Functions

Link copied to clipboard
suspend fun ComponentInteractionBehavior.ackEphemeral(deferred: Boolean = false): EphemeralMessageInteractionResponseBehavior

Convenience wrapper for sending an ephemeral ack, optionally deferred, with less characters.

Link copied to clipboard
suspend fun ComponentInteractionBehavior.ackPublic(deferred: Boolean = false): PublicMessageInteractionResponseBehavior

Convenience wrapper for sending a public ack, optionally deferred, with less characters.

Link copied to clipboard
inline suspend fun MessageBehavior.addReaction(emoji: String)

Add a reaction to this message, using the Unicode emoji represented by the given string.

Link copied to clipboard
inline suspend fun <T : Any> Flow<T>.any(crossinline predicate: suspend (T) -> Boolean): Boolean

Returns true if any element in the Flow matches the given predicate. Consumes the Flow.

Link copied to clipboard
suspend fun GuildBehavior.botHasPermissions(vararg requiredPermissions: Permission): Boolean

Checks whether the bot globally has at least requiredPermissions on this guild.

suspend fun GuildChannel.botHasPermissions(vararg requiredPermissions: Permission): Boolean

Checks whether the bot has at least requiredPermissions in this GuildChannel.

Link copied to clipboard
suspend fun Member.canInteract(member: Member): Boolean

Checks if this Member can interact (kick/ban/..) with another Member

suspend fun Member.canInteract(role: Role): Boolean

Checks if this Member can interact (delete/edit/assign/..) with the specified Role.

fun Role.canInteract(role: Role): Boolean

Checks whether a Role can interact with another Role by comparing their rawPositions.

Link copied to clipboard
fun String.capitalizeWords(locale: Locale? = null): String

Capitalize words in this string according to the given locale. Uses the Java default locale if none is provided.

Link copied to clipboard
operator fun NsfwLevel.compareTo(other: NsfwLevel): Int

Use the corresponding ordinal value to compare two NSFW levels' severity.

Link copied to clipboard
suspend fun Member.deafen(reason: String? = null): Member

Convenience function to server deafen a member, skipping the edit DSL.

Link copied to clipboard
fun MessageBehavior.delete(millis: Long, retry: Boolean = true): Job

Deletes a message after a delay.

fun PublicFollowupMessageBehavior.delete(millis: Long, retry: Boolean = true): Job

Deletes a public follow-up after a delay.

Link copied to clipboard
suspend fun MessageBehavior.deleteIgnoringNotFound()

Deletes a message, catching and ignoring an HTTP 404 (Not Found) exception.

suspend fun PublicFollowupMessageBehavior.deleteIgnoringNotFound()

Deletes a public follow-up, catching and ignoring an HTTP 404 (Not Found) exception.

Link copied to clipboard
inline suspend fun MessageBehavior.deleteOwnReaction(emoji: GuildEmoji)

Remove a reaction from this message belonging to the bot, using a guild's custom emoji object.

inline suspend fun MessageBehavior.deleteOwnReaction(unicode: String)

Remove a reaction from this message belonging to the bot, using the Unicode emoji represented by the given string.

Link copied to clipboard
inline suspend fun MessageBehavior.deleteReaction(emoji: GuildEmoji)
inline suspend fun MessageBehavior.deleteReaction(userId: Snowflake, emoji: GuildEmoji)

Remove a reaction from this message, using a guild's custom emoji object.

inline suspend fun MessageBehavior.deleteReaction(unicode: String)
inline suspend fun MessageBehavior.deleteReaction(userId: Snowflake, emoji: String)

Remove a reaction from this message, using the Unicode emoji represented by the given string.

Link copied to clipboard
inline suspend fun User.dm(builder: MessageCreateBuilder.() -> Unit): Message?
suspend fun User.dm(content: String): Message?

Send a private message to a user, if they have their DMs enabled.

Link copied to clipboard
suspend fun Attachment.download(): ByteArray

Download the attachment and return it as a ByteArray.

Link copied to clipboard
suspend fun Attachment.downloadToFile(file: File): Path

Given a File object, download the attachment and write it to the given file.

suspend fun Attachment.downloadToFile(path: Path): Path

Given a Path object, download the attachment to the file it points to.

suspend fun Attachment.downloadToFile(path: String): Path

Given a String representing a file path, download the attachment to the file it points to.

Link copied to clipboard
suspend fun Attachment.downloadToFolder(file: File): Path

Given a File representing a folder, download the attachment to a file within it.

suspend fun Attachment.downloadToFolder(path: Path): Path

Given a Path representing a folder, download the attachment to a file within it.

suspend fun Attachment.downloadToFolder(path: String): Path

Given a String representing a folder path, download the attachment to a file within it.

Link copied to clipboard
inline suspend fun Webhook.editStored(builder: WebhookModifyBuilder.() -> Unit): Webhook

Edit this webhook using the token stored within the object.

Link copied to clipboard
fun SelectOptionBuilder.emoji(guildEmoji: GuildEmoji)

Convenience function for setting this.emoji based on a given guild custom emoji.

fun SelectOptionBuilder.emoji(emoji: ReactionEmoji)
fun SelectOptionBuilder.emoji(guildEmoji: ReactionEmoji.Custom)
fun SelectOptionBuilder.emoji(unicodeEmoji: ReactionEmoji.Unicode)

Convenience function for setting this.emoji based on a given reaction emoji.

fun SelectOptionBuilder.emoji(unicodeEmoji: String)

Convenience function for setting this.emoji based on a given Unicode emoji.

Link copied to clipboard
@JvmName(name = "_ensureWebhook")
suspend fun ensureWebhook(channelObj: GuildChannelBehavior, name: String, logoFormat: Image.Format = Image.Format.PNG, logo: suspend () -> ByteArray? = null): Webhook
Link copied to clipboard
suspend fun GuildChannelBehavior.ensureWebhook(name: String, logoFormat: Image.Format = Image.Format.PNG, logo: suspend () -> ByteArray? = null): Webhook

Ensure a webhook is created for the bot in a given channel, and return it.

Link copied to clipboard
fun env(name: String): String

Returns the value of an environmental variable, loading from a .env file in the current working directory if possible.

Link copied to clipboard
inline fun <T : Any> envOf(name: String): T

Deserializes the value of an environmental variable, loading from a .env file in the current working directory if possible.

Link copied to clipboard
inline fun <T : Any> envOfOrNull(name: String): T?

Deserializes the value of an environmental variable, loading from a .env file in the current working directory if possible.

Link copied to clipboard
fun envOrNull(name: String): String?

Returns the value of an environmental variable, loading from a .env file in the current working directory if possible.

Link copied to clipboard
inline suspend fun Webhook.executeStored(threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit): Message

Execute this webhook using the token stored within the object. If threadId is provided, execute the webhook in that thread.

Link copied to clipboard
inline suspend fun Webhook.executeStoredIgnored(threadId: Snowflake? = null, builder: WebhookMessageCreateBuilder.() -> Unit)

Execute this webhook using the token stored within the object, ignoring the response. If threadId is provided, execute the webhook in that thread.

Link copied to clipboard
fun DateTimePeriod.format(locale: Locale): String

Convenience function for formatting a DateTimePeriod in the given locale.

Link copied to clipboard
fun ReactionEmoji.Companion.from(emoji: String): ReactionEmoji

Wrapper function for the String.toReaction function.

Link copied to clipboard
fun GuildChannelBehavior.getCategory(): CategoryBehavior?

Get the corresponding category channel for the given channel.

Link copied to clipboard
@JvmName(name = "getIgnoringCaseKeyed")
fun <V : Any> Map<Key, V>.getIgnoringCase(key: String, locale: Locale? = null): V?

For Key-keyed maps, attempt to retrieve a value using a case-insensitive key.

fun <V : Any> Map<String, V>.getIgnoringCase(key: String, locale: Locale? = null): V?

For string-keyed maps, attempt to retrieve a value using a case-insensitive key.

Link copied to clipboard
fun DiscordPartialMessage.getJumpUrl(): String
fun Message.getJumpUrl(): String

Generate the jump URL for this message.

fun Channel.getJumpUrl(): String

Generate the jump URL for this channel.

Link copied to clipboard
fun getKoin(): Koin

Retrieve the current Koin instance.

Link copied to clipboard
suspend fun InteractionCreateEvent.getLocale(): Locale

Attempt to resolve the locale for the given InteractionCreateEvent object.

suspend fun MessageCreateEvent.getLocale(): Locale

Attempt to resolve the locale for the given MessageCreateEvent object.

Link copied to clipboard
fun Intent.getName(): String

Return a capitalised, human-readable string representing what the current intent is for.

Link copied to clipboard
inline fun <T : Any> StringKeyedMap<*>.getOf(key: String): T

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will throw if the key is missing or the value cannot be cast.

Link copied to clipboard
inline fun <T : Any> StringKeyedMap<*>.getOfOrDefault(key: String, default: T): T

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will return the provided default value if the key is missing or the value cannot be cast.

inline fun <T : Any> MutableStringKeyedMap<Any>.getOfOrDefault(key: String, default: T, store: Boolean = false): T

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will return the provided default value if they key is missing or the value cannot be cast.

Link copied to clipboard
inline fun <T> StringKeyedMap<*>.getOfOrNull(key: String): T?

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will return null if the key is missing or the value cannot be cast.

Link copied to clipboard
inline fun <T : Any> MutableMap<String, Any>.getOfOrPut(key: String, default: () -> T): T

Utility function for getting a key from the given String-keyed map, attempting to cast it to the given generic type, T. Will insert and return the provided default value if they key is missing or the value cannot be cast.

Link copied to clipboard
suspend fun ThreadChannel.getParentMessage(): Message?

Convenience function that returns the thread's parent message, if it was created from one.

Link copied to clipboard
fun GuildChannelBehavior.getTopChannel(): TopGuildChannelBehavior?

Get the corresponding top guild channel for the given channel.

Link copied to clipboard
suspend fun Member.getTopRole(): Role?

Convenience function to retrieve a user's top Role.

Link copied to clipboard
fun RestRequestException.hasNotStatus(vararg codes: HttpStatusCode): Boolean

Check if the given RestRequestException does not have a matching HttpStatusCode.

Link copied to clipboard
fun RestRequestException.hasNotStatusCode(vararg codes: Int): Boolean

Check if the given RestRequestException does not have a matching integer status code.

Link copied to clipboard
suspend fun Member.hasPermission(perm: Permission): Boolean

Convenience function to check whether a guild member has a permission.

Link copied to clipboard
inline suspend fun Member.hasPermissions(vararg perms: Permission): Boolean
suspend fun Member.hasPermissions(perms: Collection<Permission>): Boolean

Convenience function to check whether a guild member has all of the given permissions.

Link copied to clipboard
fun Member.hasRole(role: RoleBehavior): Boolean

Check if the user has the given Role.

Link copied to clipboard
fun Member.hasRoles(vararg roles: RoleBehavior): Boolean
fun Member.hasRoles(roles: Collection<RoleBehavior>): Boolean

Check if the user has all of the given roles.

Link copied to clipboard
fun RestRequestException.hasStatus(vararg codes: HttpStatusCode): Boolean

Check if the given RestRequestException has a matching HttpStatusCode.

Link copied to clipboard
fun RestRequestException.hasStatusCode(vararg codes: Int): Boolean

Check if the given RestRequestException has a matching integer status code.

Link copied to clipboard
suspend fun GuildChannelBehavior.isAbove(other: GuildChannelBehavior): Boolean

Check whether the receiver (this) is above the given other channel in the channel list.

Link copied to clipboard
suspend fun GuildChannelBehavior.isBelow(other: GuildChannelBehavior): Boolean

Check whether the receiver (this) is below the given other channel in the channel list.

Link copied to clipboard
fun User?.isNullOrBot(): Boolean

Check whether the given user is null or a bot.

Link copied to clipboard
suspend fun Kord.kordExUserAgent(): String
Link copied to clipboard
fun loadModule(createdAtStart: Boolean = false, moduleDeclaration: ModuleDeclaration): Module

Wrapper for org.koin.dsl.module that immediately loads the module for the current Koin instance.

Link copied to clipboard
inline fun <T> Int.map(body: (Int) -> T): List<T>

Simple convenience function for mapping from 0 to the given Int, exclusively.

inline fun <T> Long.map(body: (Long) -> T): List<T>

Simple convenience function for mapping from 0 to the given Long, exclusively.

Link copied to clipboard
suspend fun Member.mute(reason: String? = null): Member

Convenience function to server mute a member, skipping the edit DSL.

Link copied to clipboard
suspend fun String.parseBoolean(context: CommandContext): Boolean?

Parse a string into a boolean, based on the context's detected locale.

Parse a string into a boolean, based on the provided locale object.

Link copied to clipboard
suspend fun GuildChannel.permissionsForMember(memberId: Snowflake): Permissions

Given a guild channel, attempt to calculate the effective permissions for the member corresponding with the given ID, checking the parent channel if this one happens to be a thread.

suspend fun GuildChannel.permissionsForMember(user: UserBehavior): Permissions

Given a guild channel, attempt to calculate the effective permissions for given user, checking the parent channel if this one happens to be a thread.

Link copied to clipboard
suspend fun Member.removeNickname(reason: String? = null): Member

Convenience function to remove a member's nickname, skipping the edit DSL.

Link copied to clipboard
suspend fun Member.removeTimeout(reason: String? = null): Member

Convenience function to remove the timeout from a member, skipping the edit DSL.

Link copied to clipboard
suspend fun Message.repliedMessageOrNull(): Message?

Attempt to retrieve the message that the current message is in reply to, if any.

Link copied to clipboard
suspend fun Message.requireChannel(context: CommandContext, channel: GuildMessageChannel, role: Role? = null, delay: Long = DELETE_DELAY, allowDm: Boolean = true, deleteOriginal: Boolean = true, deleteResponse: Boolean = true): Boolean

Check that this message happened in either the given channel or a DM, or that the author is at least a given role.

Link copied to clipboard
suspend fun Message.requireGuildChannel(context: CommandContext, role: Role? = null): Boolean
suspend fun Message.requireGuildChannel(context: CommandContext, role: Role? = null, guild: Guild? = null): Boolean

Check that this message happened in a guild channel.

Link copied to clipboard
suspend fun Message.respond(useReply: Boolean = true, pingInReply: Boolean = true, builder: suspend MessageCreateBuilder.() -> Unit): Message
suspend fun Message.respond(content: String, useReply: Boolean = true, pingInReply: Boolean = true): Message

Respond to a message in the channel it was sent to, mentioning the author.

Link copied to clipboard
suspend fun <T> runSuspended(dispatcher: CoroutineDispatcher = Dispatchers.IO, body: suspend CoroutineScope.() -> T): T

Run a block of code within a coroutine scope, defined by a given dispatcher.

Link copied to clipboard
suspend fun GuildBehavior.selfMember(): Member

Retrieves the member of the bot itself on this GuildBehavior.

Link copied to clipboard
suspend fun Member.setNickname(nickname: String?, reason: String? = null): Member

Convenience function to set a member's nickname, skipping the edit DSL.

Link copied to clipboard
fun String.splitOn(separator: (Char) -> Boolean): Pair<String, String>

Return a Pair containing the start of the given string up to the first separator character, followed by the rest of the string. If the separator character wasn't found, the returned Pair will contain the entire string as the first element, followed by the empty string.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestDoubleCollection(collection: Collection<Double>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a collection (like a list) to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestDoubleMap(map: Map<String, Double>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a map to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestIntCollection(collection: Collection<Int>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a collection (like a list) to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestIntMap(map: Map<String, Int>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a map to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestLongCollection(collection: Collection<Long>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a collection (like a list) to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestLongMap(map: Map<String, Long>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a map to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestNumberCollection(collection: Collection<Double>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a collection (like a list) to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestNumberMap(map: Map<String, Double>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a map to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestStringCollection(collection: Collection<String>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a collection (like a list) to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
inline suspend fun AutoCompleteInteraction.suggestStringMap(map: Map<String, String>, strategy: FilterStrategy = FilterStrategy.Prefix, suggestInputWithoutMatches: Boolean = false)

Use a map to populate an autocomplete interaction, filtering as described by the provided strategy.

Link copied to clipboard
fun EmbedBuilder.Footer.textOrNull(): String?

Retrieve the text from the footer of an embed builder, or null if no text was set.

Link copied to clipboard
suspend fun Member.timeout(until: Duration, reason: String? = null): Member

Convenience function to time out a member using a Duration, skipping the edit DSL.

suspend fun Member.timeout(until: DateTimePeriod, timezone: TimeZone = TimeZone.UTC, reason: String? = null): Member

Convenience function to time out a member using a DateTimePeriod and timezone, skipping the edit DSL.

Link copied to clipboard
fun DateTimePeriod.toDuration(timezone: TimeZone): Duration

Convert the given DateTimePeriod to a Duration based on the given timezone, relative to the current system time.

Link copied to clipboard
fun topRole(guildID: Snowflake): suspend (User) -> Role?

Create a lambda that returns a user's top role, if they're a member of the guild corresponding to the given ID.

Link copied to clipboard
fun GuildEmoji.toReaction(): ReactionEmoji

Transform the given GuildEmoji into a ReactionEmoji.

fun String.toReaction(): ReactionEmoji

Transform a String containing an emoji into a ReactionEmoji.

Link copied to clipboard
fun ChannelType.toTranslationKey(): Key

Given a ChannelType, return a string representing its translation key.

fun NsfwLevel.toTranslationKey(): Key?

Given a NsfwLevel, return a string representing its translation key.

fun Permission.toTranslationKey(): Key?
Link copied to clipboard
suspend fun ChannelType.translate(context: CommandContext): String

Given a CommandContext, translate the ChannelType to a human-readable string based on the context's locale.

fun ChannelType.translate(locale: Locale): String

Given a locale, translate the ChannelType to a human-readable string.

suspend fun NsfwLevel.translate(context: CommandContext): String

Given a CommandContext, translate the NsfwLevel to a human-readable string based on the context's locale.

fun NsfwLevel.translate(locale: Locale): String

Given a locale, translate the NsfwLevel to a human-readable string.

suspend fun Permission.translate(context: CommandContext): String

Given a CommandContext, translate the Permission to a human-readable string based on the context's locale.

fun Permission.translate(locale: Locale): String

Given a locale, translate the Permission to a human-readable string.

Link copied to clipboard
suspend fun Member.unDeafen(reason: String? = null): Member

Convenience function to undo a server deafen for a member, skipping the edit DSL.

Link copied to clipboard
suspend fun Member.unMute(reason: String? = null): Member

Convenience function to undo a server mute for a member, skipping the edit DSL.

Link copied to clipboard
inline suspend fun <T : Event> Kord.waitFor(timeout: Long? = null, noinline condition: suspend T.() -> Boolean = { true }): T?
inline suspend fun <T : Event> Kord.waitFor(timeout: Duration? = null, noinline condition: suspend T.() -> Boolean = { true }): T?
@KordPreview
inline suspend fun <T : Event> LiveKordEntity.waitFor(timeout: Long? = null, noinline condition: suspend T.() -> Boolean = { true }): T?
inline suspend fun <T : Event> ExtensibleBot.waitFor(timeout: Duration? = null, noinline condition: suspend T.() -> Boolean = { true }): T?

Return the first received event that matches the condition.

Link copied to clipboard
suspend fun waitForMessage(timeout: Long, filter: suspend MessageCreateEvent.() -> Boolean = { true }): Message?

Wait for a message, using the given timeout (in milliseconds ) and filter function.

Link copied to clipboard
suspend fun UserBehavior.waitForMessage(timeout: Long, filter: suspend MessageCreateEvent.() -> Boolean = { true }): Message?

Wait for a message from a user, using the given timeout (in milliseconds) and extra filter function.

suspend fun MessageChannelBehavior.waitForMessage(timeout: Long, filter: suspend MessageCreateEvent.() -> Boolean = { true }): Message?

Wait for a message in this channel, using the given timeout (in milliseconds) and extra filter function.

Link copied to clipboard
suspend fun MessageBehavior.waitForReply(timeout: Long, filter: suspend MessageCreateEvent.() -> Boolean = { true }): Message?

Wait for a message in reply to this one, using the given timeout (in milliseconds) and extra filter function.

Link copied to clipboard
suspend fun CommandContext.waitForResponse(timeout: Long, filter: suspend MessageCreateEvent.() -> Boolean = { true }): Message?

Wait for a message by the user that invoked this command, in the channel it was invoked in, using the given timeout (in milliseconds) and extra filter function.