RoleSelectMenuContext

abstract class RoleSelectMenuContext(component: SelectMenu<*, *>, event: SelectMenuInteractionCreateEvent, cache: MutableStringKeyedMap<Any>) : SelectMenuContext

Abstract class representing the execution context of a role select (dropdown) menu component.

Inheritors

Constructors

Link copied to clipboard
constructor(component: SelectMenu<*, *>, event: SelectMenuInteractionCreateEvent, 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
Link copied to clipboard
open 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 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
@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.