Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CreateRoleButtonCommand = discord.SlashCommandCreate{ Name: "create-role-button", NameLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "lag-rolleknapp", }, Description: "Create a button that assigns a role to the user when clicked.", DescriptionLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "Lag ein knapp som gjev brukaren ei rolle når han vert trykt på.", }, Contexts: []discord.InteractionContextType{discord.InteractionContextTypeGuild}, DefaultMemberPermissions: omit.NewPtr(discord.PermissionManageRoles), IntegrationTypes: []discord.ApplicationIntegrationType{discord.ApplicationIntegrationTypeGuildInstall}, Options: []discord.ApplicationCommandOption{ discord.ApplicationCommandOptionRole{ Name: "role", NameLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "rolle", }, Description: "The role to assign to the user.", DescriptionLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "Rollen som skal gjevast til brukaren.", }, Required: true, }, discord.ApplicationCommandOptionString{ Name: "instructions", NameLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "instruksjonar", }, Description: "Instructions to display to the user above the button.", DescriptionLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "Instruksjonar som skal visast til brukaren over knappen.", }, Required: false, }, discord.ApplicationCommandOptionString{ Name: "text", NameLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "tekst", }, Description: "The text to display on the button.", DescriptionLocalizations: map[discord.Locale]string{ discord.LocaleNorwegian: "Teksten som skal visast på knappen.", }, Required: false, }, }, }
Functions ¶
func CreateRoleButtonHandler ¶
func CreateRoleButtonHandler(e *handler.CommandEvent) error
func RoleAssignButtonHandler ¶
func RoleAssignButtonHandler(e *handler.ComponentEvent) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.