Skip to content
Bilal Bassam edited this page Dec 1, 2024 · 1 revision

For the full information on how to use Discordia Enumerators, see the Discordia Wiki page.

All of the following enumerations are available through the same interface Discordia offers, for example, to check if an Interaction type is a message component or an application command:

local InteractionType = discordia.enums.interactionType
-- ...
client:on('interactionCreate', function(interaction)
  if interaction.type == interactionType.messageComponent then
    print("This is a message component, such as a button!")
  elseif interaction.type == interactionType.applicationCommand then
    print("This interaction was invoked by an app command such as slash command")
  end
end)

Enumerations

interactionType

Name Value
ping 1
applicationCommand 2
messageComponent 3
applicationCommandAutocomplete 4
modalSubmit 5

interactionContextType

Name Value
guild 1
botDm 2
privateChannel 3

interactionCallbackType

Name Value
pong 1
channelMessage 4
deferredChannelMessage 5
deferredUpdateMessage 6
updateMessage 7
applicationCommandAutocompleteResult 8
modal 9
premiumRequired 10
launchActivity 12

applicationIntegrationType

Name Value
guildInstall 0
userInstall 2

appCommandType

Name Value
chatInput 1
user 2
message 3

appCommandOptionType

Name Value
subCommand 1
subCommandGroup 2
string 3
integer 4
boolean 5
user 6
channel 7
role 8
mentionable 9
number 10
attachment 11

appCommandPermissionType

Name Value
role 1
user 2

componentType

Name Value
actionRow 1
button 2
selectMenu 3
textInput 4

messageFlag

Name Value
hasThread 0x00000020
ephemeral 0x00000040
loading 0x00000080