DiscordLua
discorddiscord
v1.2.4
Install

ButtonStyle

Enum
On this page

discord.ButtonStyle lists the named constants for this enumeration. Prefer these names over hardcoded literals.

Values

discord.ButtonStyle.Primary
1
Primary. Use the symbolic name in bot code rather than the raw value.
discord.ButtonStyle.Secondary
2
Secondary. Use the symbolic name in bot code rather than the raw value.
discord.ButtonStyle.Success
3
Success. Use the symbolic name in bot code rather than the raw value.
discord.ButtonStyle.Danger
4
Danger. Use the symbolic name in bot code rather than the raw value.
discord.ButtonStyle.Premium
6
Premium. Use the symbolic name in bot code rather than the raw value.

Usage

Read members as discord.ButtonStyle.Name. Do not hard-code numeric literals when a symbolic name exists.

Example

lua
local discord = require("discord")
print(discord.ButtonStyle.Primary)
Search Ctrl K Navigate Open Esc