InteractionOptionParser
- class InteractionOptionParser()
Typed access to options resolved from an application-command interaction. Missing optional values return
null; required option providers make the corresponding handler argument non-null at compile time.exported from
lib.weeble.dMethods
-
InteractionOptionParser.getAttachment(name: string)
Attachment| null Get an attachment option value.
- Parameters:
name — – The option name.
- Returns:
The resolved attachment, or
nullif not provided.
- InteractionOptionParser.getBoolean(name: string) boolean | null
Get a boolean option value.
- Parameters:
name — – The option name.
- Returns:
The option value, or
nullif not provided.
- InteractionOptionParser.getChannel(name: string) AnyGuildChannel | null
Get a channel option value.
- Parameters:
name — – The option name.
- Returns:
The resolved channel, or
nullif not provided.
- InteractionOptionParser.getFocused() string | null
Get the currently focused option value for autocomplete interactions.
- Returns:
The focused option value, or
nullif none is focused.
- InteractionOptionParser.getInteger(name: string) number | null
Get an integer option value.
- Parameters:
name — – The option name.
- Returns:
The option value, or
nullif not provided.
-
InteractionOptionParser.getMember(name: string)
GuildMember| null Get a guild member option value.
- Parameters:
name — – The option name.
- Returns:
The resolved guild member, or
nullif not provided.
- InteractionOptionParser.getNumber(name: string) number | null
Get a number (float) option value.
- Parameters:
name — – The option name.
- Returns:
The option value, or
nullif not provided.
-
InteractionOptionParser.getRole(name: string)
Role| null Get a role option value.
- Parameters:
name — – The option name.
- Returns:
The resolved role, or
nullif not provided.
-
InteractionOptionParser.getAttachment(name: string)