Documentation
¶
Index ¶
- Variables
- func AddCommand(command *discordgo.ApplicationCommand, ...)
- func AddCommandWithComponent(cmd *discordgo.ApplicationCommand, ...)
- func AddComponent(customID string, fn func(s *discordgo.Session, i *discordgo.InteractionCreate))
- func NewActionsRow(options ...ActionsRowOption) *discordgo.ActionsRow
- func NewInteractionResponse(options ...InteractionResponseOption) *discordgo.InteractionResponse
- func NewInteractionResponseData(options ...InteractionRsponseDataOption) *discordgo.InteractionResponseData
- func NewList[T any](t ...T) []T
- func NewMessageEmbed(options ...MessageEmbedOption) *discordgo.MessageEmbed
- func NewMessageEmbedField(options ...MessageEmbedFieldOption) *discordgo.MessageEmbedField
- func NewSelectMenuOption(label string, value string, options ...SelectMenuOptionOption) *discordgo.SelectMenuOption
- type ActionsRowOption
- func SetCustomButton(style discordgo.ButtonStyle, label string, customID string) ActionsRowOption
- func SetLinkButton(label string, url string) ActionsRowOption
- func SetMultiSelectMenu(customID string, selectOptions []discordgo.SelectMenuOption, min_value *int, ...) ActionsRowOption
- func SetSingleSelectMenu(customID string, selectOptions []discordgo.SelectMenuOption, ...) ActionsRowOption
- type InteractionResponseOption
- type InteractionRsponseDataOption
- type MessageEmbedFieldOption
- type MessageEmbedOption
- func SetColor(i int) MessageEmbedOption
- func SetDescription(s string) MessageEmbedOption
- func SetEmbedAuthor(name, url, iconURL string) MessageEmbedOption
- func SetEmbedField(ef []*discordgo.MessageEmbedField) MessageEmbedOption
- func SetEmbedType(t discordgo.EmbedType) MessageEmbedOption
- func SetTitle(s string) MessageEmbedOption
- type SelectMenuOptionOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Commands = make([]*discordgo.ApplicationCommand, 0) CommandHandlers = make(map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)) ComponentHandlers = make(map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate)) )
Functions ¶
func AddCommand ¶
func AddCommand(command *discordgo.ApplicationCommand, fn func(s *discordgo.Session, i *discordgo.InteractionCreate))
func AddCommandWithComponent ¶
func AddCommandWithComponent( cmd *discordgo.ApplicationCommand, cmdfn func(s *discordgo.Session, i *discordgo.InteractionCreate), customID string, cpnfn func(s *discordgo.Session, i *discordgo.InteractionCreate), )
func AddComponent ¶
func AddComponent(customID string, fn func(s *discordgo.Session, i *discordgo.InteractionCreate))
func NewActionsRow ¶
func NewActionsRow(options ...ActionsRowOption) *discordgo.ActionsRow
func NewInteractionResponse ¶
func NewInteractionResponse(options ...InteractionResponseOption) *discordgo.InteractionResponse
func NewInteractionResponseData ¶
func NewInteractionResponseData(options ...InteractionRsponseDataOption) *discordgo.InteractionResponseData
func NewList ¶
func NewList[T any](t ...T) []T
あらゆる型の変数を引数に取って配列を返すメソッド interfaceの型が必要な場合はインスタンス化するためのかっこの中に型を指定する
func NewMessageEmbed ¶
func NewMessageEmbed(options ...MessageEmbedOption) *discordgo.MessageEmbed
func NewMessageEmbedField ¶
func NewMessageEmbedField(options ...MessageEmbedFieldOption) *discordgo.MessageEmbedField
func NewSelectMenuOption ¶
func NewSelectMenuOption(label string, value string, options ...SelectMenuOptionOption) *discordgo.SelectMenuOption
Types ¶
type ActionsRowOption ¶
type ActionsRowOption func(*discordgo.ActionsRow)
MessageComponent構造体初期化のためのOptionと関数
func SetCustomButton ¶ added in v0.0.3
func SetCustomButton(style discordgo.ButtonStyle, label string, customID string) ActionsRowOption
func SetLinkButton ¶ added in v0.0.3
func SetLinkButton(label string, url string) ActionsRowOption
func SetMultiSelectMenu ¶ added in v0.0.3
func SetMultiSelectMenu(customID string, selectOptions []discordgo.SelectMenuOption, min_value *int, max_value int, placeholder string) ActionsRowOption
func SetSingleSelectMenu ¶ added in v0.0.3
func SetSingleSelectMenu(customID string, selectOptions []discordgo.SelectMenuOption, placeholder string) ActionsRowOption
type InteractionResponseOption ¶
type InteractionResponseOption func(r *discordgo.InteractionResponse)
以下Option型と構造体生成関数の記述 InteractionResponse構造体の初期化のためのOptionと関数
func SetData ¶
func SetData(rd *discordgo.InteractionResponseData) InteractionResponseOption
func SetType ¶
func SetType(t discordgo.InteractionResponseType) InteractionResponseOption
type InteractionRsponseDataOption ¶
type InteractionRsponseDataOption func(rd *discordgo.InteractionResponseData)
InteractionResponseData構造体の初期化のためのOptionと関数
func SetComponent ¶
func SetComponent(c []discordgo.MessageComponent) InteractionRsponseDataOption
func SetContent ¶
func SetContent(content string) InteractionRsponseDataOption
func SetEmbed ¶
func SetEmbed(e []*discordgo.MessageEmbed) InteractionRsponseDataOption
type MessageEmbedFieldOption ¶
type MessageEmbedFieldOption func(ef *discordgo.MessageEmbedField)
MessageEmbedField構造体の初期化のためのOptionと関数
func SetEmbedFieldInline ¶
func SetEmbedFieldInline(b bool) MessageEmbedFieldOption
func SetEmbedFieldName ¶
func SetEmbedFieldName(s string) MessageEmbedFieldOption
func SetEmbedFieldValue ¶
func SetEmbedFieldValue(s string) MessageEmbedFieldOption
type MessageEmbedOption ¶
type MessageEmbedOption func(e *discordgo.MessageEmbed)
MessageEmbed構造体の初期化のためのOptionと関数
func SetDescription ¶
func SetDescription(s string) MessageEmbedOption
func SetEmbedAuthor ¶ added in v0.0.4
func SetEmbedAuthor(name, url, iconURL string) MessageEmbedOption
func SetEmbedField ¶
func SetEmbedField(ef []*discordgo.MessageEmbedField) MessageEmbedOption
func SetEmbedType ¶
func SetEmbedType(t discordgo.EmbedType) MessageEmbedOption
func SetTitle ¶
func SetTitle(s string) MessageEmbedOption
type SelectMenuOptionOption ¶
type SelectMenuOptionOption func(*discordgo.SelectMenuOption)
SelectMenuOption構造体初期化のためのOptionと関数
func SetSelectCustomEmoji ¶ added in v0.0.3
func SetSelectCustomEmoji(s string, id string) SelectMenuOptionOption
func SetSelectDefaultEmoji ¶ added in v0.0.3
func SetSelectDefaultEmoji(s string) SelectMenuOptionOption
func SetSelectDescription ¶ added in v0.0.3
func SetSelectDescription(d string) SelectMenuOptionOption
Click to show internal directories.
Click to hide internal directories.