PublicRoleSelectMenuContext

class PublicRoleSelectMenuContext<M : ModalForm>(val component: PublicRoleSelectMenu<M>, val event: SelectMenuInteractionCreateEvent, val interactionResponse: PublicMessageInteractionResponseBehavior, cache: MutableStringKeyedMap<Any>) : RoleSelectMenuContext, PublicInteractionContext

Class representing the execution context for a public-only role select (dropdown) menu.

Constructors

Link copied to clipboard
constructor(component: PublicRoleSelectMenu<M>, event: SelectMenuInteractionCreateEvent, interactionResponse: PublicMessageInteractionResponseBehavior, cache: MutableStringKeyedMap<Any>)

Properties

Link copied to clipboard
Link copied to clipboard
open lateinit var channel: MessageChannelBehavior

Channel this component was interacted with within.

Link copied to clipboard
open override val component: PublicRoleSelectMenu<M>
Link copied to clipboard
open override val event: SelectMenuInteractionCreateEvent
Link copied to clipboard
open var guild: GuildBehavior?

Guild this component was interacted with within, if any.

Link copied to clipboard
open override val interactionResponse: PublicMessageInteractionResponseBehavior

Current interaction response being worked with.

Link copied to clipboard
open var member: MemberBehavior?

Member that interacted with this component, if on a guild.

Link copied to clipboard
open lateinit var message: Message

The message the component is attached to.

Link copied to clipboard
open override var resolvedLocale: Locale?

Cached locale variable, stored and retrieved by getLocale.

Link copied to clipboard
val selected: List<RoleBehavior>

Menu options that were selected by the user before de-focusing the menu.

Link copied to clipboard

Current Sentry context, containing breadcrumbs and other goodies.

Link copied to clipboard

Configured bot settings object.

Link copied to clipboard
open lateinit var user: UserBehavior

User that interacted with this component.

Functions

Link copied to clipboard
Link copied to clipboard
open suspend override fun edit(builder: suspend InteractionResponseModifyBuilder.() -> Unit): PublicMessageInteractionResponse

Edit the original interaction response.

Link copied to clipboard
open override fun editingPaginator(defaultGroup: Key, locale: Locale?, builder: PaginatorBuilder.() -> Unit): PublicResponsePaginator

Create a paginator that edits the original interaction response.

Link copied to clipboard
@JvmName(name = "getChannel1")
fun getChannel(): MessageChannelBehavior

Extract channel information from event data, if that context is available.

Link copied to clipboard
@JvmName(name = "getGuild1")
fun getGuild(): GuildBehavior?

Extract guild information from event data, if that context is available.

Link copied to clipboard
open override fun getKoin(): Koin

Get the associated Koin instance.

Link copied to clipboard
open suspend override fun getLocale(): Locale

Resolve the locale for this command context.

Link copied to clipboard
@JvmName(name = "getMember1")
fun getMember(): MemberBehavior?

Extract member information from event data, if that context is available.

Link copied to clipboard
@JvmName(name = "getMessage1")
fun getMessage(): Message

Extract message information from event data, if that context is available.

Link copied to clipboard
@JvmName(name = "getUser1")
fun getUser(): UserBehavior

Extract user information from event data, if that context is available.

Link copied to clipboard
open suspend fun populate()

Called before processing, used to populate any extra variables from event data.

Link copied to clipboard
open suspend override fun respond(builder: suspend FollowupMessageCreateBuilder.() -> Unit): PublicFollowupMessage

Create a follow-up response.

Link copied to clipboard
open suspend override fun respondingPaginator(defaultGroup: Key, locale: Locale?, builder: suspend PaginatorBuilder.() -> Unit): PublicFollowUpPaginator

Create a paginator that creates a follow-up message, and edits that.

Link copied to clipboard
open suspend override fun respondOpposite(builder: suspend FollowupMessageCreateBuilder.() -> Unit): EphemeralFollowupMessage

Create a follow-up response using the opposite interaction type.