Documentation ¶
Index ¶
- Constants
- Variables
- func AllGuildChannels(guildID snowflake.ID) snowflake.ID
- func AnimatedEmojiMention(id snowflake.ID, name string) string
- func AuthorizeURL(values QueryValues) string
- func ChannelMention(id snowflake.ID) string
- func EmojiMention(id snowflake.ID, name string) string
- func FormattedTimestampMention(timestamp int64, style TimestampStyle) string
- func HasScope(scope OAuth2Scope, scopes ...OAuth2Scope) bool
- func InviteURL(code string) string
- func JoinScopes(scopes []OAuth2Scope) string
- func RoleMention(id snowflake.ID) string
- func TimestampMention(timestamp int64) string
- func UserMention(id snowflake.ID) string
- func UserTag(username string, discriminator string) string
- func WebhookURL(webhookID snowflake.ID, webhookToken string) string
- type AccessTokenResponse
- type ActionRowComponent
- func (c ActionRowComponent) AddComponents(components ...InteractiveComponent) ActionRowComponent
- func (c ActionRowComponent) Buttons() []ButtonComponent
- func (c ActionRowComponent) Components() []InteractiveComponent
- func (c ActionRowComponent) MarshalJSON() ([]byte, error)
- func (c ActionRowComponent) RemoveComponent(index int) ActionRowComponent
- func (c ActionRowComponent) SelectMenus() []SelectMenuComponent
- func (c ActionRowComponent) TextInputs() []TextInputComponent
- func (ActionRowComponent) Type() ComponentType
- func (c *ActionRowComponent) UnmarshalJSON(data []byte) error
- func (c ActionRowComponent) UpdateComponent(customID CustomID, component InteractiveComponent) ActionRowComponent
- type Activity
- type ActivityAssets
- type ActivityButton
- type ActivityEmoji
- type ActivityFlags
- type ActivityParty
- type ActivitySecrets
- type ActivityTimestamps
- type ActivityType
- type AddBan
- type AllowedMentionType
- type AllowedMentions
- type Application
- type ApplicationCommand
- type ApplicationCommandCreate
- type ApplicationCommandInteraction
- func (i ApplicationCommandInteraction) MessageCommandInteractionData() MessageCommandInteractionData
- func (i ApplicationCommandInteraction) SlashCommandInteractionData() SlashCommandInteractionData
- func (ApplicationCommandInteraction) Type() InteractionType
- func (i *ApplicationCommandInteraction) UnmarshalJSON(data []byte) error
- func (i ApplicationCommandInteraction) UserCommandInteractionData() UserCommandInteractionData
- type ApplicationCommandInteractionData
- type ApplicationCommandOption
- type ApplicationCommandOptionAttachment
- type ApplicationCommandOptionBool
- type ApplicationCommandOptionChannel
- type ApplicationCommandOptionChoice
- type ApplicationCommandOptionChoiceFloat
- type ApplicationCommandOptionChoiceInt
- type ApplicationCommandOptionChoiceString
- type ApplicationCommandOptionFloat
- type ApplicationCommandOptionInt
- type ApplicationCommandOptionMentionable
- type ApplicationCommandOptionRole
- type ApplicationCommandOptionString
- type ApplicationCommandOptionSubCommand
- type ApplicationCommandOptionSubCommandGroup
- type ApplicationCommandOptionType
- type ApplicationCommandOptionUser
- type ApplicationCommandPermission
- type ApplicationCommandPermissionChannel
- type ApplicationCommandPermissionRole
- type ApplicationCommandPermissionType
- type ApplicationCommandPermissionUser
- type ApplicationCommandPermissions
- type ApplicationCommandPermissionsSet
- type ApplicationCommandType
- type ApplicationCommandUpdate
- type ApplicationFlags
- type ApplicationWebhook
- func (w ApplicationWebhook) Avatar() *string
- func (w ApplicationWebhook) AvatarURL(opts ...CDNOpt) *string
- func (w ApplicationWebhook) DefaultAvatarURL(opts ...CDNOpt) string
- func (w ApplicationWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
- func (w ApplicationWebhook) ID() snowflake.ID
- func (w ApplicationWebhook) MarshalJSON() ([]byte, error)
- func (w ApplicationWebhook) Name() string
- func (ApplicationWebhook) Type() WebhookType
- func (w *ApplicationWebhook) UnmarshalJSON(data []byte) error
- type Attachment
- type AttachmentCreate
- type AttachmentKeep
- type AttachmentUpdate
- type AuditLog
- type AuditLogChangeKey
- type AuditLogEntry
- type AuditLogEvent
- type AuthorizationInformation
- type AutoArchiveDuration
- type AutoModerationAction
- type AutoModerationActionMetadata
- type AutoModerationActionType
- type AutoModerationEventType
- type AutoModerationKeywordPreset
- type AutoModerationRule
- type AutoModerationRuleCreate
- type AutoModerationRuleUpdate
- type AutoModerationTriggerMetadata
- type AutoModerationTriggerType
- type AutocompleteChoice
- type AutocompleteChoiceFloat
- type AutocompleteChoiceInt
- type AutocompleteChoiceString
- type AutocompleteInteraction
- type AutocompleteInteractionData
- func (d AutocompleteInteractionData) All() []AutocompleteOption
- func (d AutocompleteInteractionData) Bool(name string) bool
- func (d AutocompleteInteractionData) Find(optionFindFunc func(option AutocompleteOption) bool) (AutocompleteOption, bool)
- func (d AutocompleteInteractionData) FindAll(optionFindFunc func(option AutocompleteOption) bool) []AutocompleteOption
- func (d AutocompleteInteractionData) Float(name string) float64
- func (d AutocompleteInteractionData) GetByType(optionType ApplicationCommandOptionType) []AutocompleteOption
- func (d AutocompleteInteractionData) Int(name string) int
- func (d AutocompleteInteractionData) MarshalJSON() ([]byte, error)
- func (d AutocompleteInteractionData) OptBool(name string) (bool, bool)
- func (d AutocompleteInteractionData) OptFloat(name string) (float64, bool)
- func (d AutocompleteInteractionData) OptInt(name string) (int, bool)
- func (d AutocompleteInteractionData) OptSnowflake(name string) (snowflake.ID, bool)
- func (d AutocompleteInteractionData) OptString(name string) (string, bool)
- func (d AutocompleteInteractionData) Option(name string) (AutocompleteOption, bool)
- func (d AutocompleteInteractionData) Snowflake(name string) snowflake.ID
- func (d AutocompleteInteractionData) String(name string) string
- func (d *AutocompleteInteractionData) UnmarshalJSON(data []byte) error
- type AutocompleteOption
- type AutocompleteOptionSubCommand
- type AutocompleteOptionSubCommandGroup
- type AutocompleteResult
- type Ban
- type BaseInteraction
- type BotIntegration
- type ButtonComponent
- func NewButton(style ButtonStyle, label string, customID CustomID, url string) ButtonComponent
- func NewDangerButton(label string, customID CustomID) ButtonComponent
- func NewLinkButton(label string, url string) ButtonComponent
- func NewPrimaryButton(label string, customID CustomID) ButtonComponent
- func NewSecondaryButton(label string, customID CustomID) ButtonComponent
- func NewSuccessButton(label string, customID CustomID) ButtonComponent
- func (c ButtonComponent) AsDisabled() ButtonComponent
- func (c ButtonComponent) AsEnabled() ButtonComponent
- func (c ButtonComponent) ID() CustomID
- func (c ButtonComponent) MarshalJSON() ([]byte, error)
- func (c ButtonComponent) SetID(id CustomID) InteractiveComponent
- func (ButtonComponent) Type() ComponentType
- func (c ButtonComponent) WithCustomID(customID CustomID) ButtonComponent
- func (c ButtonComponent) WithDisabled(disabled bool) ButtonComponent
- func (c ButtonComponent) WithEmoji(emoji ComponentEmoji) ButtonComponent
- func (c ButtonComponent) WithLabel(label string) ButtonComponent
- func (c ButtonComponent) WithStyle(style ButtonStyle) ButtonComponent
- func (c ButtonComponent) WithURL(url string) ButtonComponent
- type ButtonInteractionData
- type ButtonStyle
- type CDNConfig
- type CDNEndpoint
- type CDNOpt
- type Channel
- type ChannelCreate
- type ChannelFlags
- type ChannelFollowerWebhook
- func (w ChannelFollowerWebhook) Avatar() *string
- func (w ChannelFollowerWebhook) AvatarURL(opts ...CDNOpt) *string
- func (w ChannelFollowerWebhook) DefaultAvatarURL(opts ...CDNOpt) string
- func (w ChannelFollowerWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
- func (w ChannelFollowerWebhook) ID() snowflake.ID
- func (w ChannelFollowerWebhook) MarshalJSON() ([]byte, error)
- func (w ChannelFollowerWebhook) Name() string
- func (ChannelFollowerWebhook) Type() WebhookType
- func (w *ChannelFollowerWebhook) UnmarshalJSON(data []byte) error
- type ChannelType
- type ChannelUpdate
- type ClientStatus
- type Component
- type ComponentEmoji
- type ComponentInteraction
- type ComponentInteractionData
- type ComponentType
- type Connection
- type ConnectionType
- type ContainerComponent
- type ContextCommandInteractionData
- type CustomID
- type DMChannel
- func (c DMChannel) ID() snowflake.ID
- func (c DMChannel) LastMessageID() *snowflake.ID
- func (c DMChannel) LastPinTimestamp() *time.Time
- func (c DMChannel) MarshalJSON() ([]byte, error)
- func (c DMChannel) Name() string
- func (c DMChannel) String() string
- func (DMChannel) Type() ChannelType
- func (c *DMChannel) UnmarshalJSON(data []byte) error
- type DMChannelCreate
- type Embed
- type EmbedAuthor
- type EmbedBuilder
- func (b *EmbedBuilder) AddField(name string, value string, inline bool) *EmbedBuilder
- func (b *EmbedBuilder) AddFields(fields ...EmbedField) *EmbedBuilder
- func (b *EmbedBuilder) Build() Embed
- func (b *EmbedBuilder) ClearFields() *EmbedBuilder
- func (b *EmbedBuilder) RemoveField(i int) *EmbedBuilder
- func (b *EmbedBuilder) SetAuthor(name string, url string, iconURL string) *EmbedBuilder
- func (b *EmbedBuilder) SetAuthorIcon(iconURL string) *EmbedBuilder
- func (b *EmbedBuilder) SetAuthorName(name string) *EmbedBuilder
- func (b *EmbedBuilder) SetAuthorURL(url string) *EmbedBuilder
- func (b *EmbedBuilder) SetColor(color int) *EmbedBuilder
- func (b *EmbedBuilder) SetDescription(description string) *EmbedBuilder
- func (b *EmbedBuilder) SetDescriptionf(description string, a ...any) *EmbedBuilder
- func (b *EmbedBuilder) SetEmbedAuthor(author *EmbedAuthor) *EmbedBuilder
- func (b *EmbedBuilder) SetEmbedFooter(footer *EmbedFooter) *EmbedBuilder
- func (b *EmbedBuilder) SetField(i int, name string, value string, inline bool) *EmbedBuilder
- func (b *EmbedBuilder) SetFields(fields ...EmbedField) *EmbedBuilder
- func (b *EmbedBuilder) SetFooter(text string, iconURL string) *EmbedBuilder
- func (b *EmbedBuilder) SetFooterIcon(iconURL string) *EmbedBuilder
- func (b *EmbedBuilder) SetFooterText(text string) *EmbedBuilder
- func (b *EmbedBuilder) SetImage(url string) *EmbedBuilder
- func (b *EmbedBuilder) SetThumbnail(url string) *EmbedBuilder
- func (b *EmbedBuilder) SetTimestamp(time time.Time) *EmbedBuilder
- func (b *EmbedBuilder) SetTitle(title string) *EmbedBuilder
- func (b *EmbedBuilder) SetTitlef(title string, a ...any) *EmbedBuilder
- func (b *EmbedBuilder) SetURL(url string) *EmbedBuilder
- type EmbedField
- type EmbedFooter
- type EmbedProvider
- type EmbedResource
- type EmbedType
- type Emoji
- type EmojiCreate
- type EmojiUpdate
- type EntityMetaData
- type ExplicitContentFilterLevel
- type ExtendedInvite
- type File
- type FileFlags
- type FollowChannel
- type FollowedChannel
- type ForumThread
- type ForumThreadCreate
- type Gateway
- type GatewayBot
- type GatewayGuild
- type GetAllThreads
- type GetThreads
- type GrantType
- type Guild
- type GuildAudioChannel
- type GuildCategoryChannel
- func (c GuildCategoryChannel) GuildID() snowflake.ID
- func (c GuildCategoryChannel) ID() snowflake.ID
- func (c GuildCategoryChannel) MarshalJSON() ([]byte, error)
- func (c GuildCategoryChannel) Mention() string
- func (c GuildCategoryChannel) Name() string
- func (c GuildCategoryChannel) ParentID() *snowflake.ID
- func (c GuildCategoryChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildCategoryChannel) Position() int
- func (c GuildCategoryChannel) String() string
- func (GuildCategoryChannel) Type() ChannelType
- func (c *GuildCategoryChannel) UnmarshalJSON(data []byte) error
- type GuildCategoryChannelCreate
- type GuildCategoryChannelUpdate
- type GuildChannel
- type GuildChannelCreate
- type GuildChannelPositionUpdate
- type GuildChannelUpdate
- type GuildCreate
- type GuildCreateChannel
- type GuildCreateRole
- type GuildFeature
- type GuildForumChannel
- func (c GuildForumChannel) GuildID() snowflake.ID
- func (c GuildForumChannel) ID() snowflake.ID
- func (c GuildForumChannel) MarshalJSON() ([]byte, error)
- func (c GuildForumChannel) Mention() string
- func (c GuildForumChannel) Name() string
- func (c GuildForumChannel) ParentID() *snowflake.ID
- func (c GuildForumChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildForumChannel) Position() int
- func (c GuildForumChannel) String() string
- func (GuildForumChannel) Type() ChannelType
- func (c *GuildForumChannel) UnmarshalJSON(data []byte) error
- type GuildForumChannelCreate
- type GuildForumChannelUpdate
- type GuildFromTemplateCreate
- type GuildMessageChannel
- type GuildNewsChannel
- func (c GuildNewsChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
- func (c GuildNewsChannel) GuildID() snowflake.ID
- func (c GuildNewsChannel) ID() snowflake.ID
- func (c GuildNewsChannel) LastMessageID() *snowflake.ID
- func (c GuildNewsChannel) LastPinTimestamp() *time.Time
- func (c GuildNewsChannel) MarshalJSON() ([]byte, error)
- func (c GuildNewsChannel) Mention() string
- func (c GuildNewsChannel) NSFW() bool
- func (c GuildNewsChannel) Name() string
- func (c GuildNewsChannel) ParentID() *snowflake.ID
- func (c GuildNewsChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildNewsChannel) Position() int
- func (c GuildNewsChannel) RateLimitPerUser() int
- func (c GuildNewsChannel) String() string
- func (c GuildNewsChannel) Topic() *string
- func (GuildNewsChannel) Type() ChannelType
- func (c *GuildNewsChannel) UnmarshalJSON(data []byte) error
- type GuildNewsChannelCreate
- type GuildNewsChannelUpdate
- type GuildNewsThreadCreate
- type GuildPreview
- type GuildPrivateThreadCreate
- type GuildPublicThreadCreate
- type GuildScheduledEvent
- type GuildScheduledEventCreate
- type GuildScheduledEventUpdate
- type GuildScheduledEventUser
- type GuildStageVoiceChannel
- func (c GuildStageVoiceChannel) Bitrate() int
- func (c GuildStageVoiceChannel) GuildID() snowflake.ID
- func (c GuildStageVoiceChannel) ID() snowflake.ID
- func (c GuildStageVoiceChannel) MarshalJSON() ([]byte, error)
- func (c GuildStageVoiceChannel) Mention() string
- func (c GuildStageVoiceChannel) Name() string
- func (c GuildStageVoiceChannel) ParentID() *snowflake.ID
- func (c GuildStageVoiceChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildStageVoiceChannel) Position() int
- func (c GuildStageVoiceChannel) RTCRegion() string
- func (c GuildStageVoiceChannel) String() string
- func (GuildStageVoiceChannel) Type() ChannelType
- func (c *GuildStageVoiceChannel) UnmarshalJSON(data []byte) error
- type GuildStageVoiceChannelCreate
- type GuildStageVoiceChannelUpdate
- type GuildTemplate
- type GuildTemplateCreate
- type GuildTemplateUpdate
- type GuildTextChannel
- func (c GuildTextChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
- func (c GuildTextChannel) GuildID() snowflake.ID
- func (c GuildTextChannel) ID() snowflake.ID
- func (c GuildTextChannel) LastMessageID() *snowflake.ID
- func (c GuildTextChannel) LastPinTimestamp() *time.Time
- func (c GuildTextChannel) MarshalJSON() ([]byte, error)
- func (c GuildTextChannel) Mention() string
- func (c GuildTextChannel) NSFW() bool
- func (c GuildTextChannel) Name() string
- func (c GuildTextChannel) ParentID() *snowflake.ID
- func (c GuildTextChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildTextChannel) Position() int
- func (c GuildTextChannel) RateLimitPerUser() int
- func (c GuildTextChannel) String() string
- func (c GuildTextChannel) Topic() *string
- func (GuildTextChannel) Type() ChannelType
- func (c *GuildTextChannel) UnmarshalJSON(data []byte) error
- type GuildTextChannelCreate
- type GuildTextChannelUpdate
- type GuildThread
- func (c GuildThread) DefaultAutoArchiveDuration() AutoArchiveDuration
- func (c GuildThread) GuildID() snowflake.ID
- func (c GuildThread) ID() snowflake.ID
- func (c GuildThread) LastMessageID() *snowflake.ID
- func (c GuildThread) LastPinTimestamp() *time.Time
- func (c GuildThread) MarshalJSON() ([]byte, error)
- func (c GuildThread) Mention() string
- func (c GuildThread) NSFW() bool
- func (c GuildThread) Name() string
- func (c GuildThread) ParentID() *snowflake.ID
- func (c GuildThread) PermissionOverwrites() PermissionOverwrites
- func (c GuildThread) Position() int
- func (c GuildThread) RateLimitPerUser() int
- func (c GuildThread) String() string
- func (c GuildThread) Topic() *string
- func (c GuildThread) Type() ChannelType
- func (c *GuildThread) UnmarshalJSON(data []byte) error
- type GuildThreadUpdate
- type GuildUpdate
- type GuildVoiceChannel
- func (c GuildVoiceChannel) Bitrate() int
- func (c GuildVoiceChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
- func (c GuildVoiceChannel) GuildID() snowflake.ID
- func (c GuildVoiceChannel) ID() snowflake.ID
- func (c GuildVoiceChannel) LastMessageID() *snowflake.ID
- func (c GuildVoiceChannel) LastPinTimestamp() *time.Time
- func (c GuildVoiceChannel) MarshalJSON() ([]byte, error)
- func (c GuildVoiceChannel) Mention() string
- func (c GuildVoiceChannel) NSFW() bool
- func (c GuildVoiceChannel) Name() string
- func (c GuildVoiceChannel) ParentID() *snowflake.ID
- func (c GuildVoiceChannel) PermissionOverwrites() PermissionOverwrites
- func (c GuildVoiceChannel) Position() int
- func (c GuildVoiceChannel) RTCRegion() string
- func (c GuildVoiceChannel) RateLimitPerUser() int
- func (c GuildVoiceChannel) String() string
- func (c GuildVoiceChannel) Topic() *string
- func (GuildVoiceChannel) Type() ChannelType
- func (c *GuildVoiceChannel) UnmarshalJSON(data []byte) error
- type GuildVoiceChannelCreate
- type GuildVoiceChannelUpdate
- type GuildWelcomeChannel
- type Icon
- type IconType
- type ImageFormat
- type IncomingWebhook
- func (w IncomingWebhook) Avatar() *string
- func (w IncomingWebhook) AvatarURL(opts ...CDNOpt) *string
- func (w IncomingWebhook) DefaultAvatarURL(opts ...CDNOpt) string
- func (w IncomingWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
- func (w IncomingWebhook) ID() snowflake.ID
- func (w IncomingWebhook) MarshalJSON() ([]byte, error)
- func (w IncomingWebhook) Name() string
- func (IncomingWebhook) Type() WebhookType
- func (w IncomingWebhook) URL() string
- func (w *IncomingWebhook) UnmarshalJSON(data []byte) error
- type InstallationParams
- type Integration
- type IntegrationAccount
- type IntegrationApplication
- type IntegrationType
- type Interaction
- type InteractionResponse
- type InteractionResponseCreator
- type InteractionResponseData
- type InteractionResponseType
- type InteractionType
- type InteractiveComponent
- type Invite
- type InviteChannel
- type InviteCreate
- type InviteGuild
- type InviteTargetType
- type Locale
- type MFALevel
- type Member
- type MemberAdd
- type MemberPermissionOverwrite
- type MemberPermissionOverwriteUpdate
- type MemberUpdate
- type MembershipState
- type MentionType
- type Mentionable
- type Message
- func (m *Message) ActionRows() []ActionRowComponent
- func (m *Message) ButtonByID(customID CustomID) *ButtonComponent
- func (m *Message) Buttons() []ButtonComponent
- func (m *Message) ComponentByID(customID CustomID) InteractiveComponent
- func (m *Message) InteractiveComponents() []InteractiveComponent
- func (m *Message) SelectMenuByID(customID CustomID) *SelectMenuComponent
- func (m *Message) SelectMenus() []SelectMenuComponent
- func (m *Message) UnmarshalJSON(data []byte) error
- type MessageActivity
- type MessageActivityType
- type MessageApplication
- type MessageBulkDelete
- type MessageChannel
- type MessageCommand
- func (c MessageCommand) ApplicationID() snowflake.ID
- func (c MessageCommand) DMPermission() bool
- func (c MessageCommand) DefaultMemberPermissions() Permissions
- func (c MessageCommand) GuildID() *snowflake.ID
- func (c MessageCommand) ID() snowflake.ID
- func (c MessageCommand) MarshalJSON() ([]byte, error)
- func (c MessageCommand) Name() string
- func (c MessageCommand) NameLocalizations() map[Locale]string
- func (c MessageCommand) NameLocalized() string
- func (MessageCommand) Type() ApplicationCommandType
- func (c *MessageCommand) UnmarshalJSON(data []byte) error
- func (c MessageCommand) Version() snowflake.ID
- type MessageCommandCreate
- type MessageCommandInteractionData
- func (d MessageCommandInteractionData) CommandID() snowflake.ID
- func (d MessageCommandInteractionData) CommandName() string
- func (d MessageCommandInteractionData) GuildID() *snowflake.ID
- func (d *MessageCommandInteractionData) MarshalJSON() ([]byte, error)
- func (d MessageCommandInteractionData) TargetID() snowflake.ID
- func (d MessageCommandInteractionData) TargetMessage() Message
- func (MessageCommandInteractionData) Type() ApplicationCommandType
- func (d *MessageCommandInteractionData) UnmarshalJSON(data []byte) error
- type MessageCommandResolved
- type MessageCommandUpdate
- type MessageCreate
- type MessageCreateBuilder
- func (b *MessageCreateBuilder) AddActionRow(components ...InteractiveComponent) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddEmbeds(embeds ...Embed) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddFiles(files ...*File) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddFlags(flags ...MessageFlags) *MessageCreateBuilder
- func (b *MessageCreateBuilder) AddStickers(stickerIds ...snowflake.ID) *MessageCreateBuilder
- func (b *MessageCreateBuilder) Build() MessageCreate
- func (b *MessageCreateBuilder) ClearAllowedMentions() *MessageCreateBuilder
- func (b *MessageCreateBuilder) ClearContainerComponents() *MessageCreateBuilder
- func (b *MessageCreateBuilder) ClearEmbeds() *MessageCreateBuilder
- func (b *MessageCreateBuilder) ClearFiles() *MessageCreateBuilder
- func (b *MessageCreateBuilder) ClearFlags() *MessageCreateBuilder
- func (b *MessageCreateBuilder) ClearStickers() *MessageCreateBuilder
- func (b *MessageCreateBuilder) RemoveContainerComponent(i int) *MessageCreateBuilder
- func (b *MessageCreateBuilder) RemoveEmbed(i int) *MessageCreateBuilder
- func (b *MessageCreateBuilder) RemoveFile(i int) *MessageCreateBuilder
- func (b *MessageCreateBuilder) RemoveFlags(flags ...MessageFlags) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetContent(content string) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetContentf(content string, a ...any) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetEmbed(i int, embed Embed) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetEmbeds(embeds ...Embed) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetEphemeral(ephemeral bool) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetFile(i int, file *File) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetFiles(files ...*File) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetFlags(flags MessageFlags) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetMessageReference(messageReference *MessageReference) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetMessageReferenceByID(messageID snowflake.ID) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetStickers(stickerIds ...snowflake.ID) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageCreateBuilder
- func (b *MessageCreateBuilder) SetTTS(tts bool) *MessageCreateBuilder
- type MessageFlags
- type MessageInteraction
- type MessageNotificationsLevel
- type MessageReaction
- type MessageReference
- type MessageSticker
- type MessageThread
- type MessageType
- type MessageUpdate
- type MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddActionRow(components ...InteractiveComponent) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddContainerComponents(containers ...ContainerComponent) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddEmbeds(embeds ...Embed) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddFiles(files ...*File) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) AddFlags(flags ...MessageFlags) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) Build() MessageUpdate
- func (b *MessageUpdateBuilder) ClearAllowedMentions() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) ClearContainerComponents() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) ClearContent() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) ClearEmbeds() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) ClearFiles() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) ClearFlags() *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RemoveContainerComponent(i int) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RemoveEmbed(i int) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RemoveFile(i int) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RemoveFlags(flags ...MessageFlags) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RetainAttachments(attachments ...Attachment) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) RetainAttachmentsByID(attachmentIDs ...snowflake.ID) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetContainerComponent(i int, container ContainerComponent) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetContent(content string) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetContentf(content string, a ...any) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetEmbed(i int, embed Embed) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetEmbeds(embeds ...Embed) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetFile(i int, file *File) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetFiles(files ...*File) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetFlags(flags MessageFlags) *MessageUpdateBuilder
- func (b *MessageUpdateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageUpdateBuilder
- type ModalCreate
- type ModalCreateBuilder
- func (b *ModalCreateBuilder) AddActionRow(components ...InteractiveComponent) *ModalCreateBuilder
- func (b *ModalCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *ModalCreateBuilder
- func (b *ModalCreateBuilder) Build() ModalCreate
- func (b *ModalCreateBuilder) ClearContainerComponents() *ModalCreateBuilder
- func (b *ModalCreateBuilder) RemoveContainerComponent(i int) *ModalCreateBuilder
- func (b *ModalCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *ModalCreateBuilder
- func (b *ModalCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *ModalCreateBuilder
- func (b *ModalCreateBuilder) SetCustomID(customID CustomID) *ModalCreateBuilder
- func (b *ModalCreateBuilder) SetTitle(title string) *ModalCreateBuilder
- type ModalSubmitInteraction
- type ModalSubmitInteractionData
- func (d ModalSubmitInteractionData) Component(customID CustomID) (InteractiveComponent, bool)
- func (d ModalSubmitInteractionData) OptText(customID CustomID) (string, bool)
- func (d ModalSubmitInteractionData) Text(customID CustomID) string
- func (d ModalSubmitInteractionData) TextInputComponent(customID CustomID) (TextInputComponent, bool)
- func (d *ModalSubmitInteractionData) UnmarshalJSON(data []byte) error
- type MultipartBuffer
- type NSFWLevel
- type OAuth2Guild
- type OAuth2Scope
- type OAuth2User
- type OnlineStatus
- type OptionalAuditLogEntryInfo
- type PartialApplication
- type PartialRole
- type Payload
- type PermissionOverwrite
- type PermissionOverwriteType
- type PermissionOverwriteUpdate
- type PermissionOverwrites
- type Permissions
- func (p Permissions) Add(bits ...Permissions) Permissions
- func (p Permissions) Has(bits ...Permissions) bool
- func (p Permissions) MarshalJSON() ([]byte, error)
- func (p Permissions) Missing(bits ...Permissions) bool
- func (p Permissions) Remove(bits ...Permissions) Permissions
- func (p *Permissions) UnmarshalJSON(data []byte) error
- type PingInteraction
- func (PingInteraction) AppPermissions() *Permissions
- func (i PingInteraction) ApplicationID() snowflake.ID
- func (PingInteraction) ChannelID() snowflake.ID
- func (PingInteraction) GuildID() *snowflake.ID
- func (PingInteraction) GuildLocale() *Locale
- func (i PingInteraction) ID() snowflake.ID
- func (PingInteraction) Locale() Locale
- func (i PingInteraction) MarshalJSON() ([]byte, error)
- func (PingInteraction) Member() *ResolvedMember
- func (i PingInteraction) Token() string
- func (PingInteraction) Type() InteractionType
- func (i *PingInteraction) UnmarshalJSON(data []byte) error
- func (PingInteraction) User() User
- func (i PingInteraction) Version() int
- type PremiumTier
- type PremiumType
- type Presence
- type PresenceUser
- type QueryValues
- type ReactionEmoji
- type ResolvedChannel
- type ResolvedMember
- type RestGuild
- type Role
- type RoleCreate
- type RolePermissionOverwrite
- type RolePermissionOverwriteUpdate
- type RolePositionUpdate
- type RoleTag
- type RoleUpdate
- type ScheduledEventEntityType
- type ScheduledEventPrivacyLevel
- type ScheduledEventStatus
- type SelectMenuComponent
- func (c SelectMenuComponent) AddOptions(options ...SelectMenuOption) SelectMenuComponent
- func (c SelectMenuComponent) AsDisabled() SelectMenuComponent
- func (c SelectMenuComponent) AsEnabled() SelectMenuComponent
- func (c SelectMenuComponent) ID() CustomID
- func (c SelectMenuComponent) MarshalJSON() ([]byte, error)
- func (c SelectMenuComponent) RemoveOption(index int) SelectMenuComponent
- func (c SelectMenuComponent) SetOption(value string, option SelectMenuOption) SelectMenuComponent
- func (c SelectMenuComponent) SetOptions(options ...SelectMenuOption) SelectMenuComponent
- func (SelectMenuComponent) Type() ComponentType
- func (c SelectMenuComponent) WithCustomID(customID CustomID) SelectMenuComponent
- func (c SelectMenuComponent) WithDisabled(disabled bool) SelectMenuComponent
- func (c SelectMenuComponent) WithMaxValues(maxValue int) SelectMenuComponent
- func (c SelectMenuComponent) WithMinValues(minValue int) SelectMenuComponent
- func (c SelectMenuComponent) WithPlaceholder(placeholder string) SelectMenuComponent
- type SelectMenuInteractionData
- type SelectMenuOption
- func (o SelectMenuOption) WithDefault(defaultOption bool) SelectMenuOption
- func (o SelectMenuOption) WithDescription(description string) SelectMenuOption
- func (o SelectMenuOption) WithEmoji(emoji ComponentEmoji) SelectMenuOption
- func (o SelectMenuOption) WithLabel(label string) SelectMenuOption
- func (o SelectMenuOption) WithValue(value string) SelectMenuOption
- type SelfNickUpdate
- type SelfUserUpdate
- type SessionStartLimit
- type SlashCommand
- func (c SlashCommand) ApplicationID() snowflake.ID
- func (c SlashCommand) DMPermission() bool
- func (c SlashCommand) DefaultMemberPermissions() Permissions
- func (c SlashCommand) GuildID() *snowflake.ID
- func (c SlashCommand) ID() snowflake.ID
- func (c SlashCommand) MarshalJSON() ([]byte, error)
- func (c SlashCommand) Name() string
- func (c SlashCommand) NameLocalizations() map[Locale]string
- func (c SlashCommand) NameLocalized() string
- func (SlashCommand) Type() ApplicationCommandType
- func (c *SlashCommand) UnmarshalJSON(data []byte) error
- func (c SlashCommand) Version() snowflake.ID
- type SlashCommandCreate
- type SlashCommandInteractionData
- func (d SlashCommandInteractionData) All() []SlashCommandOption
- func (d SlashCommandInteractionData) Attachment(name string) Attachment
- func (d SlashCommandInteractionData) Bool(name string) bool
- func (d SlashCommandInteractionData) Channel(name string) ResolvedChannel
- func (d SlashCommandInteractionData) CommandID() snowflake.ID
- func (d SlashCommandInteractionData) CommandName() string
- func (d SlashCommandInteractionData) Find(optionFindFunc func(option SlashCommandOption) bool) (SlashCommandOption, bool)
- func (d SlashCommandInteractionData) FindAll(optionFindFunc func(option SlashCommandOption) bool) []SlashCommandOption
- func (d SlashCommandInteractionData) Float(name string) float64
- func (d SlashCommandInteractionData) GetByType(optionType ApplicationCommandOptionType) []SlashCommandOption
- func (d SlashCommandInteractionData) GuildID() *snowflake.ID
- func (d SlashCommandInteractionData) Int(name string) int
- func (d SlashCommandInteractionData) MarshalJSON() ([]byte, error)
- func (d SlashCommandInteractionData) Member(name string) ResolvedMember
- func (d SlashCommandInteractionData) OptAttachment(name string) (Attachment, bool)
- func (d SlashCommandInteractionData) OptBool(name string) (bool, bool)
- func (d SlashCommandInteractionData) OptChannel(name string) (ResolvedChannel, bool)
- func (d SlashCommandInteractionData) OptFloat(name string) (float64, bool)
- func (d SlashCommandInteractionData) OptInt(name string) (int, bool)
- func (d SlashCommandInteractionData) OptMember(name string) (ResolvedMember, bool)
- func (d SlashCommandInteractionData) OptRole(name string) (Role, bool)
- func (d SlashCommandInteractionData) OptSnowflake(name string) (snowflake.ID, bool)
- func (d SlashCommandInteractionData) OptString(name string) (string, bool)
- func (d SlashCommandInteractionData) OptUser(name string) (User, bool)
- func (d SlashCommandInteractionData) Option(name string) (SlashCommandOption, bool)
- func (d SlashCommandInteractionData) Role(name string) Role
- func (d SlashCommandInteractionData) Snowflake(name string) snowflake.ID
- func (d SlashCommandInteractionData) String(name string) string
- func (SlashCommandInteractionData) Type() ApplicationCommandType
- func (d *SlashCommandInteractionData) UnmarshalJSON(data []byte) error
- func (d SlashCommandInteractionData) User(name string) User
- type SlashCommandOption
- type SlashCommandOptionSubCommand
- type SlashCommandOptionSubCommandGroup
- type SlashCommandResolved
- type SlashCommandUpdate
- type StageInstance
- type StageInstanceCreate
- type StageInstanceUpdate
- type StagePrivacyLevel
- type Sticker
- type StickerCreate
- type StickerFormatType
- type StickerPack
- type StickerPacks
- type StickerType
- type StickerUpdate
- type SystemChannelFlags
- type Team
- type TeamMember
- type TeamPermissions
- type TemplateGuild
- type TextInputComponent
- func (c TextInputComponent) ID() CustomID
- func (c TextInputComponent) MarshalJSON() ([]byte, error)
- func (TextInputComponent) Type() ComponentType
- func (c TextInputComponent) WithCustomID(customID CustomID) TextInputComponent
- func (c TextInputComponent) WithMaxLength(maxLength int) TextInputComponent
- func (c TextInputComponent) WithMinLength(minLength int) TextInputComponent
- func (c TextInputComponent) WithPlaceholder(placeholder string) TextInputComponent
- func (c TextInputComponent) WithRequired(required bool) TextInputComponent
- func (c TextInputComponent) WithStyle(style TextInputStyle) TextInputComponent
- func (c TextInputComponent) WithValue(value string) TextInputComponent
- type TextInputStyle
- type ThreadCreate
- type ThreadCreateFromMessage
- type ThreadMember
- type ThreadMemberFlags
- type ThreadMetadata
- type Timestamp
- type TimestampStyle
- type TokenType
- type TwitchIntegration
- type UnavailableGuild
- type UnmarshalApplicationCommand
- type UnmarshalApplicationCommandOption
- type UnmarshalApplicationCommandPermission
- type UnmarshalAutocompleteOption
- type UnmarshalChannel
- type UnmarshalComponent
- type UnmarshalIntegration
- type UnmarshalInteraction
- type UnmarshalPermissionOverwrite
- type UnmarshalSlashCommandOption
- type UnmarshalWebhook
- type User
- type UserCommand
- func (c UserCommand) ApplicationID() snowflake.ID
- func (c UserCommand) DMPermission() bool
- func (c UserCommand) DefaultMemberPermissions() Permissions
- func (c UserCommand) GuildID() *snowflake.ID
- func (c UserCommand) ID() snowflake.ID
- func (c UserCommand) MarshalJSON() ([]byte, error)
- func (c UserCommand) Name() string
- func (c UserCommand) NameLocalizations() map[Locale]string
- func (c UserCommand) NameLocalized() string
- func (c UserCommand) Type() ApplicationCommandType
- func (c *UserCommand) UnmarshalJSON(data []byte) error
- func (c UserCommand) Version() snowflake.ID
- type UserCommandCreate
- type UserCommandInteractionData
- func (d UserCommandInteractionData) CommandID() snowflake.ID
- func (d UserCommandInteractionData) CommandName() string
- func (d UserCommandInteractionData) GuildID() *snowflake.ID
- func (d *UserCommandInteractionData) MarshalJSON() ([]byte, error)
- func (d UserCommandInteractionData) TargetID() snowflake.ID
- func (d UserCommandInteractionData) TargetMember() ResolvedMember
- func (d UserCommandInteractionData) TargetUser() User
- func (UserCommandInteractionData) Type() ApplicationCommandType
- func (d *UserCommandInteractionData) UnmarshalJSON(data []byte) error
- type UserCommandResolved
- type UserCommandUpdate
- type UserFlags
- type UserVoiceStateUpdate
- type VerificationLevel
- type VideoQualityMode
- type VisibilityType
- type VoiceRegion
- type VoiceState
- type Webhook
- type WebhookCreate
- type WebhookMessageCreate
- type WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddActionRow(components ...InteractiveComponent) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddEmbeds(embeds ...Embed) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddFiles(files ...*File) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) AddFlags(flags ...MessageFlags) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) Build() WebhookMessageCreate
- func (b *WebhookMessageCreateBuilder) ClearAllowedMentions() *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) ClearContainerComponents() *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) ClearEmbeds() *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) ClearFiles() *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) ClearFlags() *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) RemoveContainerComponent(i int) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) RemoveEmbed(i int) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) RemoveFile(i int) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) RemoveFlags(flags ...MessageFlags) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetAvatarURL(url string) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetContent(content string) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetContentf(content string, a ...any) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetEmbed(i int, embed Embed) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetEmbeds(embeds ...Embed) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetFile(i int, file *File) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetFiles(files ...*File) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetFlags(flags MessageFlags) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetTTS(tts bool) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetThreadName(threadName string) *WebhookMessageCreateBuilder
- func (b *WebhookMessageCreateBuilder) SetUsername(username string) *WebhookMessageCreateBuilder
- type WebhookMessageUpdate
- type WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) AddActionRow(components ...InteractiveComponent) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) AddContainerComponents(containers ...ContainerComponent) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) AddEmbeds(embeds ...Embed) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) AddFiles(files ...*File) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) Build() WebhookMessageUpdate
- func (b *WebhookMessageUpdateBuilder) ClearAllowedMentions() *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) ClearContainerComponents() *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) ClearContent() *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) ClearEmbeds() *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) ClearFiles() *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) RemoveContainerComponent(i int) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) RemoveEmbed(i int) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) RemoveFile(i int) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) RetainAttachments(attachments ...Attachment) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) RetainAttachmentsByID(attachmentIDs ...snowflake.ID) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetContainerComponent(i int, container ContainerComponent) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetContent(content string) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetContentf(content string, a ...any) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetEmbed(i int, embed Embed) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetEmbeds(embeds ...Embed) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetFile(i int, file *File) *WebhookMessageUpdateBuilder
- func (b *WebhookMessageUpdateBuilder) SetFiles(files ...*File) *WebhookMessageUpdateBuilder
- type WebhookSourceChannel
- type WebhookSourceGuild
- type WebhookType
- type WebhookUpdate
- type WebhookUpdateWithToken
- type WelcomeScreen
- type YouTubeIntegration
Constants ¶
const ( ApplicationFlagGatewayPresence = 1 << (iota + 12) ApplicationFlagGatewayPresenceLimited ApplicationFlagGatewayGuildMembers ApplicationFlagGatewayGuildMemberLimited ApplicationFlagVerificationPendingGuildLimit ApplicationFlagEmbedded ApplicationFlagGatewayMessageContent ApplicationFlagGatewayMessageContentLimited ApplicationFlagApplicationCommandBadge )
const ( MembershipStateInvited = iota + 1 MembershipStateAccepted )
const ( ApplicationCommandTypeSlash = iota + 1 ApplicationCommandTypeUser ApplicationCommandTypeMessage )
const ( ApplicationCommandPermissionTypeRole = iota + 1 ApplicationCommandPermissionTypeUser ApplicationCommandPermissionTypeChannel )
types of ApplicationCommandPermissionType
const ( VideoQualityModeAuto = iota + 1 VideoQualityModeFull )
const ( ComponentTypeActionRow = iota + 1 ComponentTypeButton ComponentTypeSelectMenu ComponentTypeTextInput )
Supported ComponentType(s)
const ( ButtonStylePrimary = iota + 1 ButtonStyleSecondary ButtonStyleSuccess ButtonStyleDanger ButtonStyleLink )
Supported ButtonStyle(s)
const ( TextInputStyleShort = iota + 1 TextInputStyleParagraph )
const ( PermissionCreateInstantInvite Permissions = 1 << iota PermissionKickMembers PermissionBanMembers PermissionAdministrator PermissionManageChannels PermissionManageServer PermissionAddReactions PermissionViewAuditLogs PermissionViewChannel Permissions = 1 << (iota + 2) PermissionsAllText = PermissionViewChannel | PermissionSendMessages | PermissionSendTTSMessages | PermissionManageMessages | PermissionEmbedLinks | PermissionAttachFiles | PermissionReadMessageHistory | PermissionMentionEveryone PermissionsAllThread = PermissionManageThreads | PermissionCreatePublicThread | PermissionCreatePrivateThread | PermissionSendMessagesInThreads PermissionsAllVoice = PermissionViewChannel | PermissionVoiceConnect | PermissionVoiceSpeak | PermissionVoiceMuteMembers | PermissionVoiceDeafenMembers | PermissionVoiceMoveMembers | PermissionVoiceUseVAD | PermissionVoicePrioritySpeaker PermissionsAllChannel = PermissionsAllText | PermissionsAllThread | PermissionsAllVoice | PermissionCreateInstantInvite | PermissionManageRoles | PermissionManageChannels | PermissionAddReactions | PermissionViewAuditLogs PermissionsAll = PermissionsAllChannel | PermissionKickMembers | PermissionBanMembers | PermissionManageServer | PermissionAdministrator | PermissionManageWebhooks | PermissionManageEmojisAndStickers PermissionsStageModerator = PermissionManageChannels | PermissionVoiceMuteMembers | PermissionVoiceMoveMembers PermissionsNone Permissions = 0 )
Constants for the different bit offsets of general permissions
const CDN = "https://cdn.discordapp.com"
const ScopeSeparator = " "
const (
TeamPermissionAdmin = "*"
)
Variables ¶
var ( CustomEmoji = NewCDN("/emojis/{emote.id}", ImageFormatPNG, ImageFormatGIF) GuildIcon = NewCDN("/icons/{guild.id}/{guild.icon.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP, ImageFormatGIF) GuildSplash = NewCDN("/splashes/{guild.id}/{guild.splash.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) GuildDiscoverySplash = NewCDN("/discovery-splashes/{guild.id}/{guild.discovery.splash.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) GuildBanner = NewCDN("/banners/{guild.id}/{guild.banner.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP, ImageFormatGIF) RoleIcon = NewCDN("/role-icons/{role.id}/{role.icon.hash}", ImageFormatPNG, ImageFormatJPEG) UserBanner = NewCDN("/banners/{user.id}/{user.banner.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP, ImageFormatGIF) UserAvatar = NewCDN("/avatars/{user.id}/{user.avatar.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP, ImageFormatGIF) DefaultUserAvatar = NewCDN("/embed/avatars/{user.discriminator%5}", ImageFormatPNG) ChannelIcon = NewCDN("/channel-icons/{channel.id}/{channel.icon.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) MemberAvatar = NewCDN("/guilds/{guild.id}/users/{user.id}/avatars/{member.avatar.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP, ImageFormatGIF) ApplicationIcon = NewCDN("/app-icons/{application.id}/{icon.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) ApplicationCover = NewCDN("/app-assets/{application.id}/{cover.image.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) ApplicationAsset = NewCDN("/app-assets/{application.id}/{asset.id}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) AchievementIcon = NewCDN("/app-assets/{application.id}/achievements/{achievement.id}/icons/{icon.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) TeamIcon = NewCDN("/team-icons/{team.id}/{team.icon.hash}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) StickerPackBanner = NewCDN("app-assets/710982414301790216/store/{banner.asset.id}", ImageFormatPNG, ImageFormatJPEG, ImageFormatWebP) CustomSticker = NewCDN("/stickers/{sticker.id}", ImageFormatPNG, ImageFormatLottie) AttachmentFile = NewCDN("/attachments/{channel.id}/{attachment.id}/{file.name}", ImageFormatNone) )
var ( ErrNoGatewayOrShardManager = errors.New("no gateway or shard manager configured") ErrNoGuildMembersIntent = errors.New("this operation requires the GUILD_MEMBERS intent") ErrNoShardManager = errors.New("no shard manager configured") ErrNoGateway = errors.New("no gateway configured") ErrGatewayAlreadyConnected = errors.New("gateway is already connected") ErrShardNotConnected = errors.New("shard is not connected") ErrShardNotFound = errors.New("shard not found in shard manager") ErrGatewayCompressedData = errors.New("disgo does not currently support compressed gateway data") ErrNoHTTPServer = errors.New("no http server configured") ErrNoDisgoInstance = errors.New("no disgo instance injected") ErrInvalidBotToken = errors.New("token is not in a valid format") ErrNoBotToken = errors.New("please specify the token") ErrSelfDM = errors.New("can't open a dm channel to yourself") ErrInteractionAlreadyReplied = errors.New("you already replied to this interaction") ErrInteractionExpired = errors.New("this interaction has expired") ErrChannelNotTypeNews = errors.New("channel type is not 'NEWS'") ErrCheckFailed = errors.New("check failed") ErrMemberMustBeConnectedToChannel = errors.New("the member must be connected to the channel") ErrStickerTypeGuild = errors.New("sticker type must be of type StickerTypeGuild") )
var ( MentionTypeUser = MentionType{regexp.MustCompile(`<@!?(\d+)>`)} MentionTypeRole = MentionType{regexp.MustCompile(`<@&(\d+)>`)} MentionTypeChannel = MentionType{regexp.MustCompile(`<#(\d+)>`)} MentionTypeEmoji = MentionType{regexp.MustCompile(`<a?:(\w+):(\d+)>`)} MentionTypeTimestamp = MentionType{regexp.MustCompile(`<t:(?P<time>-?\d{1,17})(?::(?P<format>[tTdDfFR]))?>`)} MentionTypeHere = MentionType{regexp.MustCompile(`@here`)} MentionTypeEveryone = MentionType{regexp.MustCompile(`@everyone`)} )
var DefaultAllowedMentions = AllowedMentions{ Parse: []AllowedMentionType{AllowedMentionTypeUsers, AllowedMentionTypeRoles, AllowedMentionTypeEveryone}, Roles: []snowflake.ID{}, Users: []snowflake.ID{}, RepliedUser: true, }
DefaultAllowedMentions gives you the default AllowedMentions for a Message
var ErrNoTimestampMatch = errors.New("no matching timestamp found in string")
ErrNoTimestampMatch is returned when no valid Timestamp is found in the Message
var Locales = map[Locale]string{ LocaleEnglishUS: "English (United States)", LocaleEnglishGB: "English (Great Britain)", LocaleBulgarian: "Bulgarian", LocaleChineseCN: "Chinese (China)", LocaleChineseTW: "Chinese (Taiwan)", LocaleCroatian: "Croatian", LocaleCzech: "Czech", LocaleDanish: "Danish", LocaleDutch: "Dutch", LocaleFinnish: "Finnish", LocaleFrench: "French", LocaleGerman: "German", LocaleGreek: "Greek", LocaleHindi: "Hindi", LocaleHungarian: "Hungarian", LocaleItalian: "Italian", LocaleJapanese: "Japanese", LocaleKorean: "Korean", LocaleLithuanian: "Lithuanian", LocaleNorwegian: "Norwegian", LocalePolish: "Polish", LocalePortugueseBR: "Portuguese (Brazil)", LocaleRomanian: "Romanian", LocaleRussian: "Russian", LocaleSpanishES: "Spanish (Spain)", LocaleSwedish: "Swedish", LocaleThai: "Thai", LocaleTurkish: "Turkish", LocaleUkrainian: "Ukrainian", LocaleVietnamese: "Vietnamese", LocaleUnknown: "unknown", }
Functions ¶
func AllGuildChannels ¶ added in v0.10.2
func AllGuildChannels(guildID snowflake.ID) snowflake.ID
func AnimatedEmojiMention ¶
func AuthorizeURL ¶ added in v0.13.11
func AuthorizeURL(values QueryValues) string
AuthorizeURL returns the OAuth2 authorize url with the given query params
func ChannelMention ¶
func ChannelMention(id snowflake.ID) string
func EmojiMention ¶
func FormattedTimestampMention ¶
func FormattedTimestampMention(timestamp int64, style TimestampStyle) string
func HasScope ¶
func HasScope(scope OAuth2Scope, scopes ...OAuth2Scope) bool
func JoinScopes ¶
func JoinScopes(scopes []OAuth2Scope) string
func RoleMention ¶
func RoleMention(id snowflake.ID) string
func TimestampMention ¶
func UserMention ¶
func UserMention(id snowflake.ID) string
func WebhookURL ¶ added in v0.13.11
WebhookURL returns the url over which the webhook can be called
Types ¶
type AccessTokenResponse ¶ added in v0.12.0
type AccessTokenResponse struct { AccessToken string `json:"access_token"` TokenType TokenType `json:"token_type"` ExpiresIn time.Duration `json:"expires_in"` RefreshToken string `json:"refresh_token"` Scope []OAuth2Scope `json:"scope"` // Webhook is only present if scopes include the OAuth2ScopeWebhookIncoming Webhook *IncomingWebhook `json:"webhook"` }
AccessTokenResponse is the response from the OAuth2 exchange endpoint. See https://discord.com/developers/docs/topics/oauth2#authorization-code-grant for more information.
func (AccessTokenResponse) MarshalJSON ¶ added in v0.12.0
func (e AccessTokenResponse) MarshalJSON() ([]byte, error)
func (*AccessTokenResponse) UnmarshalJSON ¶ added in v0.12.0
func (e *AccessTokenResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ActionRowComponent ¶
type ActionRowComponent []InteractiveComponent
func NewActionRow ¶
func NewActionRow(components ...InteractiveComponent) ActionRowComponent
func (ActionRowComponent) AddComponents ¶
func (c ActionRowComponent) AddComponents(components ...InteractiveComponent) ActionRowComponent
AddComponents returns a new ActionRowComponent with the provided Component(s) added
func (ActionRowComponent) Buttons ¶
func (c ActionRowComponent) Buttons() []ButtonComponent
Buttons returns all ButtonComponent(s) in the ActionRowComponent
func (ActionRowComponent) Components ¶
func (c ActionRowComponent) Components() []InteractiveComponent
func (ActionRowComponent) MarshalJSON ¶
func (c ActionRowComponent) MarshalJSON() ([]byte, error)
func (ActionRowComponent) RemoveComponent ¶
func (c ActionRowComponent) RemoveComponent(index int) ActionRowComponent
RemoveComponent returns a new ActionRowComponent with the provided Component at the index removed
func (ActionRowComponent) SelectMenus ¶
func (c ActionRowComponent) SelectMenus() []SelectMenuComponent
SelectMenus returns all SelectMenuComponent(s) in the ActionRowComponent
func (ActionRowComponent) TextInputs ¶ added in v0.12.1
func (c ActionRowComponent) TextInputs() []TextInputComponent
TextInputs returns all TextInputComponent(s) in the ActionRowComponent
func (ActionRowComponent) Type ¶
func (ActionRowComponent) Type() ComponentType
func (*ActionRowComponent) UnmarshalJSON ¶
func (c *ActionRowComponent) UnmarshalJSON(data []byte) error
func (ActionRowComponent) UpdateComponent ¶
func (c ActionRowComponent) UpdateComponent(customID CustomID, component InteractiveComponent) ActionRowComponent
UpdateComponent returns a new ActionRowComponent with the Component which has the customID replaced
type Activity ¶
type Activity struct { ID string `json:"id"` Name string `json:"name"` Type ActivityType `json:"type"` URL *string `json:"url"` CreatedAt int64 `json:"created_at"` Timestamps *ActivityTimestamps `json:"timestamps,omitempty"` ApplicationID snowflake.ID `json:"application_id,omitempty"` Details *string `json:"details,omitempty"` State *string `json:"state,omitempty"` Emoji *ActivityEmoji `json:"emoji,omitempty"` Party *ActivityParty `json:"party,omitempty"` Assets *ActivityAssets `json:"assets,omitempty"` Secrets *ActivitySecrets `json:"secrets,omitempty"` Instance *bool `json:"instance,omitempty"` Flags ActivityFlags `json:"flags,omitempty"` Buttons []string `json:"buttons"` }
Activity represents the fields of a user's presence
type ActivityAssets ¶
type ActivityAssets struct { LargeImage string `json:"large_image,omitempty"` LargeText string `json:"large_text,omitempty"` SmallImage string `json:"small_image,omitempty"` SmallText string `json:"small_text,omitempty"` }
ActivityAssets are the images for the presence and hover texts
type ActivityButton ¶
ActivityButton is a button in an activity
type ActivityEmoji ¶
type ActivityEmoji struct { Name string `json:"name"` ID *snowflake.ID `json:"id,omitempty"` Animated *bool `json:"animated,omitempty"` }
ActivityEmoji is an Emoji object for an Activity
type ActivityFlags ¶ added in v0.12.0
type ActivityFlags int
ActivityFlags add additional information to an activity
const ( ActivityFlagInstance ActivityFlags = 1 << iota ActivityFlagJoin ActivityFlagSpectate ActivityFlagJoinRequest ActivityFlagSync ActivityFlagPlay ActivityFlagPartyPrivacyFriends ActivityFlagPartyPrivacyVoiceChannel ActivityFlagEmbedded )
Discord's supported ActivityFlags
type ActivityParty ¶
ActivityParty is information about the party of the player
type ActivitySecrets ¶
type ActivitySecrets struct { Join string `json:"join,omitempty"` Spectate string `json:"spectate,omitempty"` Match string `json:"match,omitempty"` }
ActivitySecrets contain secrets for Rich Presence joining and spectating
type ActivityTimestamps ¶
type ActivityTimestamps struct { Start int64 `json:"start,omitempty"` End int64 `json:"end,omitempty"` }
ActivityTimestamps represents when a user started and ended their activity
type ActivityType ¶
type ActivityType int
ActivityType represents the status of a user, one of Game, Streaming, Listening, Watching, Custom or Competing
const ( ActivityTypeGame ActivityType = iota ActivityTypeStreaming ActivityTypeListening ActivityTypeWatching ActivityTypeCustom ActivityTypeCompeting )
Constants for Activity(s)
type AddBan ¶
type AddBan struct {
DeleteMessageDays int `json:"delete_message_days,omitempty"`
}
AddBan is used to ban a User (https://discord.com/developers/docs/resources/guild#create-guild-ban-json-params)
type AllowedMentionType ¶
type AllowedMentionType string
AllowedMentionType ?
const ( AllowedMentionTypeRoles AllowedMentionType = "roles" AllowedMentionTypeUsers AllowedMentionType = "users" AllowedMentionTypeEveryone AllowedMentionType = "everyone" )
All AllowedMentionType(s)
type AllowedMentions ¶
type AllowedMentions struct { Parse []AllowedMentionType `json:"parse"` Roles []snowflake.ID `json:"roles"` Users []snowflake.ID `json:"users"` RepliedUser bool `json:"replied_user"` }
AllowedMentions are used for avoiding mentioning users in Message and Interaction
type Application ¶
type Application struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Icon *string `json:"icon,omitempty"` Description string `json:"description"` RPCOrigins []string `json:"rpc_origins"` BotPublic bool `json:"bot_public"` BotRequireCodeGrant bool `json:"bot_require_code_grant"` TermsOfServiceURL *string `json:"terms_of_service_url,omitempty"` PrivacyPolicyURL *string `json:"privacy_policy_url,omitempty"` CustomInstallationURL *string `json:"custom_install_url,omitempty"` InstallationParams *InstallationParams `json:"install_params"` Tags []string `json:"tags"` Owner *User `json:"owner,omitempty"` Summary string `json:"summary"` VerifyKey string `json:"verify_key"` Team *Team `json:"team,omitempty"` GuildID *snowflake.ID `json:"guild_id,omitempty"` PrimarySkuID *snowflake.ID `json:"primary_sku_id,omitempty"` Slug *string `json:"slug,omitempty"` Cover *string `json:"cover_image,omitempty"` Flags ApplicationFlags `json:"flags,omitempty"` }
func (Application) CoverURL ¶
func (a Application) CoverURL(opts ...CDNOpt) *string
func (Application) IconURL ¶
func (a Application) IconURL(opts ...CDNOpt) *string
type ApplicationCommand ¶
type ApplicationCommand interface { json.Marshaler ID() snowflake.ID Type() ApplicationCommandType ApplicationID() snowflake.ID GuildID() *snowflake.ID Name() string NameLocalizations() map[Locale]string NameLocalized() string DefaultMemberPermissions() Permissions DMPermission() bool Version() snowflake.ID // contains filtered or unexported methods }
type ApplicationCommandCreate ¶
type ApplicationCommandCreate interface { json.Marshaler Type() ApplicationCommandType CommandName() string // contains filtered or unexported methods }
type ApplicationCommandInteraction ¶
type ApplicationCommandInteraction struct { BaseInteraction Data ApplicationCommandInteractionData `json:"data"` }
func (ApplicationCommandInteraction) MessageCommandInteractionData ¶
func (i ApplicationCommandInteraction) MessageCommandInteractionData() MessageCommandInteractionData
func (ApplicationCommandInteraction) SlashCommandInteractionData ¶
func (i ApplicationCommandInteraction) SlashCommandInteractionData() SlashCommandInteractionData
func (ApplicationCommandInteraction) Type ¶
func (ApplicationCommandInteraction) Type() InteractionType
func (*ApplicationCommandInteraction) UnmarshalJSON ¶
func (i *ApplicationCommandInteraction) UnmarshalJSON(data []byte) error
func (ApplicationCommandInteraction) UserCommandInteractionData ¶
func (i ApplicationCommandInteraction) UserCommandInteractionData() UserCommandInteractionData
type ApplicationCommandInteractionData ¶
type ApplicationCommandInteractionData interface { Type() ApplicationCommandType CommandID() snowflake.ID CommandName() string GuildID() *snowflake.ID // contains filtered or unexported methods }
type ApplicationCommandOption ¶
type ApplicationCommandOption interface { json.Marshaler Type() ApplicationCommandOptionType OptionName() string // contains filtered or unexported methods }
type ApplicationCommandOptionAttachment ¶
type ApplicationCommandOptionAttachment struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` }
func (ApplicationCommandOptionAttachment) MarshalJSON ¶
func (o ApplicationCommandOptionAttachment) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionAttachment) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionAttachment) OptionName() string
type ApplicationCommandOptionBool ¶
type ApplicationCommandOptionBool struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` }
func (ApplicationCommandOptionBool) MarshalJSON ¶
func (o ApplicationCommandOptionBool) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionBool) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionBool) OptionName() string
func (ApplicationCommandOptionBool) Type ¶
func (ApplicationCommandOptionBool) Type() ApplicationCommandOptionType
type ApplicationCommandOptionChannel ¶
type ApplicationCommandOptionChannel struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` ChannelTypes []ChannelType `json:"channel_types,omitempty"` }
func (ApplicationCommandOptionChannel) MarshalJSON ¶
func (o ApplicationCommandOptionChannel) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionChannel) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionChannel) OptionName() string
func (ApplicationCommandOptionChannel) Type ¶
func (ApplicationCommandOptionChannel) Type() ApplicationCommandOptionType
type ApplicationCommandOptionChoice ¶
type ApplicationCommandOptionChoice interface {
// contains filtered or unexported methods
}
type ApplicationCommandOptionFloat ¶
type ApplicationCommandOptionFloat struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` Choices []ApplicationCommandOptionChoiceFloat `json:"choices,omitempty"` Autocomplete bool `json:"autocomplete,omitempty"` MinValue *float64 `json:"min_value,omitempty"` MaxValue *float64 `json:"max_value,omitempty"` }
func (ApplicationCommandOptionFloat) MarshalJSON ¶
func (o ApplicationCommandOptionFloat) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionFloat) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionFloat) OptionName() string
func (ApplicationCommandOptionFloat) Type ¶
func (ApplicationCommandOptionFloat) Type() ApplicationCommandOptionType
type ApplicationCommandOptionInt ¶
type ApplicationCommandOptionInt struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` Choices []ApplicationCommandOptionChoiceInt `json:"choices,omitempty"` Autocomplete bool `json:"autocomplete,omitempty"` MinValue *int `json:"min_value,omitempty"` MaxValue *int `json:"max_value,omitempty"` }
func (ApplicationCommandOptionInt) MarshalJSON ¶
func (o ApplicationCommandOptionInt) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionInt) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionInt) OptionName() string
func (ApplicationCommandOptionInt) Type ¶
func (ApplicationCommandOptionInt) Type() ApplicationCommandOptionType
type ApplicationCommandOptionMentionable ¶
type ApplicationCommandOptionMentionable struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` }
func (ApplicationCommandOptionMentionable) MarshalJSON ¶
func (o ApplicationCommandOptionMentionable) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionMentionable) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionMentionable) OptionName() string
type ApplicationCommandOptionRole ¶
type ApplicationCommandOptionRole struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` }
func (ApplicationCommandOptionRole) MarshalJSON ¶
func (o ApplicationCommandOptionRole) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionRole) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionRole) OptionName() string
func (ApplicationCommandOptionRole) Type ¶
func (ApplicationCommandOptionRole) Type() ApplicationCommandOptionType
type ApplicationCommandOptionString ¶
type ApplicationCommandOptionString struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` Choices []ApplicationCommandOptionChoiceString `json:"choices,omitempty"` Autocomplete bool `json:"autocomplete,omitempty"` MinLength *int `json:"min_length,omitempty"` MaxLength *int `json:"max_length,omitempty"` }
func (ApplicationCommandOptionString) MarshalJSON ¶
func (o ApplicationCommandOptionString) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionString) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionString) OptionName() string
func (ApplicationCommandOptionString) Type ¶
func (ApplicationCommandOptionString) Type() ApplicationCommandOptionType
type ApplicationCommandOptionSubCommand ¶
type ApplicationCommandOptionSubCommand struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Options []ApplicationCommandOption `json:"options,omitempty"` }
func (ApplicationCommandOptionSubCommand) MarshalJSON ¶
func (o ApplicationCommandOptionSubCommand) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionSubCommand) OptionName ¶ added in v0.13.9
func (o ApplicationCommandOptionSubCommand) OptionName() string
func (*ApplicationCommandOptionSubCommand) UnmarshalJSON ¶
func (o *ApplicationCommandOptionSubCommand) UnmarshalJSON(data []byte) error
type ApplicationCommandOptionSubCommandGroup ¶
type ApplicationCommandOptionSubCommandGroup struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Options []ApplicationCommandOptionSubCommand `json:"options,omitempty"` }
func (ApplicationCommandOptionSubCommandGroup) MarshalJSON ¶
func (o ApplicationCommandOptionSubCommandGroup) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionSubCommandGroup) OptionName ¶ added in v0.13.9
func (o ApplicationCommandOptionSubCommandGroup) OptionName() string
type ApplicationCommandOptionType ¶
type ApplicationCommandOptionType int
ApplicationCommandOptionType specifies the type of the arguments used in ApplicationCommand.Options
const ( ApplicationCommandOptionTypeSubCommand ApplicationCommandOptionType = iota + 1 ApplicationCommandOptionTypeSubCommandGroup ApplicationCommandOptionTypeString ApplicationCommandOptionTypeInt ApplicationCommandOptionTypeBool ApplicationCommandOptionTypeUser ApplicationCommandOptionTypeChannel ApplicationCommandOptionTypeRole ApplicationCommandOptionTypeMentionable ApplicationCommandOptionTypeFloat ApplicationCommandOptionTypeAttachment )
Constants for each slash command option type
type ApplicationCommandOptionUser ¶
type ApplicationCommandOptionUser struct { Name string `json:"name"` NameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Required bool `json:"required,omitempty"` }
func (ApplicationCommandOptionUser) MarshalJSON ¶
func (o ApplicationCommandOptionUser) MarshalJSON() ([]byte, error)
func (ApplicationCommandOptionUser) OptionName ¶ added in v0.13.0
func (o ApplicationCommandOptionUser) OptionName() string
func (ApplicationCommandOptionUser) Type ¶
func (ApplicationCommandOptionUser) Type() ApplicationCommandOptionType
type ApplicationCommandPermission ¶
type ApplicationCommandPermission interface { json.Marshaler Type() ApplicationCommandPermissionType ID() snowflake.ID // contains filtered or unexported methods }
ApplicationCommandPermission holds a User or Role and if they are allowed to use the ApplicationCommand
type ApplicationCommandPermissionChannel ¶ added in v0.10.0
type ApplicationCommandPermissionChannel struct { ChannelID snowflake.ID `json:"id"` Permission bool `json:"permission"` }
func (ApplicationCommandPermissionChannel) ID ¶ added in v0.10.0
func (p ApplicationCommandPermissionChannel) ID() snowflake.ID
func (ApplicationCommandPermissionChannel) MarshalJSON ¶ added in v0.10.0
func (p ApplicationCommandPermissionChannel) MarshalJSON() ([]byte, error)
type ApplicationCommandPermissionRole ¶
type ApplicationCommandPermissionRole struct { RoleID snowflake.ID `json:"id"` Permission bool `json:"permission"` }
func (ApplicationCommandPermissionRole) ID ¶
func (p ApplicationCommandPermissionRole) ID() snowflake.ID
func (ApplicationCommandPermissionRole) MarshalJSON ¶
func (p ApplicationCommandPermissionRole) MarshalJSON() ([]byte, error)
type ApplicationCommandPermissionType ¶
type ApplicationCommandPermissionType int
ApplicationCommandPermissionType is the type of the ApplicationCommandPermission
type ApplicationCommandPermissionUser ¶
type ApplicationCommandPermissionUser struct { UserID snowflake.ID `json:"id"` Permission bool `json:"permission"` }
func (ApplicationCommandPermissionUser) ID ¶
func (p ApplicationCommandPermissionUser) ID() snowflake.ID
func (ApplicationCommandPermissionUser) MarshalJSON ¶
func (p ApplicationCommandPermissionUser) MarshalJSON() ([]byte, error)
type ApplicationCommandPermissions ¶
type ApplicationCommandPermissions struct { ID snowflake.ID `json:"id"` ApplicationID snowflake.ID `json:"application_id"` GuildID snowflake.ID `json:"guild_id"` Permissions []ApplicationCommandPermission `json:"permissions"` }
ApplicationCommandPermissions holds all permissions for an ApplicationCommand
func (*ApplicationCommandPermissions) UnmarshalJSON ¶
func (p *ApplicationCommandPermissions) UnmarshalJSON(data []byte) error
type ApplicationCommandPermissionsSet ¶
type ApplicationCommandPermissionsSet struct { ID snowflake.ID `json:"id,omitempty"` Permissions []ApplicationCommandPermission `json:"permissions"` }
ApplicationCommandPermissionsSet is used to bulk overwrite all ApplicationCommandPermissions
type ApplicationCommandType ¶
type ApplicationCommandType int
type ApplicationCommandUpdate ¶
type ApplicationCommandUpdate interface { json.Marshaler Type() ApplicationCommandType CommandName() *string // contains filtered or unexported methods }
type ApplicationFlags ¶
type ApplicationFlags int
ApplicationFlags (https://discord.com/developers/docs/resources/application#application-object-application-flags)
func (ApplicationFlags) Add ¶
func (f ApplicationFlags) Add(bits ...ApplicationFlags) ApplicationFlags
Add allows you to add multiple bits together, producing a new bit
func (ApplicationFlags) Has ¶
func (f ApplicationFlags) Has(bits ...ApplicationFlags) bool
Has will ensure that the bit includes all the bits entered
func (ApplicationFlags) Missing ¶
func (f ApplicationFlags) Missing(bits ...ApplicationFlags) bool
Missing will check whether the bit is missing any one of the bits
func (ApplicationFlags) Remove ¶
func (f ApplicationFlags) Remove(bits ...ApplicationFlags) ApplicationFlags
Remove allows you to subtract multiple bits from the first, producing a new bit
type ApplicationWebhook ¶
type ApplicationWebhook struct { ApplicationID snowflake.ID // contains filtered or unexported fields }
func (ApplicationWebhook) Avatar ¶
func (w ApplicationWebhook) Avatar() *string
func (ApplicationWebhook) AvatarURL ¶
func (w ApplicationWebhook) AvatarURL(opts ...CDNOpt) *string
func (ApplicationWebhook) DefaultAvatarURL ¶
func (w ApplicationWebhook) DefaultAvatarURL(opts ...CDNOpt) string
func (ApplicationWebhook) EffectiveAvatarURL ¶
func (w ApplicationWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
func (ApplicationWebhook) ID ¶
func (w ApplicationWebhook) ID() snowflake.ID
func (ApplicationWebhook) MarshalJSON ¶
func (w ApplicationWebhook) MarshalJSON() ([]byte, error)
func (ApplicationWebhook) Name ¶
func (w ApplicationWebhook) Name() string
func (ApplicationWebhook) Type ¶
func (ApplicationWebhook) Type() WebhookType
func (*ApplicationWebhook) UnmarshalJSON ¶
func (w *ApplicationWebhook) UnmarshalJSON(data []byte) error
type Attachment ¶
type Attachment struct { ID snowflake.ID `json:"id,omitempty"` Filename string `json:"filename,omitempty"` Description *string `json:"description,omitempty"` ContentType *string `json:"content_type,omitempty"` Size int `json:"size,omitempty"` URL string `json:"url,omitempty"` ProxyURL string `json:"proxy_url,omitempty"` Height *int `json:"height,omitempty"` Width *int `json:"width,omitempty"` Ephemeral bool `json:"ephemeral,omitempty"` }
Attachment is used for files sent in a Message
type AttachmentCreate ¶
type AttachmentKeep ¶
type AttachmentKeep struct {
ID snowflake.ID `json:"id,omitempty"`
}
type AttachmentUpdate ¶
type AttachmentUpdate interface {
// contains filtered or unexported methods
}
type AuditLog ¶
type AuditLog struct { Entries []AuditLogEntry `json:"entries"` GuildScheduledEvents []GuildScheduledEvent `json:"guild_scheduled_events"` Integrations []Integration `json:"integrations"` Threads []GuildThread `json:"threads"` Users []User `json:"users"` Webhooks []Webhook `json:"webhooks"` }
AuditLog (https://discord.com/developers/docs/resources/audit-log) These are logs of events that occurred, accessible via the Discord
func (*AuditLog) UnmarshalJSON ¶
type AuditLogChangeKey ¶
type AuditLogChangeKey struct { Name *string `json:"name"` Description *string `json:"description"` IconHash *string `json:"icon_hash"` SplashHash *string `json:"splash_hash"` DiscoverySplashHash *string `json:"discovery_splash_hash"` BannerHash *string `json:"banner_hash"` OwnerID *snowflake.ID `json:"owner_id"` Region *string `json:"region"` PreferredLocale *string `json:"preferred_locale"` AFKChannelID *snowflake.ID `json:"afk_channel_id"` AFKTimeout *int `json:"afk_timeout"` RulesChannelID *snowflake.ID `json:"rules_channel_id"` PublicUpdatesChannelID *snowflake.ID `json:"public_updates_channel_id"` MFALevel *MFALevel `json:"mfa_level"` VerificationLevel *VerificationLevel `json:"verification_level"` ExplicitContentFilterLevel *ExplicitContentFilterLevel `json:"explicit_content_filter"` DefaultMessageNotifications *MessageNotificationsLevel `json:"default_message_notifications"` VanityURLCode *string `json:"vanity_url_code"` Add []PartialRole `json:"$add"` Remove []PartialRole `json:"$remove"` PruneDeleteDays *int `json:"prune_delete_days"` WidgetEnabled *bool `json:"widget_enabled"` WidgetChannelID *string `json:"widget_channel_id"` SystemChannelID *string `json:"system_channel_id"` Position *int `json:"position"` Topic *string `json:"topic"` Bitrate *int `json:"bitrate"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"` NSFW *bool `json:"nsfw"` ApplicationID *snowflake.ID `json:"application_id"` RateLimitPerUser *int `json:"ratelimit_per_user"` Permissions *string `json:"permissions"` Color *int `json:"color"` Hoist *bool `json:"hoist"` Mentionable *bool `json:"mentionable"` Allow *Permissions `json:"allow"` Deny *Permissions `json:"deny"` Code *string `json:"code"` ChannelID *snowflake.ID `json:"channel_id"` InviterID *snowflake.ID `json:"inviter_id"` MaxUses *int `json:"max_uses"` Uses *int `json:"uses"` MaxAge *string `json:"max_age"` Temporary *bool `json:"temporary"` Deaf *bool `json:"deaf"` Mute *bool `json:"mute"` Nick *string `json:"nick"` AvatarHash *string `json:"avatar_hash"` ID *snowflake.ID `json:"id"` Type any `json:"type"` EnableEmoticons *bool `json:"enable_emoticons"` ExpireBehavior *int `json:"expire_behavior"` ExpireGracePeriod *int `json:"expire_grace_period"` UserLimit *int `json:"user_limit"` PrivacyLevel *StagePrivacyLevel `json:"privacy_level"` }
AuditLogChangeKey (https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-key) is data representing changes values/settings in an audit log.
type AuditLogEntry ¶
type AuditLogEntry struct { TargetID *snowflake.ID `json:"target_id"` Changes []AuditLogChangeKey `json:"changes"` UserID snowflake.ID `json:"user_id"` ID snowflake.ID `json:"id"` ActionType AuditLogEvent `json:"action_type"` Options *OptionalAuditLogEntryInfo `json:"options"` Reason *string `json:"reason"` }
AuditLogEntry (https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object)
type AuditLogEvent ¶
type AuditLogEvent int
AuditLogEvent is an 8-bit unsigned integer representing an audit log event.
const ( AuditLogEventChannelCreate AuditLogEvent = iota + 10 AuditLogEventChannelUpdate AuditLogEventChannelDelete AuditLogEventChannelOverwriteCreate AuditLogEventChannelOverwriteUpdate AuditLogEventChannelOverwriteDelete )
AuditLogEventChannelCreate
const ( AuditLogEventMemberKick AuditLogEvent = iota + 20 AuditLogEventMemberPrune AuditLogEventMemberBanAdd AuditLogEventMemberBanRemove AuditLogEventMemberUpdate AuditLogEventMemberRoleUpdate AuditLogEventMemberMove AuditLogEventMemberDisconnect AuditLogEventBotAdd )
AuditLogEventMemberKick
const ( AuditLogEventRoleCreate AuditLogEvent = iota + 30 AuditLogEventRoleUpdate AuditLogEventRoleDelete )
AuditLogEventRoleCreate
const ( AuditLogEventInviteCreate AuditLogEvent = iota + 40 AuditLogEventInviteUpdate AuditLogEventInviteDelete )
AuditLogEventInviteCreate
const ( AuditLogEventWebhookCreate AuditLogEvent = iota + 50 AuditLogEventWebhookUpdate AuditLogEventWebhookDelete )
AuditLogEventWebhookCreate
const ( AuditLogEventEmojiCreate AuditLogEvent = iota + 60 AuditLogEventEmojiUpdate AuditLogEventEmojiDelete )
AuditLogEventEmojiCreate
const ( AuditLogEventMessageDelete AuditLogEvent = iota + 72 AuditLogEventMessageBulkDelete AuditLogEventMessagePin AuditLogEventMessageUnpin )
AuditLogEventMessageDelete
const ( AuditLogEventIntegrationCreate AuditLogEvent = iota + 80 AuditLogEventIntegrationUpdate AuditLogEventIntegrationDelete AuditLogEventStageInstanceCreate AuditLogEventStageInstanceUpdate AuditLogEventStageInstanceDelete )
AuditLogEventIntegrationCreate
const ( AuditLogEventStickerCreate AuditLogEvent = iota + 90 AuditLogEventStickerUpdate AuditLogEventStickerDelete )
AuditLogEventStickerCreate
const ( AuditLogGuildScheduledEventCreate AuditLogEvent = iota + 100 AuditLogGuildScheduledEventUpdate AuditLogGuildScheduledEventDelete )
AuditLogGuildScheduledEventCreate
const ( AuditLogThreadCreate AuditLogEvent = iota + 100 AuditLogThreadUpdate AuditLogThreadDelete )
AuditLogThreadCreate
const (
AuditLogEventGuildUpdate AuditLogEvent = 1
)
AuditLogEventGuildUpdate ...
type AuthorizationInformation ¶
type AuthorizationInformation struct { Application Application `json:"application"` Scopes []OAuth2Scope `json:"scopes"` Expires time.Time `json:"expires"` User *User `json:"user"` }
type AutoArchiveDuration ¶
type AutoArchiveDuration int
const ( AutoArchiveDuration1h AutoArchiveDuration = 60 AutoArchiveDuration24h AutoArchiveDuration = 1440 AutoArchiveDuration3d AutoArchiveDuration = 4320 AutoArchiveDuration1w AutoArchiveDuration = 10080 )
type AutoModerationAction ¶ added in v0.12.7
type AutoModerationAction struct { Type AutoModerationActionType `json:"type"` Metadata *AutoModerationActionMetadata `json:"metadata,omitempty"` }
type AutoModerationActionMetadata ¶ added in v0.12.7
type AutoModerationActionMetadata struct { ChannelID snowflake.ID `json:"channel_id"` DurationSeconds int `json:"duration_seconds"` }
type AutoModerationActionType ¶ added in v0.12.7
type AutoModerationActionType int
const ( AutoModerationActionTypeBlockMessage AutoModerationActionType = iota + 1 AutoModerationActionTypeSendAlertMessage AutoModerationActionTypeTimeout )
type AutoModerationEventType ¶ added in v0.12.7
type AutoModerationEventType int
const (
AutoModerationEventTypeMessageSend AutoModerationEventType = iota + 1
)
type AutoModerationKeywordPreset ¶ added in v0.12.7
type AutoModerationKeywordPreset int
const ( AutoModerationKeywordPresetProfanity AutoModerationKeywordPreset = iota + 1 AutoModerationKeywordPresetSexualContent AutoModerationKeywordPresetSlurs )
type AutoModerationRule ¶ added in v0.12.7
type AutoModerationRule struct { ID snowflake.ID `json:"id"` GuildID snowflake.ID `json:"guild_id"` Name string `json:"name"` CreatorID snowflake.ID `json:"creator_id"` EventType AutoModerationEventType `json:"event_type"` TriggerType AutoModerationTriggerType `json:"trigger_type"` TriggerMetadata AutoModerationTriggerMetadata `json:"trigger_metadata"` Actions []AutoModerationAction `json:"actions"` Enabled bool `json:"enabled"` ExemptRoles []snowflake.ID `json:"exempt_roles"` ExemptChannels []snowflake.ID `json:"exempt_channels"` }
type AutoModerationRuleCreate ¶ added in v0.12.7
type AutoModerationRuleCreate struct { Name string `json:"name"` EventType AutoModerationEventType `json:"event_type"` TriggerType AutoModerationTriggerType `json:"trigger_type"` TriggerMetadata *AutoModerationTriggerMetadata `json:"trigger_metadata,omitempty"` Actions []AutoModerationAction `json:"actions"` Enabled bool `json:"enabled,omitempty"` ExemptRoles []snowflake.ID `json:"exempt_roles,omitempty"` ExemptChannels []snowflake.ID `json:"exempt_channels,omitempty"` }
type AutoModerationRuleUpdate ¶ added in v0.12.7
type AutoModerationRuleUpdate struct { Name *string `json:"name,omitempty"` EventType *AutoModerationEventType `json:"event_type,omitempty"` TriggerMetadata *AutoModerationTriggerMetadata `json:"trigger_metadata,omitempty"` Actions *[]AutoModerationAction `json:"actions,omitempty"` Enabled *bool `json:"enabled,omitempty"` ExemptRoles *[]snowflake.ID `json:"exempt_roles,omitempty"` ExemptChannels *[]snowflake.ID `json:"exempt_channels,omitempty"` }
type AutoModerationTriggerMetadata ¶ added in v0.12.7
type AutoModerationTriggerMetadata struct { KeywordFilter []string `json:"keyword_filter"` Presets []AutoModerationKeywordPreset `json:"presets"` }
type AutoModerationTriggerType ¶ added in v0.12.7
type AutoModerationTriggerType int
const ( AutoModerationTriggerTypeKeyword AutoModerationTriggerType = iota + 1 AutoModerationTriggerTypeHarmfulLink AutoModerationTriggerTypeSpam AutoModerationTriggerTypeKeywordPresent )
type AutocompleteChoice ¶
type AutocompleteChoice interface {
// contains filtered or unexported methods
}
type AutocompleteChoiceFloat ¶
type AutocompleteChoiceInt ¶
type AutocompleteInteraction ¶
type AutocompleteInteraction struct { BaseInteraction Data AutocompleteInteractionData `json:"data"` }
func (AutocompleteInteraction) Type ¶
func (AutocompleteInteraction) Type() InteractionType
func (*AutocompleteInteraction) UnmarshalJSON ¶
func (i *AutocompleteInteraction) UnmarshalJSON(data []byte) error
type AutocompleteInteractionData ¶
type AutocompleteInteractionData struct { CommandID snowflake.ID CommandName string SubCommandName *string SubCommandGroupName *string GuildID *snowflake.ID Options map[string]AutocompleteOption }
func (AutocompleteInteractionData) All ¶
func (d AutocompleteInteractionData) All() []AutocompleteOption
func (AutocompleteInteractionData) Bool ¶
func (d AutocompleteInteractionData) Bool(name string) bool
func (AutocompleteInteractionData) Find ¶
func (d AutocompleteInteractionData) Find(optionFindFunc func(option AutocompleteOption) bool) (AutocompleteOption, bool)
func (AutocompleteInteractionData) FindAll ¶
func (d AutocompleteInteractionData) FindAll(optionFindFunc func(option AutocompleteOption) bool) []AutocompleteOption
func (AutocompleteInteractionData) Float ¶
func (d AutocompleteInteractionData) Float(name string) float64
func (AutocompleteInteractionData) GetByType ¶
func (d AutocompleteInteractionData) GetByType(optionType ApplicationCommandOptionType) []AutocompleteOption
func (AutocompleteInteractionData) Int ¶
func (d AutocompleteInteractionData) Int(name string) int
func (AutocompleteInteractionData) MarshalJSON ¶
func (d AutocompleteInteractionData) MarshalJSON() ([]byte, error)
func (AutocompleteInteractionData) OptBool ¶
func (d AutocompleteInteractionData) OptBool(name string) (bool, bool)
func (AutocompleteInteractionData) OptFloat ¶
func (d AutocompleteInteractionData) OptFloat(name string) (float64, bool)
func (AutocompleteInteractionData) OptInt ¶
func (d AutocompleteInteractionData) OptInt(name string) (int, bool)
func (AutocompleteInteractionData) OptSnowflake ¶
func (d AutocompleteInteractionData) OptSnowflake(name string) (snowflake.ID, bool)
func (AutocompleteInteractionData) OptString ¶
func (d AutocompleteInteractionData) OptString(name string) (string, bool)
func (AutocompleteInteractionData) Option ¶
func (d AutocompleteInteractionData) Option(name string) (AutocompleteOption, bool)
func (AutocompleteInteractionData) Snowflake ¶
func (d AutocompleteInteractionData) Snowflake(name string) snowflake.ID
func (AutocompleteInteractionData) String ¶
func (d AutocompleteInteractionData) String(name string) string
func (*AutocompleteInteractionData) UnmarshalJSON ¶
func (d *AutocompleteInteractionData) UnmarshalJSON(data []byte) error
type AutocompleteOption ¶
type AutocompleteOption struct { Name string `json:"name"` Type ApplicationCommandOptionType `json:"type"` Value json.RawMessage `json:"value"` Focused bool `json:"focused"` }
type AutocompleteOptionSubCommand ¶
type AutocompleteOptionSubCommand struct { Name string `json:"name"` Description string `json:"description"` Options []AutocompleteOption `json:"options,omitempty"` }
type AutocompleteOptionSubCommandGroup ¶
type AutocompleteOptionSubCommandGroup struct { Name string `json:"name"` Description string `json:"description"` Options []AutocompleteOptionSubCommand `json:"options,omitempty"` }
type AutocompleteResult ¶
type AutocompleteResult struct {
Choices []AutocompleteChoice `json:"choices"`
}
type Ban ¶
Ban represents a banned User from a Guild (https://discord.com/developers/docs/resources/guild#ban-object)
type BaseInteraction ¶
type BaseInteraction interface { ID() snowflake.ID ApplicationID() snowflake.ID Token() string Version() int GuildID() *snowflake.ID ChannelID() snowflake.ID Locale() Locale GuildLocale() *Locale Member() *ResolvedMember User() User AppPermissions() *Permissions }
type BotIntegration ¶
type BotIntegration struct { IntegrationID snowflake.ID `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` Account IntegrationAccount `json:"account"` Application IntegrationApplication `json:"application"` }
func (BotIntegration) ID ¶
func (i BotIntegration) ID() snowflake.ID
func (BotIntegration) MarshalJSON ¶
func (i BotIntegration) MarshalJSON() ([]byte, error)
func (BotIntegration) Type ¶
func (BotIntegration) Type() IntegrationType
type ButtonComponent ¶
type ButtonComponent struct { Style ButtonStyle `json:"style"` Label string `json:"label,omitempty"` Emoji *ComponentEmoji `json:"emoji,omitempty"` CustomID CustomID `json:"custom_id,omitempty"` URL string `json:"url,omitempty"` Disabled bool `json:"disabled,omitempty"` }
func NewButton ¶
func NewButton(style ButtonStyle, label string, customID CustomID, url string) ButtonComponent
NewButton creates a new ButtonComponent with the provided parameters. Link ButtonComponent(s) need a URL and other ButtonComponent(s) need a customID
func NewDangerButton ¶
func NewDangerButton(label string, customID CustomID) ButtonComponent
NewDangerButton creates a new ButtonComponent with ButtonStyleDanger & the provided parameters
func NewLinkButton ¶
func NewLinkButton(label string, url string) ButtonComponent
NewLinkButton creates a new link ButtonComponent with ButtonStyleLink & the provided parameters
func NewPrimaryButton ¶
func NewPrimaryButton(label string, customID CustomID) ButtonComponent
NewPrimaryButton creates a new ButtonComponent with ButtonStylePrimary & the provided parameters
func NewSecondaryButton ¶
func NewSecondaryButton(label string, customID CustomID) ButtonComponent
NewSecondaryButton creates a new ButtonComponent with ButtonStyleSecondary & the provided parameters
func NewSuccessButton ¶
func NewSuccessButton(label string, customID CustomID) ButtonComponent
NewSuccessButton creates a new ButtonComponent with ButtonStyleSuccess & the provided parameters
func (ButtonComponent) AsDisabled ¶
func (c ButtonComponent) AsDisabled() ButtonComponent
AsDisabled returns a new ButtonComponent but disabled
func (ButtonComponent) AsEnabled ¶
func (c ButtonComponent) AsEnabled() ButtonComponent
AsEnabled returns a new ButtonComponent but enabled
func (ButtonComponent) ID ¶
func (c ButtonComponent) ID() CustomID
func (ButtonComponent) MarshalJSON ¶
func (c ButtonComponent) MarshalJSON() ([]byte, error)
func (ButtonComponent) SetID ¶
func (c ButtonComponent) SetID(id CustomID) InteractiveComponent
func (ButtonComponent) Type ¶
func (ButtonComponent) Type() ComponentType
func (ButtonComponent) WithCustomID ¶
func (c ButtonComponent) WithCustomID(customID CustomID) ButtonComponent
WithCustomID returns a new ButtonComponent with the provided custom id
func (ButtonComponent) WithDisabled ¶
func (c ButtonComponent) WithDisabled(disabled bool) ButtonComponent
WithDisabled returns a new ButtonComponent but disabled/enabled
func (ButtonComponent) WithEmoji ¶
func (c ButtonComponent) WithEmoji(emoji ComponentEmoji) ButtonComponent
WithEmoji returns a new ButtonComponent with the provided Emoji
func (ButtonComponent) WithLabel ¶
func (c ButtonComponent) WithLabel(label string) ButtonComponent
WithLabel returns a new ButtonComponent with the provided label
func (ButtonComponent) WithStyle ¶
func (c ButtonComponent) WithStyle(style ButtonStyle) ButtonComponent
WithStyle returns a new ButtonComponent with the provided style
func (ButtonComponent) WithURL ¶
func (c ButtonComponent) WithURL(url string) ButtonComponent
WithURL returns a new ButtonComponent with the provided URL
type ButtonInteractionData ¶
type ButtonInteractionData struct {
// contains filtered or unexported fields
}
func (ButtonInteractionData) CustomID ¶
func (d ButtonInteractionData) CustomID() CustomID
func (*ButtonInteractionData) MarshalJSON ¶
func (d *ButtonInteractionData) MarshalJSON() ([]byte, error)
func (ButtonInteractionData) Type ¶
func (ButtonInteractionData) Type() ComponentType
func (*ButtonInteractionData) UnmarshalJSON ¶
func (d *ButtonInteractionData) UnmarshalJSON(data []byte) error
type ButtonStyle ¶
type ButtonStyle int
ButtonStyle defines how the ButtonComponent looks like (https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png)
type CDNConfig ¶
type CDNConfig struct { Size int Format ImageFormat Values url.Values }
func DefaultCDNConfig ¶
func DefaultCDNConfig() *CDNConfig
type CDNEndpoint ¶ added in v0.13.11
type CDNEndpoint struct { Route string Formats []ImageFormat }
func NewCDN ¶ added in v0.13.11
func NewCDN(route string, imageFormats ...ImageFormat) *CDNEndpoint
func (CDNEndpoint) URL ¶ added in v0.13.11
func (e CDNEndpoint) URL(format ImageFormat, values url.Values, params ...any) string
type CDNOpt ¶
type CDNOpt func(config *CDNConfig)
func WithFormat ¶
func WithFormat(format ImageFormat) CDNOpt
type ChannelCreate ¶
type ChannelCreate interface { json.Marshaler Type() ChannelType // contains filtered or unexported methods }
type ChannelFlags ¶ added in v0.13.12
type ChannelFlags int
const ( ChannelFlagPinned ChannelFlags = 1 << (iota + 1) ChannelFlagsNone ChannelFlags = 0 )
func (ChannelFlags) Add ¶ added in v0.13.12
func (f ChannelFlags) Add(bits ...ChannelFlags) ChannelFlags
Add allows you to add multiple bits together, producing a new bit
func (ChannelFlags) Has ¶ added in v0.13.12
func (f ChannelFlags) Has(bits ...ChannelFlags) bool
Has will ensure that the bit includes all the bits entered
func (ChannelFlags) Missing ¶ added in v0.13.12
func (f ChannelFlags) Missing(bits ...ChannelFlags) bool
Missing will check whether the bit is missing any one of the bits
func (ChannelFlags) Remove ¶ added in v0.13.12
func (f ChannelFlags) Remove(bits ...ChannelFlags) ChannelFlags
Remove allows you to subtract multiple bits from the first, producing a new bit
type ChannelFollowerWebhook ¶
type ChannelFollowerWebhook struct { ChannelID snowflake.ID `json:"channel_id"` GuildID snowflake.ID `json:"guild_id"` SourceGuild WebhookSourceGuild `json:"source_guild"` SourceChannel WebhookSourceChannel `json:"source_channel"` User User `json:"user"` // contains filtered or unexported fields }
func (ChannelFollowerWebhook) Avatar ¶
func (w ChannelFollowerWebhook) Avatar() *string
func (ChannelFollowerWebhook) AvatarURL ¶
func (w ChannelFollowerWebhook) AvatarURL(opts ...CDNOpt) *string
func (ChannelFollowerWebhook) DefaultAvatarURL ¶
func (w ChannelFollowerWebhook) DefaultAvatarURL(opts ...CDNOpt) string
func (ChannelFollowerWebhook) EffectiveAvatarURL ¶
func (w ChannelFollowerWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
func (ChannelFollowerWebhook) ID ¶
func (w ChannelFollowerWebhook) ID() snowflake.ID
func (ChannelFollowerWebhook) MarshalJSON ¶
func (w ChannelFollowerWebhook) MarshalJSON() ([]byte, error)
func (ChannelFollowerWebhook) Name ¶
func (w ChannelFollowerWebhook) Name() string
func (ChannelFollowerWebhook) Type ¶
func (ChannelFollowerWebhook) Type() WebhookType
func (*ChannelFollowerWebhook) UnmarshalJSON ¶
func (w *ChannelFollowerWebhook) UnmarshalJSON(data []byte) error
type ChannelType ¶
type ChannelType int
ChannelType for interacting with discord's channels
const ( ChannelTypeGuildText ChannelType = iota ChannelTypeDM ChannelTypeGuildVoice ChannelTypeGroupDM ChannelTypeGuildCategory ChannelTypeGuildNews ChannelTypeGuildNewsThread ChannelTypeGuildPublicThread ChannelTypeGuildPrivateThread ChannelTypeGuildStageVoice ChannelTypeGuildDirectory ChannelTypeGuildForum )
Channel constants
type ChannelUpdate ¶
type ChannelUpdate interface {
// contains filtered or unexported methods
}
type ClientStatus ¶
type ClientStatus struct { Desktop OnlineStatus `json:"desktop,omitempty"` Mobile OnlineStatus `json:"mobile,omitempty"` Web OnlineStatus `json:"web,omitempty"` }
ClientStatus (https://discord.com/developers/docs/topics/gateway#client-status-object)
type Component ¶
type Component interface { json.Marshaler Type() ComponentType // contains filtered or unexported methods }
type ComponentEmoji ¶
type ComponentInteraction ¶
type ComponentInteraction struct { BaseInteraction Data ComponentInteractionData `json:"data"` Message Message `json:"message"` }
func (ComponentInteraction) ButtonInteractionData ¶
func (i ComponentInteraction) ButtonInteractionData() ButtonInteractionData
func (ComponentInteraction) SelectMenuInteractionData ¶
func (i ComponentInteraction) SelectMenuInteractionData() SelectMenuInteractionData
func (ComponentInteraction) Type ¶
func (ComponentInteraction) Type() InteractionType
func (*ComponentInteraction) UnmarshalJSON ¶
func (i *ComponentInteraction) UnmarshalJSON(data []byte) error
type ComponentInteractionData ¶
type ComponentInteractionData interface { Type() ComponentType CustomID() CustomID // contains filtered or unexported methods }
type Connection ¶
type Connection struct { ID string `json:"id"` Name string `json:"name"` Type ConnectionType `json:"type"` Revoked bool `json:"revoked,omitempty"` Integrations []Integration `json:"integrations,omitempty"` Verified bool `json:"verified"` FriendSync bool `json:"friend_sync"` ShowActivity bool `json:"show_activity"` Visibility VisibilityType `json:"visibility"` }
type ConnectionType ¶
type ConnectionType string
const ( ConnectionTypeYouTube ConnectionType = "youtube" ConnectionTypeBattleNet ConnectionType = "battlenet" ConnectionTypeGitHub ConnectionType = "github" ConnectionTypeReddit ConnectionType = "reddit" ConnectionTypeSpotify ConnectionType = "spotify" ConnectionTypeSteam ConnectionType = "steam" ConnectionTypeTwitch ConnectionType = "twitch" ConnectionTypeTwitter ConnectionType = "twitter" ConnectionTypeXBox ConnectionType = "xbox" ConnectionTypeFacebook ConnectionType = "facebook" )
type ContainerComponent ¶
type ContainerComponent interface { Component Components() []InteractiveComponent // contains filtered or unexported methods }
type ContextCommandInteractionData ¶
type ContextCommandInteractionData interface { ApplicationCommandInteractionData TargetID() snowflake.ID // contains filtered or unexported methods }
type DMChannel ¶
type DMChannel struct {
// contains filtered or unexported fields
}
func (DMChannel) LastMessageID ¶
func (c DMChannel) LastMessageID() *snowflake.ID
func (DMChannel) LastPinTimestamp ¶
func (DMChannel) MarshalJSON ¶
func (DMChannel) Type ¶
func (DMChannel) Type() ChannelType
func (*DMChannel) UnmarshalJSON ¶
type DMChannelCreate ¶
type DMChannelCreate struct {
RecipientID snowflake.ID `json:"recipient_id"`
}
type Embed ¶
type Embed struct { Title string `json:"title,omitempty"` Type EmbedType `json:"type,omitempty"` Description string `json:"description,omitempty"` URL string `json:"url,omitempty"` Timestamp *time.Time `json:"timestamp,omitempty"` Color int `json:"color,omitempty"` Image *EmbedResource `json:"image,omitempty"` Thumbnail *EmbedResource `json:"thumbnail,omitempty"` Video *EmbedResource `json:"video,omitempty"` Provider *EmbedProvider `json:"provider,omitempty"` Author *EmbedAuthor `json:"author,omitempty"` Fields []EmbedField `json:"fields,omitempty"` }
Embed allows you to send embeds to discord
type EmbedAuthor ¶
type EmbedAuthor struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` IconURL string `json:"icon_url,omitempty"` ProxyIconURL string `json:"proxy_icon_url,omitempty"` }
The EmbedAuthor of an Embed
type EmbedBuilder ¶
type EmbedBuilder struct {
Embed
}
EmbedBuilder allows you to create embeds and use methods to set values
func NewEmbedBuilder ¶
func NewEmbedBuilder() *EmbedBuilder
NewEmbedBuilder returns a new embed builder
func (*EmbedBuilder) AddField ¶
func (b *EmbedBuilder) AddField(name string, value string, inline bool) *EmbedBuilder
AddField adds a field to the EmbedBuilder by name and value
func (*EmbedBuilder) AddFields ¶
func (b *EmbedBuilder) AddFields(fields ...EmbedField) *EmbedBuilder
AddFields adds multiple fields to the EmbedBuilder
func (*EmbedBuilder) ClearFields ¶
func (b *EmbedBuilder) ClearFields() *EmbedBuilder
ClearFields removes all the fields from the EmbedBuilder
func (*EmbedBuilder) RemoveField ¶
func (b *EmbedBuilder) RemoveField(i int) *EmbedBuilder
RemoveField removes a field from the EmbedBuilder
func (*EmbedBuilder) SetAuthor ¶
func (b *EmbedBuilder) SetAuthor(name string, url string, iconURL string) *EmbedBuilder
SetAuthor sets the author of the EmbedBuilder with all properties
func (*EmbedBuilder) SetAuthorIcon ¶
func (b *EmbedBuilder) SetAuthorIcon(iconURL string) *EmbedBuilder
SetAuthorIcon sets the author icon of the EmbedBuilder
func (*EmbedBuilder) SetAuthorName ¶
func (b *EmbedBuilder) SetAuthorName(name string) *EmbedBuilder
SetAuthorName sets the author name of the EmbedBuilder
func (*EmbedBuilder) SetAuthorURL ¶
func (b *EmbedBuilder) SetAuthorURL(url string) *EmbedBuilder
SetAuthorURL sets the author URL of the EmbedBuilder
func (*EmbedBuilder) SetColor ¶
func (b *EmbedBuilder) SetColor(color int) *EmbedBuilder
SetColor sets the color of the EmbedBuilder
func (*EmbedBuilder) SetDescription ¶
func (b *EmbedBuilder) SetDescription(description string) *EmbedBuilder
SetDescription sets the description of the EmbedBuilder
func (*EmbedBuilder) SetDescriptionf ¶
func (b *EmbedBuilder) SetDescriptionf(description string, a ...any) *EmbedBuilder
SetDescriptionf sets the description of the EmbedBuilder with format
func (*EmbedBuilder) SetEmbedAuthor ¶
func (b *EmbedBuilder) SetEmbedAuthor(author *EmbedAuthor) *EmbedBuilder
SetEmbedAuthor sets the author of the EmbedBuilder using an EmbedAuthor struct
func (*EmbedBuilder) SetEmbedFooter ¶
func (b *EmbedBuilder) SetEmbedFooter(footer *EmbedFooter) *EmbedBuilder
SetEmbedFooter sets the footer of the EmbedBuilder
func (*EmbedBuilder) SetField ¶
func (b *EmbedBuilder) SetField(i int, name string, value string, inline bool) *EmbedBuilder
SetField sets a field to the EmbedBuilder by name and value
func (*EmbedBuilder) SetFields ¶
func (b *EmbedBuilder) SetFields(fields ...EmbedField) *EmbedBuilder
SetFields sets fields of the EmbedBuilder
func (*EmbedBuilder) SetFooter ¶
func (b *EmbedBuilder) SetFooter(text string, iconURL string) *EmbedBuilder
SetFooter sets the footer icon of the EmbedBuilder
func (*EmbedBuilder) SetFooterIcon ¶
func (b *EmbedBuilder) SetFooterIcon(iconURL string) *EmbedBuilder
SetFooterIcon sets the footer icon of the EmbedBuilder
func (*EmbedBuilder) SetFooterText ¶
func (b *EmbedBuilder) SetFooterText(text string) *EmbedBuilder
SetFooterText sets the footer text of the EmbedBuilder
func (*EmbedBuilder) SetImage ¶
func (b *EmbedBuilder) SetImage(url string) *EmbedBuilder
SetImage sets the image of the EmbedBuilder
func (*EmbedBuilder) SetThumbnail ¶
func (b *EmbedBuilder) SetThumbnail(url string) *EmbedBuilder
SetThumbnail sets the thumbnail of the EmbedBuilder
func (*EmbedBuilder) SetTimestamp ¶
func (b *EmbedBuilder) SetTimestamp(time time.Time) *EmbedBuilder
SetTimestamp sets the timestamp of the EmbedBuilder
func (*EmbedBuilder) SetTitle ¶
func (b *EmbedBuilder) SetTitle(title string) *EmbedBuilder
SetTitle sets the title of the EmbedBuilder
func (*EmbedBuilder) SetTitlef ¶
func (b *EmbedBuilder) SetTitlef(title string, a ...any) *EmbedBuilder
SetTitlef sets the title of the EmbedBuilder with format
func (*EmbedBuilder) SetURL ¶
func (b *EmbedBuilder) SetURL(url string) *EmbedBuilder
SetURL sets the URL of the EmbedBuilder
type EmbedField ¶
type EmbedField struct { Name string `json:"name"` Value string `json:"value"` Inline *bool `json:"inline,omitempty"` }
EmbedField (s) of an Embed
type EmbedProvider ¶
The EmbedProvider of an Embed
type EmbedResource ¶
type EmbedResource struct { URL string `json:"url,omitempty"` ProxyURL string `json:"proxy_url,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` }
The EmbedResource of an Embed.Image/Embed.Thumbnail/Embed.Video
type Emoji ¶
type Emoji struct { ID snowflake.ID `json:"id,omitempty"` Name string `json:"name,omitempty"` // may be empty for deleted emojis Roles []snowflake.ID `json:"roles,omitempty"` Creator *User `json:"creator,omitempty"` RequireColons bool `json:"require_colons,omitempty"` Managed bool `json:"managed,omitempty"` Animated bool `json:"animated,omitempty"` Available bool `json:"available,omitempty"` }
Emoji allows you to interact with emojis & emotes
type EmojiCreate ¶
type EmojiUpdate ¶
type EmojiUpdate struct { Name string `json:"name,omitempty"` Roles []snowflake.ID `json:"roles,omitempty"` }
type EntityMetaData ¶
type EntityMetaData struct {
Location string `json:"location"`
}
EntityMetaData additional metadata for the scheduled event (https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata)
type ExplicitContentFilterLevel ¶
type ExplicitContentFilterLevel int
The ExplicitContentFilterLevel of a Guild
const ( ExplicitContentFilterLevelDisabled ExplicitContentFilterLevel = iota ExplicitContentFilterLevelMembersWithoutRoles ExplicitContentFilterLevelAllMembers )
Constants for ExplicitContentFilterLevel
type ExtendedInvite ¶
type FileFlags ¶
type FileFlags int
FileFlags are used to mark Attachments as Spoiler
type FollowChannel ¶ added in v0.8.9
type FollowChannel struct {
ChannelID snowflake.ID `json:"webhook_channel_id"`
}
type FollowedChannel ¶ added in v0.8.9
type FollowedChannel struct { ChannelID snowflake.ID `json:"channel_id"` WebhookID snowflake.ID `json:"webhook_id"` }
type ForumThread ¶ added in v0.13.12
type ForumThread struct { GuildThread Message Message `json:"message"` }
type ForumThreadCreate ¶ added in v0.13.12
type ForumThreadCreate struct { Name string `json:"name"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration,omitempty"` RateLimitPerUser int `json:"rate_limit_per_user,omitempty"` Message MessageCreate `json:"message"` }
func (ForumThreadCreate) ToBody ¶ added in v0.13.12
func (c ForumThreadCreate) ToBody() (any, error)
type GatewayBot ¶
type GatewayBot struct { URL string `json:"url"` Shards int `json:"shards"` SessionStartLimit SessionStartLimit `json:"session_start_limit"` }
type GatewayGuild ¶
type GatewayGuild struct { RestGuild Large bool `json:"large"` VoiceStates []VoiceState `json:"voice_states"` Members []Member `json:"members"` Channels []GuildChannel `json:"channels"` Threads []GuildThread `json:"threads"` Presences []Presence `json:"presences"` StageInstances []StageInstance `json:"stage_instances"` GuildScheduledEvents []GuildScheduledEvent `json:"guild_scheduled_events"` }
func (*GatewayGuild) UnmarshalJSON ¶
func (g *GatewayGuild) UnmarshalJSON(data []byte) error
type GetAllThreads ¶
type GetAllThreads struct { Threads []GuildThread `json:"threads"` Members []ThreadMember `json:"members"` }
type GetThreads ¶
type GetThreads struct { Threads []GuildThread `json:"threads"` Members []ThreadMember `json:"members"` HasMore bool `json:"has_more"` }
type GrantType ¶
type GrantType string
GrantType defines what type of request is being made.
type Guild ¶
type Guild struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Icon *string `json:"icon"` Splash *string `json:"splash"` DiscoverySplash *string `json:"discovery_splash"` OwnerID snowflake.ID `json:"owner_id"` AfkChannelID *snowflake.ID `json:"afk_channel_id"` AfkTimeout int `json:"afk_timeout"` WidgetEnabled bool `json:"widget_enabled"` WidgetChannelID snowflake.ID `json:"widget_channel_id"` VerificationLevel VerificationLevel `json:"verification_level"` DefaultMessageNotifications MessageNotificationsLevel `json:"default_message_notifications"` ExplicitContentFilter ExplicitContentFilterLevel `json:"explicit_content_filter"` Features []GuildFeature `json:"features"` MFALevel MFALevel `json:"mfa_level"` ApplicationID *snowflake.ID `json:"application_id"` SystemChannelID *snowflake.ID `json:"system_channel_id"` SystemChannelFlags SystemChannelFlags `json:"system_channel_flags"` RulesChannelID *snowflake.ID `json:"rules_channel_id"` MemberCount int `json:"member_count"` MaxPresences *int `json:"max_presences"` MaxMembers int `json:"max_members"` VanityURLCode *string `json:"vanity_url_code"` Description *string `json:"description"` Banner *string `json:"banner"` PremiumTier PremiumTier `json:"premium_tier"` PremiumSubscriptionCount int `json:"premium_subscription_count"` PreferredLocale string `json:"preferred_locale"` PublicUpdatesChannelID *snowflake.ID `json:"public_updates_channel_id"` MaxVideoChannelUsers int `json:"max_video_channel_users"` WelcomeScreen WelcomeScreen `json:"welcome_screen"` NSFWLevel NSFWLevel `json:"nsfw_level"` BoostProgressBarEnabled bool `json:"premium_progress_bar_enabled"` JoinedAt time.Time `json:"joined_at"` // only over GET /guilds/{guild.id} ApproximateMemberCount int `json:"approximate_member_count"` ApproximatePresenceCount int `json:"approximate_presence_count"` }
Guild represents a discord Guild
func (Guild) DiscoverySplashURL ¶
type GuildAudioChannel ¶
type GuildAudioChannel interface { GuildChannel // Bitrate returns the configured bitrate of the GuildAudioChannel. Bitrate() int // RTCRegion returns the configured voice server region of the GuildAudioChannel. RTCRegion() string // contains filtered or unexported methods }
type GuildCategoryChannel ¶
type GuildCategoryChannel struct {
// contains filtered or unexported fields
}
func (GuildCategoryChannel) GuildID ¶
func (c GuildCategoryChannel) GuildID() snowflake.ID
func (GuildCategoryChannel) ID ¶
func (c GuildCategoryChannel) ID() snowflake.ID
func (GuildCategoryChannel) MarshalJSON ¶
func (c GuildCategoryChannel) MarshalJSON() ([]byte, error)
func (GuildCategoryChannel) Mention ¶
func (c GuildCategoryChannel) Mention() string
func (GuildCategoryChannel) Name ¶
func (c GuildCategoryChannel) Name() string
func (GuildCategoryChannel) ParentID ¶
func (c GuildCategoryChannel) ParentID() *snowflake.ID
ParentID always returns nil for GuildCategoryChannel as they can't be nested.
func (GuildCategoryChannel) PermissionOverwrites ¶
func (c GuildCategoryChannel) PermissionOverwrites() PermissionOverwrites
func (GuildCategoryChannel) Position ¶
func (c GuildCategoryChannel) Position() int
func (GuildCategoryChannel) String ¶
func (c GuildCategoryChannel) String() string
func (GuildCategoryChannel) Type ¶
func (GuildCategoryChannel) Type() ChannelType
func (*GuildCategoryChannel) UnmarshalJSON ¶
func (c *GuildCategoryChannel) UnmarshalJSON(data []byte) error
type GuildCategoryChannelCreate ¶
type GuildCategoryChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` }
func (GuildCategoryChannelCreate) MarshalJSON ¶
func (c GuildCategoryChannelCreate) MarshalJSON() ([]byte, error)
func (GuildCategoryChannelCreate) Type ¶
func (c GuildCategoryChannelCreate) Type() ChannelType
type GuildCategoryChannelUpdate ¶
type GuildCategoryChannelUpdate struct { Name *string `json:"name,omitempty"` Position *int `json:"position,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` }
type GuildChannel ¶
type GuildChannel interface { Channel Mentionable // GuildID returns the Guild ID of the GuildChannel GuildID() snowflake.ID // Position returns the position of the GuildChannel in the channel list. // This is always 0 for GuildThread(s). Position() int // ParentID returns the parent Channel ID of the GuildChannel. // This is never nil for GuildThread(s). ParentID() *snowflake.ID // PermissionOverwrites returns the GuildChannel's PermissionOverwrites for Role(s) and Member(s). // This is always nil for GuildThread(s). PermissionOverwrites() PermissionOverwrites // contains filtered or unexported methods }
func ApplyGuildIDToChannel ¶ added in v0.8.5
func ApplyGuildIDToChannel(channel GuildChannel, guildID snowflake.ID) GuildChannel
type GuildChannelCreate ¶
type GuildChannelCreate interface { ChannelCreate // contains filtered or unexported methods }
type GuildChannelUpdate ¶
type GuildChannelUpdate interface { ChannelUpdate // contains filtered or unexported methods }
type GuildCreate ¶
type GuildCreate struct { Name string `json:"name"` Icon *Icon `json:"icon,omitempty"` VerificationLevel VerificationLevel `json:"verification_level,omitempty"` DefaultMessageNotificationLevel MessageNotificationsLevel `json:"default_message_notification_level,omitempty"` ExplicitContentFilterLevel ExplicitContentFilterLevel `json:"explicit_content_filter_level,omitempty"` Roles []GuildCreateRole `json:"roles,omitempty"` Channels []GuildCreateChannel `json:"channels,omitempty"` AFKChannelID snowflake.ID `json:"afk_channel_id,omitempty"` AFKTimeout int `json:"afk_timeout,omitempty"` SystemChannelID snowflake.ID `json:"system_channel_id,omitempty"` SystemChannelFlags SystemChannelFlags `json:"system_channel_flags,omitempty"` }
GuildCreate is the payload used to create a Guild
type GuildCreateChannel ¶
type GuildCreateChannel struct { ChannelCreate ID int `json:"id,omitempty"` ParentID int `json:"parent_id,omitempty"` }
type GuildCreateRole ¶
type GuildCreateRole struct { RoleCreate ID int `json:"id,omitempty"` }
type GuildFeature ¶
type GuildFeature string
The GuildFeature (s) that a Guild contains
const ( GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON" GuildFeatureAnimatedBanner GuildFeature = "ANIMATED_BANNER" GuildFeatureBanner GuildFeature = "BANNER" GuildFeatureCommerce GuildFeature = "COMMERCE" GuildFeatureCommunity GuildFeature = "COMMUNITY" GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE" GuildFeatureFeaturable GuildFeature = "FEATURABLE" GuildFeatureInviteSplash GuildFeature = "INVITE_SPLASH" GuildFeatureMemberVerificationGateEnabled GuildFeature = "MEMBER_VERIFICATION_GATE_ENABLED" GuildFeatureMonetizationEnabled GuildFeature = "MONETIZATION_ENABLED" GuildFeatureMoreStickers GuildFeature = "MORE_STICKERS" GuildFeatureNews GuildFeature = "NEWS" GuildFeaturePartnered GuildFeature = "PARTNERED" GuildFeaturePreviewEnabled GuildFeature = "PREVIEW_ENABLED" GuildFeaturePrivateThreads GuildFeature = "PRIVATE_THREADS" GuildFeatureRoleIcons GuildFeature = "ROLE_ICONS" GuildFeatureSevenDayThreadArchive GuildFeature = "SEVEN_DAY_THREAD_ARCHIVE" GuildFeatureThreeDayThreadArchive GuildFeature = "THREE_DAY_THREAD_ARCHIVE" GuildFeatureTicketedEventsEnabled GuildFeature = "TICKETED_EVENTS_ENABLED" GuildFeatureVanityURL GuildFeature = "VANITY_URL" GuildFeatureVerified GuildFeature = "VERIFIED" GuildFeatureVipRegions GuildFeature = "VIP_REGIONS" GuildFeatureWelcomeScreenEnabled GuildFeature = "WELCOME_SCREEN_ENABLED" )
Constants for GuildFeature
type GuildForumChannel ¶ added in v0.13.12
type GuildForumChannel struct { LastThreadID *snowflake.ID Topic *string RateLimitPerUser int // contains filtered or unexported fields }
func (GuildForumChannel) GuildID ¶ added in v0.13.12
func (c GuildForumChannel) GuildID() snowflake.ID
func (GuildForumChannel) ID ¶ added in v0.13.12
func (c GuildForumChannel) ID() snowflake.ID
func (GuildForumChannel) MarshalJSON ¶ added in v0.13.12
func (c GuildForumChannel) MarshalJSON() ([]byte, error)
func (GuildForumChannel) Mention ¶ added in v0.13.12
func (c GuildForumChannel) Mention() string
func (GuildForumChannel) Name ¶ added in v0.13.12
func (c GuildForumChannel) Name() string
func (GuildForumChannel) ParentID ¶ added in v0.13.12
func (c GuildForumChannel) ParentID() *snowflake.ID
func (GuildForumChannel) PermissionOverwrites ¶ added in v0.13.12
func (c GuildForumChannel) PermissionOverwrites() PermissionOverwrites
func (GuildForumChannel) Position ¶ added in v0.13.12
func (c GuildForumChannel) Position() int
func (GuildForumChannel) String ¶ added in v0.13.12
func (c GuildForumChannel) String() string
func (GuildForumChannel) Type ¶ added in v0.13.12
func (GuildForumChannel) Type() ChannelType
func (*GuildForumChannel) UnmarshalJSON ¶ added in v0.13.12
func (c *GuildForumChannel) UnmarshalJSON(data []byte) error
type GuildForumChannelCreate ¶ added in v0.13.12
type GuildForumChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID snowflake.ID `json:"parent_id,omitempty"` RateLimitPerUser int `json:"rate_limit_per_user"` }
func (GuildForumChannelCreate) MarshalJSON ¶ added in v0.13.12
func (c GuildForumChannelCreate) MarshalJSON() ([]byte, error)
func (GuildForumChannelCreate) Type ¶ added in v0.13.12
func (c GuildForumChannelCreate) Type() ChannelType
type GuildForumChannelUpdate ¶ added in v0.13.12
type GuildForumChannelUpdate struct { Name *string `json:"name,omitempty"` Position *int `json:"position,omitempty"` Topic *string `json:"topic,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID *snowflake.ID `json:"parent_id,omitempty"` RateLimitPerUser *int `json:"rate_limit_per_user"` }
type GuildFromTemplateCreate ¶
type GuildFromTemplateCreate struct { Name string `json:"name"` Icon *Icon `json:"icon,omitempty"` }
GuildFromTemplateCreate is the data used to create a Guild from a GuildTemplate
type GuildMessageChannel ¶
type GuildMessageChannel interface { GuildChannel MessageChannel // Topic returns the topic of a GuildMessageChannel. // This is always nil for GuildThread(s). Topic() *string // NSFW returns whether the GuildMessageChannel is marked as not safe for work. NSFW() bool // DefaultAutoArchiveDuration returns the default AutoArchiveDuration for GuildThread(s) in this GuildMessageChannel. // This is always 0 for GuildThread(s). DefaultAutoArchiveDuration() AutoArchiveDuration RateLimitPerUser() int // contains filtered or unexported methods }
type GuildNewsChannel ¶
type GuildNewsChannel struct {
// contains filtered or unexported fields
}
func (GuildNewsChannel) DefaultAutoArchiveDuration ¶
func (c GuildNewsChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
func (GuildNewsChannel) GuildID ¶
func (c GuildNewsChannel) GuildID() snowflake.ID
func (GuildNewsChannel) ID ¶
func (c GuildNewsChannel) ID() snowflake.ID
func (GuildNewsChannel) LastMessageID ¶
func (c GuildNewsChannel) LastMessageID() *snowflake.ID
func (GuildNewsChannel) LastPinTimestamp ¶
func (c GuildNewsChannel) LastPinTimestamp() *time.Time
func (GuildNewsChannel) MarshalJSON ¶
func (c GuildNewsChannel) MarshalJSON() ([]byte, error)
func (GuildNewsChannel) Mention ¶
func (c GuildNewsChannel) Mention() string
func (GuildNewsChannel) NSFW ¶
func (c GuildNewsChannel) NSFW() bool
func (GuildNewsChannel) Name ¶
func (c GuildNewsChannel) Name() string
func (GuildNewsChannel) ParentID ¶
func (c GuildNewsChannel) ParentID() *snowflake.ID
func (GuildNewsChannel) PermissionOverwrites ¶
func (c GuildNewsChannel) PermissionOverwrites() PermissionOverwrites
func (GuildNewsChannel) Position ¶
func (c GuildNewsChannel) Position() int
func (GuildNewsChannel) RateLimitPerUser ¶ added in v0.13.12
func (c GuildNewsChannel) RateLimitPerUser() int
func (GuildNewsChannel) String ¶
func (c GuildNewsChannel) String() string
func (GuildNewsChannel) Topic ¶
func (c GuildNewsChannel) Topic() *string
func (GuildNewsChannel) Type ¶
func (GuildNewsChannel) Type() ChannelType
func (*GuildNewsChannel) UnmarshalJSON ¶
func (c *GuildNewsChannel) UnmarshalJSON(data []byte) error
type GuildNewsChannelCreate ¶
type GuildNewsChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` RateLimitPerUser int `json:"rate_limit_per_user,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID snowflake.ID `json:"parent_id,omitempty"` NSFW bool `json:"nsfw,omitempty"` DefaultAutoArchiveDuration AutoArchiveDuration `json:"default_auto_archive_days,omitempty"` }
func (GuildNewsChannelCreate) MarshalJSON ¶
func (c GuildNewsChannelCreate) MarshalJSON() ([]byte, error)
func (GuildNewsChannelCreate) Type ¶
func (c GuildNewsChannelCreate) Type() ChannelType
type GuildNewsChannelUpdate ¶
type GuildNewsChannelUpdate struct { Name *string `json:"name,omitempty"` Type *ChannelType `json:"type,omitempty"` Position *int `json:"position,omitempty"` Topic *string `json:"topic,omitempty"` RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID *snowflake.ID `json:"parent_id,omitempty"` DefaultAutoArchiveDuration *int `json:"default_auto_archive_duration"` }
type GuildNewsThreadCreate ¶
type GuildNewsThreadCreate struct { Name string `json:"name"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration,omitempty"` }
func (GuildNewsThreadCreate) MarshalJSON ¶
func (c GuildNewsThreadCreate) MarshalJSON() ([]byte, error)
func (GuildNewsThreadCreate) Type ¶
func (GuildNewsThreadCreate) Type() ChannelType
type GuildPreview ¶
type GuildPreview struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Icon *string `json:"icon"` DiscoverySplash *string `json:"discovery_splash"` Splash *string `json:"splash"` Features []GuildFeature `json:"features"` Description *string `json:"description"` ApproximateMemberCount *int `json:"approximate_member_count"` ApproximatePresenceCount *int `json:"approximate_presence_count"` Emojis []Emoji `json:"emojis"` }
GuildPreview is used for previewing public Guild(s) before joining them
type GuildPrivateThreadCreate ¶
type GuildPrivateThreadCreate struct { Name string `json:"name"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration,omitempty"` Invitable bool `json:"invitable"` }
func (GuildPrivateThreadCreate) MarshalJSON ¶
func (c GuildPrivateThreadCreate) MarshalJSON() ([]byte, error)
func (GuildPrivateThreadCreate) Type ¶
func (GuildPrivateThreadCreate) Type() ChannelType
type GuildPublicThreadCreate ¶
type GuildPublicThreadCreate struct { Name string `json:"name"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration,omitempty"` }
func (GuildPublicThreadCreate) MarshalJSON ¶
func (c GuildPublicThreadCreate) MarshalJSON() ([]byte, error)
func (GuildPublicThreadCreate) Type ¶
func (GuildPublicThreadCreate) Type() ChannelType
type GuildScheduledEvent ¶
type GuildScheduledEvent struct { ID snowflake.ID `json:"id"` GuildID snowflake.ID `json:"guild_id"` ChannelID *snowflake.ID `json:"channel_id"` CreatorID snowflake.ID `json:"creator_id"` Name string `json:"name"` Description string `json:"description"` ScheduledStartTime time.Time `json:"scheduled_start_time"` ScheduledEndTime *time.Time `json:"scheduled_end_time"` PrivacyLevel ScheduledEventPrivacyLevel `json:"privacy_level"` Status ScheduledEventStatus `json:"status"` EntityType ScheduledEventEntityType `json:"entity_type"` EntityID *snowflake.ID `json:"entity_id"` EntityMetaData *EntityMetaData `json:"entity_metadata"` Creator User `json:"creator"` UserCount int `json:"user_count"` }
GuildScheduledEvent a representation of a scheduled event in a Guild (https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object)
type GuildScheduledEventCreate ¶
type GuildScheduledEventCreate struct { ChannelID snowflake.ID `json:"channel_id,omitempty"` EntityMetaData *EntityMetaData `json:"entity_metadata,omitempty"` Name string `json:"name"` PrivacyLevel ScheduledEventPrivacyLevel `json:"privacy_level"` ScheduledStartTime time.Time `json:"scheduled_start_time"` ScheduledEndTime time.Time `json:"scheduled_end_time,omitempty"` Description string `json:"description,omitempty"` EntityType ScheduledEventEntityType `json:"entity_type"` }
type GuildScheduledEventUpdate ¶
type GuildScheduledEventUpdate struct { ChannelID *snowflake.ID `json:"channel_id,omitempty"` EntityMetaData *EntityMetaData `json:"entity_metadata,omitempty"` Name string `json:"name,omitempty"` PrivacyLevel *ScheduledEventPrivacyLevel `json:"privacy_level,omitempty"` ScheduledStartTime *time.Time `json:"scheduled_start_time,omitempty"` ScheduledEndTime *time.Time `json:"scheduled_end_time,omitempty"` Description *string `json:"description,omitempty"` EntityType *ScheduledEventEntityType `json:"entity_type,omitempty"` Status *ScheduledEventStatus `json:"status,omitempty"` }
type GuildScheduledEventUser ¶
type GuildStageVoiceChannel ¶
type GuildStageVoiceChannel struct {
// contains filtered or unexported fields
}
func (GuildStageVoiceChannel) Bitrate ¶
func (c GuildStageVoiceChannel) Bitrate() int
func (GuildStageVoiceChannel) GuildID ¶
func (c GuildStageVoiceChannel) GuildID() snowflake.ID
func (GuildStageVoiceChannel) ID ¶
func (c GuildStageVoiceChannel) ID() snowflake.ID
func (GuildStageVoiceChannel) MarshalJSON ¶
func (c GuildStageVoiceChannel) MarshalJSON() ([]byte, error)
func (GuildStageVoiceChannel) Mention ¶
func (c GuildStageVoiceChannel) Mention() string
func (GuildStageVoiceChannel) Name ¶
func (c GuildStageVoiceChannel) Name() string
func (GuildStageVoiceChannel) ParentID ¶
func (c GuildStageVoiceChannel) ParentID() *snowflake.ID
func (GuildStageVoiceChannel) PermissionOverwrites ¶
func (c GuildStageVoiceChannel) PermissionOverwrites() PermissionOverwrites
func (GuildStageVoiceChannel) Position ¶
func (c GuildStageVoiceChannel) Position() int
func (GuildStageVoiceChannel) RTCRegion ¶
func (c GuildStageVoiceChannel) RTCRegion() string
func (GuildStageVoiceChannel) String ¶
func (c GuildStageVoiceChannel) String() string
func (GuildStageVoiceChannel) Type ¶
func (GuildStageVoiceChannel) Type() ChannelType
func (*GuildStageVoiceChannel) UnmarshalJSON ¶
func (c *GuildStageVoiceChannel) UnmarshalJSON(data []byte) error
type GuildStageVoiceChannelCreate ¶ added in v0.8.9
type GuildStageVoiceChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` Bitrate int `json:"bitrate,omitempty"` UserLimit int `json:"user_limit,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID snowflake.ID `json:"parent_id,omitempty"` }
func (GuildStageVoiceChannelCreate) MarshalJSON ¶ added in v0.8.9
func (c GuildStageVoiceChannelCreate) MarshalJSON() ([]byte, error)
func (GuildStageVoiceChannelCreate) Type ¶ added in v0.8.9
func (c GuildStageVoiceChannelCreate) Type() ChannelType
type GuildStageVoiceChannelUpdate ¶
type GuildStageVoiceChannelUpdate struct { Name *string `json:"name,omitempty"` Position *int `json:"position,omitempty"` Topic *string `json:"topic,omitempty"` Bitrate *int `json:"bitrate,omitempty"` UserLimit *int `json:"user_limit,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID *snowflake.ID `json:"parent_id,omitempty"` RTCRegion *string `json:"rtc_region"` }
type GuildTemplate ¶
type GuildTemplate struct { Code string `json:"code"` Name string `json:"name"` Description *string `json:"description,omitempty"` UsageCount int `json:"usage_count"` CreatorID snowflake.ID `json:"creator_id"` Creator User `json:"creator"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` GuildID snowflake.ID `json:"source_guild_id"` Guild TemplateGuild `json:"serialized_source_guild"` IsDirty bool `json:"is_dirty,omitempty"` }
GuildTemplate is a template used for copying guilds https://discord.com/developers/docs/resources/guild-template
type GuildTemplateCreate ¶
type GuildTemplateCreate struct { Name string `json:"name"` Description string `json:"description,omitempty"` }
GuildTemplateCreate is the data used to create a GuildTemplate
type GuildTemplateUpdate ¶
type GuildTemplateUpdate struct { Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` }
GuildTemplateUpdate is the data used to update a GuildTemplate
type GuildTextChannel ¶
type GuildTextChannel struct {
// contains filtered or unexported fields
}
func (GuildTextChannel) DefaultAutoArchiveDuration ¶
func (c GuildTextChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
func (GuildTextChannel) GuildID ¶
func (c GuildTextChannel) GuildID() snowflake.ID
func (GuildTextChannel) ID ¶
func (c GuildTextChannel) ID() snowflake.ID
func (GuildTextChannel) LastMessageID ¶
func (c GuildTextChannel) LastMessageID() *snowflake.ID
func (GuildTextChannel) LastPinTimestamp ¶
func (c GuildTextChannel) LastPinTimestamp() *time.Time
func (GuildTextChannel) MarshalJSON ¶
func (c GuildTextChannel) MarshalJSON() ([]byte, error)
func (GuildTextChannel) Mention ¶
func (c GuildTextChannel) Mention() string
func (GuildTextChannel) NSFW ¶
func (c GuildTextChannel) NSFW() bool
func (GuildTextChannel) Name ¶
func (c GuildTextChannel) Name() string
func (GuildTextChannel) ParentID ¶
func (c GuildTextChannel) ParentID() *snowflake.ID
func (GuildTextChannel) PermissionOverwrites ¶
func (c GuildTextChannel) PermissionOverwrites() PermissionOverwrites
func (GuildTextChannel) Position ¶
func (c GuildTextChannel) Position() int
func (GuildTextChannel) RateLimitPerUser ¶ added in v0.13.12
func (c GuildTextChannel) RateLimitPerUser() int
func (GuildTextChannel) String ¶
func (c GuildTextChannel) String() string
func (GuildTextChannel) Topic ¶
func (c GuildTextChannel) Topic() *string
func (GuildTextChannel) Type ¶
func (GuildTextChannel) Type() ChannelType
func (*GuildTextChannel) UnmarshalJSON ¶
func (c *GuildTextChannel) UnmarshalJSON(data []byte) error
type GuildTextChannelCreate ¶
type GuildTextChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` RateLimitPerUser int `json:"rate_limit_per_user,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID snowflake.ID `json:"parent_id,omitempty"` NSFW bool `json:"nsfw,omitempty"` DefaultAutoArchiveDuration AutoArchiveDuration `json:"default_auto_archive_days,omitempty"` }
func (GuildTextChannelCreate) MarshalJSON ¶
func (c GuildTextChannelCreate) MarshalJSON() ([]byte, error)
func (GuildTextChannelCreate) Type ¶
func (c GuildTextChannelCreate) Type() ChannelType
type GuildTextChannelUpdate ¶
type GuildTextChannelUpdate struct { Name *string `json:"name,omitempty"` Type *ChannelType `json:"type,omitempty"` Position *int `json:"position,omitempty"` Topic *string `json:"topic,omitempty"` NSFW *bool `json:"nsfw,omitempty"` RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID *snowflake.ID `json:"parent_id,omitempty"` DefaultAutoArchiveDuration *AutoArchiveDuration `json:"default_auto_archive_duration,omitempty"` }
type GuildThread ¶
type GuildThread struct { OwnerID snowflake.ID MessageCount int TotalMessageSent int MemberCount int ThreadMetadata ThreadMetadata // contains filtered or unexported fields }
func ApplyGuildIDToThread ¶ added in v0.8.5
func ApplyGuildIDToThread(guildThread GuildThread, guildID snowflake.ID) GuildThread
func (GuildThread) DefaultAutoArchiveDuration ¶ added in v0.8.5
func (c GuildThread) DefaultAutoArchiveDuration() AutoArchiveDuration
DefaultAutoArchiveDuration is always 0 for GuildThread(s) as they do not have their own AutoArchiveDuration.
func (GuildThread) GuildID ¶
func (c GuildThread) GuildID() snowflake.ID
func (GuildThread) ID ¶
func (c GuildThread) ID() snowflake.ID
func (GuildThread) LastMessageID ¶
func (c GuildThread) LastMessageID() *snowflake.ID
func (GuildThread) LastPinTimestamp ¶
func (c GuildThread) LastPinTimestamp() *time.Time
func (GuildThread) MarshalJSON ¶
func (c GuildThread) MarshalJSON() ([]byte, error)
func (GuildThread) Mention ¶
func (c GuildThread) Mention() string
func (GuildThread) NSFW ¶
func (c GuildThread) NSFW() bool
func (GuildThread) Name ¶
func (c GuildThread) Name() string
func (GuildThread) ParentID ¶
func (c GuildThread) ParentID() *snowflake.ID
ParentID is never nil for GuildThread(s).
func (GuildThread) PermissionOverwrites ¶
func (c GuildThread) PermissionOverwrites() PermissionOverwrites
PermissionOverwrites always returns nil for GuildThread(s) as they do not have their own PermissionOverwrites.
func (GuildThread) Position ¶
func (c GuildThread) Position() int
Position always returns 0 for GuildThread(s) as they do not have their own position.
func (GuildThread) RateLimitPerUser ¶
func (c GuildThread) RateLimitPerUser() int
func (GuildThread) String ¶
func (c GuildThread) String() string
func (GuildThread) Topic ¶ added in v0.8.5
func (c GuildThread) Topic() *string
Topic always returns nil for GuildThread(s) as they do not have their own topic.
func (GuildThread) Type ¶
func (c GuildThread) Type() ChannelType
func (*GuildThread) UnmarshalJSON ¶
func (c *GuildThread) UnmarshalJSON(data []byte) error
type GuildThreadUpdate ¶
type GuildThreadUpdate struct { Name *string `json:"name,omitempty"` Archived *bool `json:"archived,omitempty"` AutoArchiveDuration *AutoArchiveDuration `json:"auto_archive_duration,omitempty"` Locked *bool `json:"locked,omitempty"` Invitable *bool `json:"invitable,omitempty"` RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` }
type GuildUpdate ¶
type GuildUpdate struct { Name string `json:"name,omitempty"` VerificationLevel *VerificationLevel `json:"verification_level,omitempty"` DefaultMessageNotificationLevel *MessageNotificationsLevel `json:"default_message_notification_level,omitempty"` ExplicitContentFilterLevel *ExplicitContentFilterLevel `json:"explicit_content_filter_level,omitempty"` AFKChannelID *snowflake.ID `json:"afk_channel_id,omitempty"` AFKTimeout *int `json:"afk_timeout,omitempty"` Icon *json.Nullable[Icon] `json:"icon,omitempty"` OwnerID *snowflake.ID `json:"owner_id,omitempty"` Splash *json.Nullable[Icon] `json:"splash,omitempty"` DiscoverySplash *json.Nullable[Icon] `json:"discovery_splash,omitempty"` Banner *json.Nullable[Icon] `json:"banner,omitempty"` SystemChannelID *snowflake.ID `json:"system_channel_id,omitempty"` SystemChannelFlags *SystemChannelFlags `json:"system_channel_flags,omitempty"` RulesChannelID *snowflake.ID `json:"rules_channel_id,omitempty"` PublicUpdatesChannelID *snowflake.ID `json:"public_updates_channel_id,omitempty"` PreferredLocale *string `json:"preferred_locale,omitempty"` Features []GuildFeature `json:"features,omitempty"` Description *string `json:"description,omitempty"` BoostProgressBarEnabled *bool `json:"premium_progress_bar_enabled,omitempty"` }
GuildUpdate is the payload used to update a Guild
type GuildVoiceChannel ¶
type GuildVoiceChannel struct { UserLimit int VideoQualityMode VideoQualityMode // contains filtered or unexported fields }
func (GuildVoiceChannel) Bitrate ¶
func (c GuildVoiceChannel) Bitrate() int
func (GuildVoiceChannel) DefaultAutoArchiveDuration ¶ added in v0.12.1
func (c GuildVoiceChannel) DefaultAutoArchiveDuration() AutoArchiveDuration
func (GuildVoiceChannel) GuildID ¶
func (c GuildVoiceChannel) GuildID() snowflake.ID
func (GuildVoiceChannel) ID ¶
func (c GuildVoiceChannel) ID() snowflake.ID
func (GuildVoiceChannel) LastMessageID ¶ added in v0.12.1
func (c GuildVoiceChannel) LastMessageID() *snowflake.ID
func (GuildVoiceChannel) LastPinTimestamp ¶ added in v0.12.1
func (c GuildVoiceChannel) LastPinTimestamp() *time.Time
func (GuildVoiceChannel) MarshalJSON ¶
func (c GuildVoiceChannel) MarshalJSON() ([]byte, error)
func (GuildVoiceChannel) Mention ¶
func (c GuildVoiceChannel) Mention() string
func (GuildVoiceChannel) NSFW ¶ added in v0.12.1
func (c GuildVoiceChannel) NSFW() bool
func (GuildVoiceChannel) Name ¶
func (c GuildVoiceChannel) Name() string
func (GuildVoiceChannel) ParentID ¶
func (c GuildVoiceChannel) ParentID() *snowflake.ID
func (GuildVoiceChannel) PermissionOverwrites ¶
func (c GuildVoiceChannel) PermissionOverwrites() PermissionOverwrites
func (GuildVoiceChannel) Position ¶
func (c GuildVoiceChannel) Position() int
func (GuildVoiceChannel) RTCRegion ¶
func (c GuildVoiceChannel) RTCRegion() string
func (GuildVoiceChannel) RateLimitPerUser ¶ added in v0.13.12
func (c GuildVoiceChannel) RateLimitPerUser() int
func (GuildVoiceChannel) String ¶
func (c GuildVoiceChannel) String() string
func (GuildVoiceChannel) Topic ¶ added in v0.12.1
func (c GuildVoiceChannel) Topic() *string
func (GuildVoiceChannel) Type ¶
func (GuildVoiceChannel) Type() ChannelType
func (*GuildVoiceChannel) UnmarshalJSON ¶
func (c *GuildVoiceChannel) UnmarshalJSON(data []byte) error
type GuildVoiceChannelCreate ¶
type GuildVoiceChannelCreate struct { Name string `json:"name"` Topic string `json:"topic,omitempty"` Bitrate int `json:"bitrate,omitempty"` UserLimit int `json:"user_limit,omitempty"` Position int `json:"position,omitempty"` PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID snowflake.ID `json:"parent_id,omitempty"` }
func (GuildVoiceChannelCreate) MarshalJSON ¶
func (c GuildVoiceChannelCreate) MarshalJSON() ([]byte, error)
func (GuildVoiceChannelCreate) Type ¶
func (c GuildVoiceChannelCreate) Type() ChannelType
type GuildVoiceChannelUpdate ¶
type GuildVoiceChannelUpdate struct { Name *string `json:"name,omitempty"` Position *int `json:"position,omitempty"` RateLimitPerUser *int `json:"rate_limit_per_user,omitempty"` Bitrate *int `json:"bitrate,omitempty"` UserLimit *int `json:"user_limit,omitempty"` PermissionOverwrites *[]PermissionOverwrite `json:"permission_overwrites,omitempty"` ParentID *snowflake.ID `json:"parent_id,omitempty"` RTCRegion *string `json:"rtc_region"` VideoQualityMode *VideoQualityMode `json:"video_quality_mode"` }
type GuildWelcomeChannel ¶
type GuildWelcomeChannel struct { ChannelID snowflake.ID `json:"channel_id"` Description string `json:"description"` EmojiID *snowflake.ID `json:"emoji_id,omitempty"` EmojiName *string `json:"emoji_name,omitempty"` }
GuildWelcomeChannel is one of the channels in a WelcomeScreen
type IconType ¶
type IconType string
const ( IconTypeJPEG IconType = "image/jpeg" IconTypePNG IconType = "image/png" IconTypeWEBP IconType = "image/webp" IconTypeGIF IconType = "image/gif" IconTypeUnknown = IconTypeJPEG )
type ImageFormat ¶ added in v0.13.11
type ImageFormat string
ImageFormat is the type of image on Discord's CDN (https://discord.com/developers/docs/reference#image-formatting-image-formats)
const ( ImageFormatNone ImageFormat = "" ImageFormatPNG ImageFormat = "png" ImageFormatJPEG ImageFormat = "jpg" ImageFormatWebP ImageFormat = "webp" ImageFormatGIF ImageFormat = "gif" ImageFormatLottie ImageFormat = "json" )
The available ImageFormat(s)
func (ImageFormat) Animated ¶ added in v0.13.11
func (f ImageFormat) Animated() bool
Animated returns true if the ImageFormat is animated
func (ImageFormat) String ¶ added in v0.13.11
func (f ImageFormat) String() string
String returns the string representation of the ImageFormat
type IncomingWebhook ¶
type IncomingWebhook struct { ChannelID snowflake.ID `json:"channel_id"` GuildID snowflake.ID `json:"guild_id"` Token string `json:"token"` ApplicationID *snowflake.ID `json:"application_id"` User User `json:"user"` // contains filtered or unexported fields }
func (IncomingWebhook) Avatar ¶
func (w IncomingWebhook) Avatar() *string
func (IncomingWebhook) AvatarURL ¶
func (w IncomingWebhook) AvatarURL(opts ...CDNOpt) *string
func (IncomingWebhook) DefaultAvatarURL ¶
func (w IncomingWebhook) DefaultAvatarURL(opts ...CDNOpt) string
func (IncomingWebhook) EffectiveAvatarURL ¶
func (w IncomingWebhook) EffectiveAvatarURL(opts ...CDNOpt) string
func (IncomingWebhook) ID ¶
func (w IncomingWebhook) ID() snowflake.ID
func (IncomingWebhook) MarshalJSON ¶
func (w IncomingWebhook) MarshalJSON() ([]byte, error)
func (IncomingWebhook) Name ¶
func (w IncomingWebhook) Name() string
func (IncomingWebhook) Type ¶
func (IncomingWebhook) Type() WebhookType
func (IncomingWebhook) URL ¶
func (w IncomingWebhook) URL() string
func (*IncomingWebhook) UnmarshalJSON ¶
func (w *IncomingWebhook) UnmarshalJSON(data []byte) error
type InstallationParams ¶
type InstallationParams struct { Scopes []OAuth2Scope `json:"scopes"` Permissions Permissions `json:"permissions"` }
type Integration ¶
type Integration interface { json.Marshaler Type() IntegrationType ID() snowflake.ID }
Integration (https://discord.com/developers/docs/resources/guild#integration-object)
type IntegrationAccount ¶
IntegrationAccount (https://discord.com/developers/docs/resources/guild#integration-account-object)
type IntegrationApplication ¶
type IntegrationApplication struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Icon string `json:"icon"` Description string `json:"description"` Summary string `json:"summary"` Client User `json:"bot"` }
IntegrationApplication (https://discord.com/developers/docs/resources/guild#integration-application-object)
type IntegrationType ¶
type IntegrationType string
IntegrationType the type of Integration
const ( IntegrationTypeTwitch IntegrationType = "twitch" IntegrationTypeYouTube IntegrationType = "youtube" IntegrationTypeBot IntegrationType = "discord" )
All IntegrationType(s)
type Interaction ¶
type Interaction interface { Type() InteractionType BaseInteraction // contains filtered or unexported methods }
Interaction is used for easier unmarshalling of different Interaction(s)
type InteractionResponse ¶
type InteractionResponse struct { Type InteractionResponseType `json:"type"` Data InteractionResponseData `json:"data,omitempty"` }
InteractionResponse is how you answer interactions. If an answer is not sent within 3 seconds of receiving it, the interaction is failed, and you will be unable to respond to it.
func (InteractionResponse) ToBody ¶
func (r InteractionResponse) ToBody() (any, error)
ToBody returns the InteractionResponse ready for body
type InteractionResponseCreator ¶
type InteractionResponseCreator interface {
ToResponseBody(response InteractionResponse) (any, error)
}
type InteractionResponseData ¶ added in v0.12.6
type InteractionResponseData interface {
// contains filtered or unexported methods
}
type InteractionResponseType ¶ added in v0.12.6
type InteractionResponseType int
InteractionResponseType indicates the type of slash command response, whether it's responding immediately or deferring to edit your response later
const ( InteractionResponseTypePong InteractionResponseType = iota + 1 InteractionResponseTypeCreateMessage InteractionResponseTypeDeferredCreateMessage InteractionResponseTypeDeferredUpdateMessage InteractionResponseTypeUpdateMessage InteractionResponseTypeApplicationCommandAutocompleteResult InteractionResponseTypeModal )
Constants for the InteractionResponseType(s)
type InteractionType ¶
type InteractionType int
InteractionType is the type of Interaction
const ( InteractionTypePing InteractionType = iota + 1 InteractionTypeApplicationCommand InteractionTypeComponent InteractionTypeAutocomplete InteractionTypeModalSubmit )
Supported InteractionType(s)
type InteractiveComponent ¶
type Invite ¶
type Invite struct { Code string `json:"code"` Guild *InviteGuild `json:"guild"` Channel *InviteChannel `json:"channel"` ChannelID snowflake.ID `json:"channel_id"` Inviter *User `json:"inviter"` TargetUser *User `json:"target_user"` TargetType InviteTargetType `json:"target_user_type"` ApproximatePresenceCount int `json:"approximate_presence_count"` ApproximateMemberCount int `json:"approximate_member_count"` ExpiresAt *time.Time `json:"created_at"` GuildScheduledEvent *GuildScheduledEvent `json:"guild_scheduled_event"` }
Invite is a partial invite struct
type InviteChannel ¶
type InviteChannel struct { ID snowflake.ID `json:"id"` Type ChannelType `json:"type"` Name string `json:"name"` Icon *string `json:"icon,omitempty"` }
func (InviteChannel) IconURL ¶
func (c InviteChannel) IconURL(opts ...CDNOpt) *string
IconURL returns the Icon URL of this channel. This will be nil for every ChannelType except ChannelTypeGroupDM
type InviteCreate ¶
type InviteCreate struct { MaxAgree int `json:"max_agree,omitempty"` MaxUses int `json:"max_uses,omitempty"` Temporary bool `json:"temporary,omitempty"` Unique bool `json:"unique,omitempty"` TargetType InviteTargetType `json:"target_type,omitempty"` TargetUserID snowflake.ID `json:"target_user_id,omitempty"` TargetApplicationID snowflake.ID `json:"target_application_id,omitempty"` }
type InviteGuild ¶
type InviteGuild struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Splash *string `json:"splash"` Banner *string `json:"banner"` Description *string `json:"description"` Icon *string `json:"icon"` Features []GuildFeature `json:"features"` VerificationLevel VerificationLevel `json:"verification_level"` VanityURLCode *string `json:"vanity_url_code"` }
An InviteGuild is the Guild of an Invite
type InviteTargetType ¶
type InviteTargetType int
InviteTargetType is type of target an Invite uses
const ( InviteTargetTypeStream InviteTargetType = iota + 1 InviteTargetTypeEmbeddedApplication )
Constants for TargetType
type Locale ¶
type Locale string
const ( LocaleEnglishUS Locale = "en-US" LocaleEnglishGB Locale = "en-GB" LocaleBulgarian Locale = "bg" LocaleChineseCN Locale = "zh-CN" LocaleChineseTW Locale = "zh-TW" LocaleCroatian Locale = "hr" LocaleCzech Locale = "cs" LocaleDanish Locale = "da" LocaleDutch Locale = "nl" LocaleFinnish Locale = "fi" LocaleFrench Locale = "fr" LocaleGerman Locale = "de" LocaleGreek Locale = "el" LocaleHindi Locale = "hi" LocaleHungarian Locale = "hu" LocaleItalian Locale = "it" LocaleJapanese Locale = "ja" LocaleKorean Locale = "ko" LocaleLithuanian Locale = "lt" LocaleNorwegian Locale = "no" LocalePolish Locale = "pl" LocalePortugueseBR Locale = "pt-BR" LocaleRomanian Locale = "ro" LocaleRussian Locale = "ru" LocaleSpanishES Locale = "es-ES" LocaleSwedish Locale = "sv-SE" LocaleThai Locale = "th" LocaleTurkish Locale = "tr" LocaleUkrainian Locale = "uk" LocaleVietnamese Locale = "vi" LocaleUnknown Locale = "" )
type Member ¶
type Member struct { User User `json:"user"` Nick *string `json:"nick"` Avatar *string `json:"avatar"` RoleIDs []snowflake.ID `json:"roles,omitempty"` JoinedAt time.Time `json:"joined_at"` PremiumSince *time.Time `json:"premium_since,omitempty"` Deaf bool `json:"deaf,omitempty"` Mute bool `json:"mute,omitempty"` Pending bool `json:"pending"` CommunicationDisabledUntil *time.Time `json:"communication_disabled_until"` // This field is not present everywhere in the API and often populated by disgo GuildID snowflake.ID `json:"guild_id"` }
Member is a discord GuildMember
func (Member) EffectiveAvatarURL ¶
func (Member) EffectiveName ¶
EffectiveName returns either the nickname or username depending on if the user has a nickname
type MemberAdd ¶
type MemberAdd struct { AccessToken string `json:"access_token"` Nick string `json:"nick,omitempty"` Roles []snowflake.ID `json:"roles,omitempty"` Mute bool `json:"mute,omitempty"` Deaf bool `json:"deaf,omitempty"` }
MemberAdd is used to add a member via the oauth2 access token to a guild
type MemberPermissionOverwrite ¶
type MemberPermissionOverwrite struct { UserID snowflake.ID `json:"id"` Allow Permissions `json:"allow"` Deny Permissions `json:"deny"` }
func (MemberPermissionOverwrite) ID ¶
func (o MemberPermissionOverwrite) ID() snowflake.ID
func (MemberPermissionOverwrite) MarshalJSON ¶
func (o MemberPermissionOverwrite) MarshalJSON() ([]byte, error)
func (MemberPermissionOverwrite) Type ¶
func (o MemberPermissionOverwrite) Type() PermissionOverwriteType
type MemberPermissionOverwriteUpdate ¶
type MemberPermissionOverwriteUpdate struct { Allow Permissions `json:"allow"` Deny Permissions `json:"deny"` }
func (MemberPermissionOverwriteUpdate) MarshalJSON ¶
func (u MemberPermissionOverwriteUpdate) MarshalJSON() ([]byte, error)
func (MemberPermissionOverwriteUpdate) Type ¶
func (MemberPermissionOverwriteUpdate) Type() PermissionOverwriteType
type MemberUpdate ¶
type MemberUpdate struct { ChannelID *snowflake.ID `json:"channel_id,omitempty"` Nick *string `json:"nick,omitempty"` Roles *[]snowflake.ID `json:"roles,omitempty"` Mute *bool `json:"mute,omitempty"` Deaf *bool `json:"deaf,omitempty"` CommunicationDisabledUntil *json.Nullable[time.Time] `json:"communication_disabled_until,omitempty"` }
MemberUpdate is used to modify
type MembershipState ¶
type MembershipState int
type MentionType ¶
type Mentionable ¶
type Message ¶
type Message struct { ID snowflake.ID `json:"id"` GuildID *snowflake.ID `json:"guild_id"` Reactions []MessageReaction `json:"reactions"` Attachments []Attachment `json:"attachments"` TTS bool `json:"tts"` Embeds []Embed `json:"embeds,omitempty"` Components []ContainerComponent `json:"components,omitempty"` CreatedAt time.Time `json:"timestamp"` Mentions []User `json:"mentions"` MentionEveryone bool `json:"mention_everyone"` MentionRoles []snowflake.ID `json:"mention_roles"` MentionChannels []Channel `json:"mention_channels"` Pinned bool `json:"pinned"` EditedTimestamp *time.Time `json:"edited_timestamp"` Author User `json:"author"` Member *Member `json:"member"` Content string `json:"content,omitempty"` ChannelID snowflake.ID `json:"channel_id"` Type MessageType `json:"type"` Flags MessageFlags `json:"flags"` MessageReference *MessageReference `json:"message_reference,omitempty"` Interaction *MessageInteraction `json:"interaction,omitempty"` WebhookID *snowflake.ID `json:"webhook_id,omitempty"` Activity *MessageActivity `json:"activity,omitempty"` Application *MessageApplication `json:"application,omitempty"` Stickers []MessageSticker `json:"sticker_items,omitempty"` ReferencedMessage *Message `json:"referenced_message,omitempty"` LastUpdated *time.Time `json:"last_updated,omitempty"` Thread *MessageThread `json:"thread,omitempty"` }
Message is a struct for messages sent in discord text-based channels
func (*Message) ActionRows ¶
func (m *Message) ActionRows() []ActionRowComponent
ActionRows returns all ActionRowComponent(s) from this Message
func (*Message) ButtonByID ¶
func (m *Message) ButtonByID(customID CustomID) *ButtonComponent
ButtonByID returns a ButtonComponent with the specific customID from this Message
func (*Message) Buttons ¶
func (m *Message) Buttons() []ButtonComponent
Buttons returns all ButtonComponent(s) from this Message
func (*Message) ComponentByID ¶
func (m *Message) ComponentByID(customID CustomID) InteractiveComponent
ComponentByID returns the Component with the specific CustomID
func (*Message) InteractiveComponents ¶
func (m *Message) InteractiveComponents() []InteractiveComponent
InteractiveComponents returns the InteractiveComponent(s) from this Message
func (*Message) SelectMenuByID ¶
func (m *Message) SelectMenuByID(customID CustomID) *SelectMenuComponent
SelectMenuByID returns a SelectMenuComponent with the specific customID from this Message
func (*Message) SelectMenus ¶
func (m *Message) SelectMenus() []SelectMenuComponent
SelectMenus returns all SelectMenuComponent(s) from this Message
func (*Message) UnmarshalJSON ¶
type MessageActivity ¶
type MessageActivity struct { Type MessageActivityType `json:"type"` PartyID *string `json:"party_id,omitempty"` }
MessageActivity is used for rich presence-related chat embeds in a Message
type MessageActivityType ¶
type MessageActivityType int
MessageActivityType is the type of MessageActivity https://com/developers/docs/resources/channel#message-object-message-activity-types
const ( MessageActivityTypeJoin MessageActivityType = iota + 1 MessageActivityTypeSpectate MessageActivityTypeListen MessageActivityTypeJoinRequest )
Constants for MessageActivityType
type MessageApplication ¶
type MessageApplication struct { ID snowflake.ID `json:"id"` CoverImage *string `json:"cover_image,omitempty"` Description string `json:"description"` Icon *string `json:"icon,omitempty"` Name string `json:"name"` }
MessageApplication is used for rich presence-related chat embeds in a Message
type MessageBulkDelete ¶
type MessageBulkDelete struct {
Messages []snowflake.ID `json:"messages"`
}
type MessageChannel ¶
type MessageChannel interface { Channel // LastMessageID returns the ID of the last Message sent in this MessageChannel. // This is nil if no Message has been sent yet. LastMessageID() *snowflake.ID // LastPinTimestamp returns when the last Message in this MessageChannel was pinned. // This is nil if no Message has been pinned yet. LastPinTimestamp() *time.Time // contains filtered or unexported methods }
func ApplyLastMessageIDToChannel ¶ added in v0.12.1
func ApplyLastMessageIDToChannel(channel MessageChannel, lastMessageID snowflake.ID) MessageChannel
func ApplyLastPinTimestampToChannel ¶ added in v0.13.0
func ApplyLastPinTimestampToChannel(channel MessageChannel, lastPinTimestamp *time.Time) MessageChannel
type MessageCommand ¶
type MessageCommand struct {
// contains filtered or unexported fields
}
func (MessageCommand) ApplicationID ¶
func (c MessageCommand) ApplicationID() snowflake.ID
func (MessageCommand) DMPermission ¶ added in v0.10.2
func (c MessageCommand) DMPermission() bool
func (MessageCommand) DefaultMemberPermissions ¶ added in v0.10.2
func (c MessageCommand) DefaultMemberPermissions() Permissions
func (MessageCommand) GuildID ¶
func (c MessageCommand) GuildID() *snowflake.ID
func (MessageCommand) ID ¶
func (c MessageCommand) ID() snowflake.ID
func (MessageCommand) MarshalJSON ¶
func (c MessageCommand) MarshalJSON() ([]byte, error)
func (MessageCommand) Name ¶
func (c MessageCommand) Name() string
func (MessageCommand) NameLocalizations ¶
func (c MessageCommand) NameLocalizations() map[Locale]string
func (MessageCommand) NameLocalized ¶
func (c MessageCommand) NameLocalized() string
func (MessageCommand) Type ¶
func (MessageCommand) Type() ApplicationCommandType
func (*MessageCommand) UnmarshalJSON ¶
func (c *MessageCommand) UnmarshalJSON(data []byte) error
func (MessageCommand) Version ¶
func (c MessageCommand) Version() snowflake.ID
type MessageCommandCreate ¶
type MessageCommandCreate struct { Name string `json:"name"` CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"` DefaultMemberPermissions Permissions `json:"default_member_permissions"` DMPermission bool `json:"dm_permission"` }
func (MessageCommandCreate) CommandName ¶
func (c MessageCommandCreate) CommandName() string
func (MessageCommandCreate) MarshalJSON ¶
func (c MessageCommandCreate) MarshalJSON() ([]byte, error)
func (MessageCommandCreate) Type ¶
func (MessageCommandCreate) Type() ApplicationCommandType
type MessageCommandInteractionData ¶
type MessageCommandInteractionData struct { Resolved MessageCommandResolved `json:"resolved"` // contains filtered or unexported fields }
func (MessageCommandInteractionData) CommandID ¶
func (d MessageCommandInteractionData) CommandID() snowflake.ID
func (MessageCommandInteractionData) CommandName ¶
func (d MessageCommandInteractionData) CommandName() string
func (MessageCommandInteractionData) GuildID ¶ added in v0.8.9
func (d MessageCommandInteractionData) GuildID() *snowflake.ID
func (*MessageCommandInteractionData) MarshalJSON ¶
func (d *MessageCommandInteractionData) MarshalJSON() ([]byte, error)
func (MessageCommandInteractionData) TargetID ¶
func (d MessageCommandInteractionData) TargetID() snowflake.ID
func (MessageCommandInteractionData) TargetMessage ¶
func (d MessageCommandInteractionData) TargetMessage() Message
func (MessageCommandInteractionData) Type ¶
func (MessageCommandInteractionData) Type() ApplicationCommandType
func (*MessageCommandInteractionData) UnmarshalJSON ¶
func (d *MessageCommandInteractionData) UnmarshalJSON(data []byte) error
type MessageCommandResolved ¶
type MessageCommandResolved struct {
Messages map[snowflake.ID]Message `json:"messages,omitempty"`
}
type MessageCommandUpdate ¶
type MessageCommandUpdate struct { Name *string `json:"name"` CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"` DefaultMemberPermissions *Permissions `json:"default_member_permissions,omitempty"` DMPermission *bool `json:"dm_permission,omitempty"` }
func (MessageCommandUpdate) CommandName ¶
func (c MessageCommandUpdate) CommandName() *string
func (MessageCommandUpdate) MarshalJSON ¶
func (c MessageCommandUpdate) MarshalJSON() ([]byte, error)
func (MessageCommandUpdate) Type ¶
func (MessageCommandUpdate) Type() ApplicationCommandType
type MessageCreate ¶
type MessageCreate struct { Nonce string `json:"nonce,omitempty"` Content string `json:"content,omitempty"` TTS bool `json:"tts,omitempty"` Embeds []Embed `json:"embeds,omitempty"` Components []ContainerComponent `json:"components,omitempty"` StickerIDs []snowflake.ID `json:"sticker_ids,omitempty"` Files []*File `json:"-"` Attachments []AttachmentCreate `json:"attachments,omitempty"` AllowedMentions *AllowedMentions `json:"allowed_mentions,omitempty"` MessageReference *MessageReference `json:"message_reference,omitempty"` Flags MessageFlags `json:"flags,omitempty"` }
MessageCreate is the struct to create a new Message with
func (MessageCreate) ToBody ¶
func (m MessageCreate) ToBody() (any, error)
ToBody returns the MessageCreate ready for body
func (MessageCreate) ToResponseBody ¶
func (m MessageCreate) ToResponseBody(response InteractionResponse) (any, error)
type MessageCreateBuilder ¶
type MessageCreateBuilder struct {
MessageCreate
}
MessageCreateBuilder helper to build Message(s) easier
func NewMessageCreateBuilder ¶
func NewMessageCreateBuilder() *MessageCreateBuilder
NewMessageCreateBuilder creates a new MessageCreateBuilder to be built later
func (*MessageCreateBuilder) AddActionRow ¶
func (b *MessageCreateBuilder) AddActionRow(components ...InteractiveComponent) *MessageCreateBuilder
AddActionRow adds a new discord.ActionRowComponent with the provided discord.InteractiveComponent(s) to the Message
func (*MessageCreateBuilder) AddContainerComponents ¶
func (b *MessageCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *MessageCreateBuilder
AddContainerComponents adds the discord.ContainerComponent(s) to the Message
func (*MessageCreateBuilder) AddEmbeds ¶
func (b *MessageCreateBuilder) AddEmbeds(embeds ...Embed) *MessageCreateBuilder
AddEmbeds adds multiple embeds to the Message
func (*MessageCreateBuilder) AddFile ¶
func (b *MessageCreateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *MessageCreateBuilder
AddFile adds a discord.File to the discord.MessageCreate
func (*MessageCreateBuilder) AddFiles ¶
func (b *MessageCreateBuilder) AddFiles(files ...*File) *MessageCreateBuilder
AddFiles adds the discord.File(s) to the discord.MessageCreate
func (*MessageCreateBuilder) AddFlags ¶
func (b *MessageCreateBuilder) AddFlags(flags ...MessageFlags) *MessageCreateBuilder
AddFlags adds the MessageFlags of the Message
func (*MessageCreateBuilder) AddStickers ¶
func (b *MessageCreateBuilder) AddStickers(stickerIds ...snowflake.ID) *MessageCreateBuilder
AddStickers adds provided stickers to the Message
func (*MessageCreateBuilder) Build ¶
func (b *MessageCreateBuilder) Build() MessageCreate
Build builds the MessageCreateBuilder to a MessageCreate struct
func (*MessageCreateBuilder) ClearAllowedMentions ¶
func (b *MessageCreateBuilder) ClearAllowedMentions() *MessageCreateBuilder
ClearAllowedMentions clears the discord.AllowedMentions of the Message
func (*MessageCreateBuilder) ClearContainerComponents ¶
func (b *MessageCreateBuilder) ClearContainerComponents() *MessageCreateBuilder
ClearContainerComponents removes all the discord.ContainerComponent(s) of the Message
func (*MessageCreateBuilder) ClearEmbeds ¶
func (b *MessageCreateBuilder) ClearEmbeds() *MessageCreateBuilder
ClearEmbeds removes all the embeds from the Message
func (*MessageCreateBuilder) ClearFiles ¶
func (b *MessageCreateBuilder) ClearFiles() *MessageCreateBuilder
ClearFiles removes all discord.File(s) of this discord.MessageCreate
func (*MessageCreateBuilder) ClearFlags ¶
func (b *MessageCreateBuilder) ClearFlags() *MessageCreateBuilder
ClearFlags clears the discord.MessageFlags of the Message
func (*MessageCreateBuilder) ClearStickers ¶
func (b *MessageCreateBuilder) ClearStickers() *MessageCreateBuilder
ClearStickers removes all Sticker(s) from the Message
func (*MessageCreateBuilder) RemoveContainerComponent ¶
func (b *MessageCreateBuilder) RemoveContainerComponent(i int) *MessageCreateBuilder
RemoveContainerComponent removes a discord.ActionRowComponent from the Message
func (*MessageCreateBuilder) RemoveEmbed ¶
func (b *MessageCreateBuilder) RemoveEmbed(i int) *MessageCreateBuilder
RemoveEmbed removes an embed from the Message
func (*MessageCreateBuilder) RemoveFile ¶
func (b *MessageCreateBuilder) RemoveFile(i int) *MessageCreateBuilder
RemoveFile removes the discord.File at this index
func (*MessageCreateBuilder) RemoveFlags ¶
func (b *MessageCreateBuilder) RemoveFlags(flags ...MessageFlags) *MessageCreateBuilder
RemoveFlags removes the MessageFlags of the Message
func (*MessageCreateBuilder) SetAllowedMentions ¶
func (b *MessageCreateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *MessageCreateBuilder
SetAllowedMentions sets the AllowedMentions of the Message
func (*MessageCreateBuilder) SetContainerComponent ¶
func (b *MessageCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *MessageCreateBuilder
SetContainerComponent sets the provided discord.InteractiveComponent at the index of discord.InteractiveComponent(s)
func (*MessageCreateBuilder) SetContainerComponents ¶
func (b *MessageCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *MessageCreateBuilder
SetContainerComponents sets the discord.ContainerComponent(s) of the Message
func (*MessageCreateBuilder) SetContent ¶
func (b *MessageCreateBuilder) SetContent(content string) *MessageCreateBuilder
SetContent sets the content of the Message
func (*MessageCreateBuilder) SetContentf ¶
func (b *MessageCreateBuilder) SetContentf(content string, a ...any) *MessageCreateBuilder
SetContentf sets the content of the Message but with format
func (*MessageCreateBuilder) SetEmbed ¶
func (b *MessageCreateBuilder) SetEmbed(i int, embed Embed) *MessageCreateBuilder
SetEmbed sets the provided Embed at the index of the Message
func (*MessageCreateBuilder) SetEmbeds ¶
func (b *MessageCreateBuilder) SetEmbeds(embeds ...Embed) *MessageCreateBuilder
SetEmbeds sets the Embed(s) of the Message
func (*MessageCreateBuilder) SetEphemeral ¶
func (b *MessageCreateBuilder) SetEphemeral(ephemeral bool) *MessageCreateBuilder
SetEphemeral adds/removes discord.MessageFlagEphemeral to the Message flags
func (*MessageCreateBuilder) SetFile ¶
func (b *MessageCreateBuilder) SetFile(i int, file *File) *MessageCreateBuilder
SetFile sets the discord.File at the index for this discord.MessageCreate
func (*MessageCreateBuilder) SetFiles ¶
func (b *MessageCreateBuilder) SetFiles(files ...*File) *MessageCreateBuilder
SetFiles sets the File(s) for this MessageCreate
func (*MessageCreateBuilder) SetFlags ¶
func (b *MessageCreateBuilder) SetFlags(flags MessageFlags) *MessageCreateBuilder
SetFlags sets the message flags of the Message
func (*MessageCreateBuilder) SetMessageReference ¶
func (b *MessageCreateBuilder) SetMessageReference(messageReference *MessageReference) *MessageCreateBuilder
SetMessageReference allows you to specify a MessageReference to reply to
func (*MessageCreateBuilder) SetMessageReferenceByID ¶
func (b *MessageCreateBuilder) SetMessageReferenceByID(messageID snowflake.ID) *MessageCreateBuilder
SetMessageReferenceByID allows you to specify a Message CommandID to reply to
func (*MessageCreateBuilder) SetStickers ¶
func (b *MessageCreateBuilder) SetStickers(stickerIds ...snowflake.ID) *MessageCreateBuilder
SetStickers sets the stickers of the Message
func (*MessageCreateBuilder) SetSuppressEmbeds ¶
func (b *MessageCreateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageCreateBuilder
SetSuppressEmbeds adds/removes discord.MessageFlagSuppressEmbeds to the Message flags
func (*MessageCreateBuilder) SetTTS ¶
func (b *MessageCreateBuilder) SetTTS(tts bool) *MessageCreateBuilder
SetTTS sets whether the Message should be text to speech
type MessageFlags ¶
type MessageFlags int64
The MessageFlags of a Message
const ( MessageFlagCrossposted MessageFlags = 1 << iota MessageFlagIsCrosspost MessageFlagSuppressEmbeds MessageFlagSourceMessageDeleted MessageFlagUrgent MessageFlagHasThread MessageFlagEphemeral MessageFlagLoading // Message is an interaction of type 5, awaiting further response MessageFlagsNone MessageFlags = 0 )
Constants for MessageFlags
func (MessageFlags) Add ¶
func (f MessageFlags) Add(bits ...MessageFlags) MessageFlags
Add allows you to add multiple bits together, producing a new bit
func (MessageFlags) Has ¶
func (f MessageFlags) Has(bits ...MessageFlags) bool
Has will ensure that the bit includes all the bits entered
func (MessageFlags) Missing ¶
func (f MessageFlags) Missing(bits ...MessageFlags) bool
Missing will check whether the bit is missing any one of the bits
func (MessageFlags) Remove ¶
func (f MessageFlags) Remove(bits ...MessageFlags) MessageFlags
Remove allows you to subtract multiple bits from the first, producing a new bit
type MessageInteraction ¶
type MessageInteraction struct { ID snowflake.ID `json:"id"` Type InteractionType `json:"type"` Name string `json:"name"` User User `json:"user"` }
MessageInteraction is sent on the Message object when the message_events is a response to an interaction
type MessageNotificationsLevel ¶
type MessageNotificationsLevel int
MessageNotificationsLevel indicates whether users receive @ mentions on a new message
const ( MessageNotificationsLevelAllMessages MessageNotificationsLevel = iota MessageNotificationsLevelOnlyMentions )
Constants for MessageNotificationsLevel
type MessageReaction ¶
type MessageReaction struct { Count int `json:"count"` Me bool `json:"me"` Emoji Emoji `json:"emoji"` }
MessageReaction contains information about the reactions of a message_events
type MessageReference ¶
type MessageReference struct { MessageID *snowflake.ID `json:"message_id"` ChannelID *snowflake.ID `json:"channel_id,omitempty"` GuildID *snowflake.ID `json:"guild_id,omitempty"` FailIfNotExists bool `json:"fail_if_not_exists,omitempty"` }
MessageReference is a reference to another message
type MessageSticker ¶
type MessageSticker struct { ID snowflake.ID `json:"id"` Name string `json:"name"` FormatType StickerFormatType `json:"format_type"` }
type MessageThread ¶ added in v0.11.0
type MessageThread struct { GuildThread Member ThreadMember `json:"member"` }
type MessageType ¶
type MessageType int
The MessageType indicates the Message type
const ( MessageTypeDefault MessageType = iota MessageTypeRecipientAdd MessageTypeRecipientRemove MessageTypeCall MessageTypeChannelNameChange MessageTypeChannelIconChange ChannelPinnedMessage MessageTypeUserJoin MessageTypeGuildBoost MessageTypeGuildBoostTier1 MessageTypeGuildBoostTier2 MessageTypeGuildBoostTier3 MessageTypeChannelFollowAdd MessageTypeGuildDiscoveryDisqualified MessageTypeGuildDiscoveryRequalified MessageTypeGuildDiscoveryGracePeriodInitialWarning MessageTypeGuildDiscoveryGracePeriodFinalWarning MessageTypeThreadCreated MessageTypeReply MessageTypeSlashCommand MessageTypeThreadStarterMessage MessageTypeGuildInviteReminder MessageTypeContextMenuCommand MessageTypeAutoModerationAction )
Constants for the MessageType
func (MessageType) Deleteable ¶ added in v0.12.7
func (t MessageType) Deleteable() bool
func (MessageType) System ¶ added in v0.12.7
func (t MessageType) System() bool
type MessageUpdate ¶
type MessageUpdate struct { Content *string `json:"content,omitempty"` Embeds *[]Embed `json:"embeds,omitempty"` Components *[]ContainerComponent `json:"components,omitempty"` Attachments *[]AttachmentUpdate `json:"attachments,omitempty"` Files []*File `json:"-"` AllowedMentions *AllowedMentions `json:"allowed_mentions,omitempty"` Flags *MessageFlags `json:"flags,omitempty"` }
MessageUpdate is used to edit a Message
func (MessageUpdate) ToBody ¶
func (m MessageUpdate) ToBody() (any, error)
ToBody returns the MessageUpdate ready for body
func (MessageUpdate) ToResponseBody ¶
func (m MessageUpdate) ToResponseBody(response InteractionResponse) (any, error)
type MessageUpdateBuilder ¶
type MessageUpdateBuilder struct {
MessageUpdate
}
MessageUpdateBuilder helper to build MessageUpdate easier
func NewMessageUpdateBuilder ¶
func NewMessageUpdateBuilder() *MessageUpdateBuilder
NewMessageUpdateBuilder creates a new MessageUpdateBuilder to be built later
func (*MessageUpdateBuilder) AddActionRow ¶
func (b *MessageUpdateBuilder) AddActionRow(components ...InteractiveComponent) *MessageUpdateBuilder
AddActionRow adds a new discord.ActionRowComponent with the provided discord.InteractiveComponent(s) to the Message
func (*MessageUpdateBuilder) AddContainerComponents ¶
func (b *MessageUpdateBuilder) AddContainerComponents(containers ...ContainerComponent) *MessageUpdateBuilder
AddContainerComponents adds the discord.ContainerComponent(s) to the Message
func (*MessageUpdateBuilder) AddEmbeds ¶
func (b *MessageUpdateBuilder) AddEmbeds(embeds ...Embed) *MessageUpdateBuilder
AddEmbeds adds multiple embeds to the Message
func (*MessageUpdateBuilder) AddFile ¶
func (b *MessageUpdateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *MessageUpdateBuilder
AddFile adds a new discord.File to the discord.MessageUpdate
func (*MessageUpdateBuilder) AddFiles ¶
func (b *MessageUpdateBuilder) AddFiles(files ...*File) *MessageUpdateBuilder
AddFiles adds the new discord.File(s) to the discord.MessageUpdate
func (*MessageUpdateBuilder) AddFlags ¶
func (b *MessageUpdateBuilder) AddFlags(flags ...MessageFlags) *MessageUpdateBuilder
AddFlags adds the MessageFlags of the Message
func (*MessageUpdateBuilder) Build ¶
func (b *MessageUpdateBuilder) Build() MessageUpdate
Build builds the MessageUpdateBuilder to a MessageUpdate struct
func (*MessageUpdateBuilder) ClearAllowedMentions ¶
func (b *MessageUpdateBuilder) ClearAllowedMentions() *MessageUpdateBuilder
ClearAllowedMentions clears the allowed mentions of the Message
func (*MessageUpdateBuilder) ClearContainerComponents ¶
func (b *MessageUpdateBuilder) ClearContainerComponents() *MessageUpdateBuilder
ClearContainerComponents removes all the discord.ContainerComponent(s) of the Message
func (*MessageUpdateBuilder) ClearContent ¶
func (b *MessageUpdateBuilder) ClearContent() *MessageUpdateBuilder
ClearContent removes content of the Message
func (*MessageUpdateBuilder) ClearEmbeds ¶
func (b *MessageUpdateBuilder) ClearEmbeds() *MessageUpdateBuilder
ClearEmbeds removes all the embeds from the Message
func (*MessageUpdateBuilder) ClearFiles ¶
func (b *MessageUpdateBuilder) ClearFiles() *MessageUpdateBuilder
ClearFiles removes all new files of this discord.MessageUpdate
func (*MessageUpdateBuilder) ClearFlags ¶
func (b *MessageUpdateBuilder) ClearFlags() *MessageUpdateBuilder
ClearFlags clears the MessageFlags of the Message
func (*MessageUpdateBuilder) RemoveContainerComponent ¶
func (b *MessageUpdateBuilder) RemoveContainerComponent(i int) *MessageUpdateBuilder
RemoveContainerComponent removes a discord.ContainerComponent from the Message
func (*MessageUpdateBuilder) RemoveEmbed ¶
func (b *MessageUpdateBuilder) RemoveEmbed(i int) *MessageUpdateBuilder
RemoveEmbed removes an embed from the Message
func (*MessageUpdateBuilder) RemoveFile ¶
func (b *MessageUpdateBuilder) RemoveFile(i int) *MessageUpdateBuilder
RemoveFile removes the new discord.File at this index
func (*MessageUpdateBuilder) RemoveFlags ¶
func (b *MessageUpdateBuilder) RemoveFlags(flags ...MessageFlags) *MessageUpdateBuilder
RemoveFlags removes the MessageFlags of the Message
func (*MessageUpdateBuilder) RetainAttachments ¶
func (b *MessageUpdateBuilder) RetainAttachments(attachments ...Attachment) *MessageUpdateBuilder
RetainAttachments removes all Attachment(s) from this Message except the ones provided
func (*MessageUpdateBuilder) RetainAttachmentsByID ¶
func (b *MessageUpdateBuilder) RetainAttachmentsByID(attachmentIDs ...snowflake.ID) *MessageUpdateBuilder
RetainAttachmentsByID removes all Attachment(s) from this Message except the ones provided
func (*MessageUpdateBuilder) SetAllowedMentions ¶
func (b *MessageUpdateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *MessageUpdateBuilder
SetAllowedMentions sets the AllowedMentions of the Message
func (*MessageUpdateBuilder) SetContainerComponent ¶
func (b *MessageUpdateBuilder) SetContainerComponent(i int, container ContainerComponent) *MessageUpdateBuilder
SetContainerComponent sets the provided discord.InteractiveComponent at the index of discord.InteractiveComponent(s)
func (*MessageUpdateBuilder) SetContainerComponents ¶
func (b *MessageUpdateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *MessageUpdateBuilder
SetContainerComponents sets the discord.ContainerComponent(s) of the Message
func (*MessageUpdateBuilder) SetContent ¶
func (b *MessageUpdateBuilder) SetContent(content string) *MessageUpdateBuilder
SetContent sets content of the Message
func (*MessageUpdateBuilder) SetContentf ¶
func (b *MessageUpdateBuilder) SetContentf(content string, a ...any) *MessageUpdateBuilder
SetContentf sets content of the Message
func (*MessageUpdateBuilder) SetEmbed ¶
func (b *MessageUpdateBuilder) SetEmbed(i int, embed Embed) *MessageUpdateBuilder
SetEmbed sets the provided discord.Embed at the index of the Message
func (*MessageUpdateBuilder) SetEmbeds ¶
func (b *MessageUpdateBuilder) SetEmbeds(embeds ...Embed) *MessageUpdateBuilder
SetEmbeds sets the discord.Embed(s) of the Message
func (*MessageUpdateBuilder) SetFile ¶
func (b *MessageUpdateBuilder) SetFile(i int, file *File) *MessageUpdateBuilder
SetFile sets the new discord.File at the index for this discord.MessageUpdate
func (*MessageUpdateBuilder) SetFiles ¶
func (b *MessageUpdateBuilder) SetFiles(files ...*File) *MessageUpdateBuilder
SetFiles sets the new discord.File(s) for this discord.MessageUpdate
func (*MessageUpdateBuilder) SetFlags ¶
func (b *MessageUpdateBuilder) SetFlags(flags MessageFlags) *MessageUpdateBuilder
SetFlags sets the message flags of the Message
func (*MessageUpdateBuilder) SetSuppressEmbeds ¶
func (b *MessageUpdateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageUpdateBuilder
SetSuppressEmbeds adds/removes discord.MessageFlagSuppressEmbeds to the Message flags
type ModalCreate ¶
type ModalCreate struct { CustomID CustomID `json:"custom_id"` Title string `json:"title"` Components []ContainerComponent `json:"components"` }
type ModalCreateBuilder ¶
type ModalCreateBuilder struct {
ModalCreate
}
func NewModalCreateBuilder ¶
func NewModalCreateBuilder() *ModalCreateBuilder
NewModalCreateBuilder creates a new ModalCreateBuilder to be built later
func (*ModalCreateBuilder) AddActionRow ¶
func (b *ModalCreateBuilder) AddActionRow(components ...InteractiveComponent) *ModalCreateBuilder
AddActionRow adds a new discord.ActionRowComponent with the provided discord.InteractiveComponent(s) to the ModalCreate
func (*ModalCreateBuilder) AddContainerComponents ¶
func (b *ModalCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *ModalCreateBuilder
AddContainerComponents adds the discord.ContainerComponent(s) to the ModalCreate
func (*ModalCreateBuilder) Build ¶
func (b *ModalCreateBuilder) Build() ModalCreate
Build builds the ModalCreateBuilder to a ModalCreate struct
func (*ModalCreateBuilder) ClearContainerComponents ¶
func (b *ModalCreateBuilder) ClearContainerComponents() *ModalCreateBuilder
ClearContainerComponents removes all the discord.ContainerComponent(s) of the ModalCreate
func (*ModalCreateBuilder) RemoveContainerComponent ¶
func (b *ModalCreateBuilder) RemoveContainerComponent(i int) *ModalCreateBuilder
RemoveContainerComponent removes a discord.ActionRowComponent from the ModalCreate
func (*ModalCreateBuilder) SetContainerComponent ¶
func (b *ModalCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *ModalCreateBuilder
SetContainerComponent sets the provided discord.InteractiveComponent at the index of discord.InteractiveComponent(s)
func (*ModalCreateBuilder) SetContainerComponents ¶
func (b *ModalCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *ModalCreateBuilder
SetContainerComponents sets the discord.ContainerComponent(s) of the ModalCreate
func (*ModalCreateBuilder) SetCustomID ¶
func (b *ModalCreateBuilder) SetCustomID(customID CustomID) *ModalCreateBuilder
SetCustomID sets the CustomID of the ModalCreate
func (*ModalCreateBuilder) SetTitle ¶
func (b *ModalCreateBuilder) SetTitle(title string) *ModalCreateBuilder
SetTitle sets the title of the ModalCreate
type ModalSubmitInteraction ¶
type ModalSubmitInteraction struct { BaseInteraction Data ModalSubmitInteractionData `json:"data"` }
func (ModalSubmitInteraction) Type ¶
func (ModalSubmitInteraction) Type() InteractionType
func (*ModalSubmitInteraction) UnmarshalJSON ¶
func (i *ModalSubmitInteraction) UnmarshalJSON(data []byte) error
type ModalSubmitInteractionData ¶
type ModalSubmitInteractionData struct { CustomID CustomID `json:"custom_id"` Components map[CustomID]InteractiveComponent `json:"components"` }
func (ModalSubmitInteractionData) Component ¶
func (d ModalSubmitInteractionData) Component(customID CustomID) (InteractiveComponent, bool)
func (ModalSubmitInteractionData) OptText ¶
func (d ModalSubmitInteractionData) OptText(customID CustomID) (string, bool)
func (ModalSubmitInteractionData) Text ¶
func (d ModalSubmitInteractionData) Text(customID CustomID) string
func (ModalSubmitInteractionData) TextInputComponent ¶
func (d ModalSubmitInteractionData) TextInputComponent(customID CustomID) (TextInputComponent, bool)
func (*ModalSubmitInteractionData) UnmarshalJSON ¶
func (d *ModalSubmitInteractionData) UnmarshalJSON(data []byte) error
type MultipartBuffer ¶
MultipartBuffer holds the Body & ContentType of the multipart body
func PayloadWithFiles ¶
func PayloadWithFiles(v any, files ...*File) (*MultipartBuffer, error)
PayloadWithFiles returns the given payload as multipart body with all files in it
type OAuth2Guild ¶
type OAuth2Guild struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Icon *string `json:"icon"` Owner bool `json:"owner"` Permissions Permissions `json:"permissions"` Features []GuildFeature `json:"features"` }
OAuth2Guild is returned on the GetGuilds route
type OAuth2Scope ¶ added in v0.12.0
type OAuth2Scope string
OAuth2Scope are the scopes you can request in the OAuth2 flow.
const ( // OAuth2ScopeActivitiesRead allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval OAuth2ScopeActivitiesRead OAuth2Scope = "activities.read" // OAuth2ScopeActivitiesWrite allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) OAuth2ScopeActivitiesWrite OAuth2Scope = "activities.write" // OAuth2ScopeApplicationsBuildsRead allows your app to read build data for a user's applications OAuth2ScopeApplicationsBuildsRead OAuth2Scope = "applications.builds.read" // OAuth2ScopeApplicationsBuildsUpload allows your app to upload/update builds for a user's applications - requires Discord approval OAuth2ScopeApplicationsBuildsUpload OAuth2Scope = "applications.builds.upload" OAuth2ScopeApplicationsCommands OAuth2Scope = "applications.commands" OAuth2ScopeApplicationsCommandsUpdate OAuth2Scope = "applications.commands.update" OAuth2ScopeApplicationsCommandsPermissionsUpdate OAuth2Scope = "applications.commands.permissions.update" OAuth2ScopeApplicationsEntitlements OAuth2Scope = "applications.entitlements" OAuth2ScopeApplicationsStoreUpdate OAuth2Scope = "applications.store.update" OAuth2ScopeRPC OAuth2Scope = "rpc" OAuth2ScopeRPCNotificationsRead OAuth2Scope = "rpc.notifications.read" OAuth2ScopeRPCVoiceWrite OAuth2Scope = "rpc.voice.write" OAuth2ScopeRPCVoiceRead OAuth2Scope = "rpc.voice.read" OAuth2ScopeRPCActivitiesWrite OAuth2Scope = "rpc.activities.write" OAuth2ScopeGuilds OAuth2Scope = "guilds" OAuth2ScopeGuildsJoin OAuth2Scope = "guilds.join" OAuth2ScopeGuildsMembersRead OAuth2Scope = "guilds.members.read" OAuth2ScopeGDMJoin OAuth2Scope = "gdm.join" OAuth2ScopeRelationshipsRead OAuth2Scope = "relationships.read" OAuth2ScopeIdentify OAuth2Scope = "identify" OAuth2ScopeEmail OAuth2Scope = "email" OAuth2ScopeConnections OAuth2Scope = "connections" OAuth2ScopeBot OAuth2Scope = "bot" OAuth2ScopeMessagesRead OAuth2Scope = "messages.read" OAuth2ScopeWebhookIncoming OAuth2Scope = "webhook.incoming" )
func SplitScopes ¶
func SplitScopes(joinedScopes string) []OAuth2Scope
func (OAuth2Scope) String ¶ added in v0.12.0
func (s OAuth2Scope) String() string
type OAuth2User ¶
type OAuth2User struct { User // Requires OAuth2ScopeIdentify MfaEnabled bool `json:"mfa_enabled"` Locale string `json:"locale"` Flags UserFlags `json:"flags"` PremiumType PremiumType `json:"premium_type"` // Requires OAuth2ScopeEmail Verified bool `json:"verified"` Email string `json:"email"` }
OAuth2User represents a full User returned by the oauth2 endpoints
type OnlineStatus ¶
type OnlineStatus string
OnlineStatus (https://discord.com/developers/docs/topics/gateway#update-presence-status-types)
const ( OnlineStatusOnline OnlineStatus = "online" OnlineStatusDND OnlineStatus = "dnd" OnlineStatusIdle OnlineStatus = "idle" OnlineStatusInvisible OnlineStatus = "invisible" OnlineStatusOffline OnlineStatus = "offline" )
type OptionalAuditLogEntryInfo ¶
type OptionalAuditLogEntryInfo struct { DeleteMemberDays *string `json:"delete_member_days"` MembersRemoved *string `json:"members_removed"` ChannelID *snowflake.ID `json:"channel_id"` MessageID *snowflake.ID `json:"message_id"` Count *string `json:"count"` ID *string `json:"id"` Type *string `json:"type"` RoleName *string `json:"role_name"` }
OptionalAuditLogEntryInfo (https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info)
type PartialApplication ¶
type PartialApplication struct { ID snowflake.ID `json:"id"` Flags ApplicationFlags `json:"flags"` }
type PartialRole ¶
type PartialRole struct { ID snowflake.ID `json:"id"` Name string `json:"name"` }
PartialRole holds basic info about a Role
type PermissionOverwrite ¶
type PermissionOverwrite interface { Type() PermissionOverwriteType ID() snowflake.ID }
PermissionOverwrite is used to determine who can perform particular actions in a GetGuildChannel
type PermissionOverwriteType ¶
type PermissionOverwriteType int
PermissionOverwriteType is the type of PermissionOverwrite
const ( PermissionOverwriteTypeRole PermissionOverwriteType = iota PermissionOverwriteTypeMember )
Constants for PermissionOverwriteType
type PermissionOverwriteUpdate ¶
type PermissionOverwriteUpdate interface {
Type() PermissionOverwriteType
}
type PermissionOverwrites ¶ added in v0.9.0
type PermissionOverwrites []PermissionOverwrite
func (PermissionOverwrites) Get ¶ added in v0.9.0
func (p PermissionOverwrites) Get(overwriteType PermissionOverwriteType, id snowflake.ID) (PermissionOverwrite, bool)
func (PermissionOverwrites) Member ¶ added in v0.9.0
func (p PermissionOverwrites) Member(id snowflake.ID) (MemberPermissionOverwrite, bool)
func (PermissionOverwrites) Role ¶ added in v0.9.0
func (p PermissionOverwrites) Role(id snowflake.ID) (RolePermissionOverwrite, bool)
type Permissions ¶
type Permissions int64
Permissions extends the Bit structure, and is used within roles and channels (https://discord.com/developers/docs/topics/permissions#permissions)
const ( PermissionSendMessages Permissions = 1 << (iota + 11) PermissionSendTTSMessages PermissionManageMessages PermissionEmbedLinks PermissionAttachFiles PermissionReadMessageHistory PermissionMentionEveryone PermissionUseExternalEmojis )
Constants for the different bit offsets of text channel permissions
const ( PermissionVoiceConnect Permissions = 1 << (iota + 20) PermissionVoiceSpeak PermissionVoiceMuteMembers PermissionVoiceDeafenMembers PermissionVoiceMoveMembers PermissionVoiceUseVAD PermissionVoicePrioritySpeaker Permissions = 1 << (iota + 2) )
Constants for the different bit offsets of voice permissions
const ( PermissionChangeNickname Permissions = 1 << (iota + 26) PermissionManageNicknames PermissionManageRoles PermissionManageWebhooks PermissionManageEmojisAndStickers PermissionUseApplicationCommands PermissionRequestToSpeak PermissionManageEvents PermissionManageThreads PermissionCreatePublicThread PermissionCreatePrivateThread PermissionUseExternalStickers PermissionSendMessagesInThreads PermissionStartEmbeddedActivities PermissionModerateMembers )
Constants for general management.
func (Permissions) Add ¶
func (p Permissions) Add(bits ...Permissions) Permissions
Add allows you to add multiple bits together, producing a new bit
func (Permissions) Has ¶
func (p Permissions) Has(bits ...Permissions) bool
Has will ensure that the bit includes all the bits entered
func (Permissions) MarshalJSON ¶
func (p Permissions) MarshalJSON() ([]byte, error)
MarshalJSON marshals permissions into a string
func (Permissions) Missing ¶
func (p Permissions) Missing(bits ...Permissions) bool
Missing will check whether the bit is missing any one of the bits
func (Permissions) Remove ¶
func (p Permissions) Remove(bits ...Permissions) Permissions
Remove allows you to subtract multiple bits from the first, producing a new bit
func (*Permissions) UnmarshalJSON ¶
func (p *Permissions) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshalls permissions into an int64
type PingInteraction ¶
type PingInteraction struct {
// contains filtered or unexported fields
}
func (PingInteraction) AppPermissions ¶ added in v0.12.7
func (PingInteraction) AppPermissions() *Permissions
func (PingInteraction) ApplicationID ¶
func (i PingInteraction) ApplicationID() snowflake.ID
func (PingInteraction) ChannelID ¶
func (PingInteraction) ChannelID() snowflake.ID
func (PingInteraction) GuildID ¶
func (PingInteraction) GuildID() *snowflake.ID
func (PingInteraction) GuildLocale ¶
func (PingInteraction) GuildLocale() *Locale
func (PingInteraction) ID ¶
func (i PingInteraction) ID() snowflake.ID
func (PingInteraction) Locale ¶
func (PingInteraction) Locale() Locale
func (PingInteraction) MarshalJSON ¶
func (i PingInteraction) MarshalJSON() ([]byte, error)
func (PingInteraction) Member ¶
func (PingInteraction) Member() *ResolvedMember
func (PingInteraction) Token ¶
func (i PingInteraction) Token() string
func (PingInteraction) Type ¶
func (PingInteraction) Type() InteractionType
func (*PingInteraction) UnmarshalJSON ¶
func (i *PingInteraction) UnmarshalJSON(data []byte) error
func (PingInteraction) User ¶
func (PingInteraction) User() User
func (PingInteraction) Version ¶
func (i PingInteraction) Version() int
type PremiumTier ¶
type PremiumTier int
PremiumTier tells you the boost level of a Guild
const ( PremiumTierNone PremiumTier = iota PremiumTier1 PremiumTier2 PremiumTier3 )
Constants for PremiumTier
type PremiumType ¶
type PremiumType int
PremiumType defines the different discord nitro tiers a user can have (https://discord.com/developers/docs/resources/user#user-object-premium-types)
const ( PremiumTypeNone PremiumType = iota PremiumTypeNitroClassic PremiumTypeNitro )
All PremiumType(s)
type Presence ¶
type Presence struct { PresenceUser PresenceUser `json:"user"` GuildID snowflake.ID `json:"guild_id"` Status OnlineStatus `json:"status"` Activities []Activity `json:"activities"` ClientStatus ClientStatus `json:"client_status"` }
Presence (https://discord.com/developers/docs/topics/gateway#presence-update)
type PresenceUser ¶
type PresenceUser struct {
ID snowflake.ID `json:"id"`
}
type QueryValues ¶ added in v0.13.11
QueryValues holds key value pairs of query values
func (QueryValues) Encode ¶ added in v0.13.11
func (q QueryValues) Encode() string
Encode encodes the QueryValues into a string to append to the url
type ReactionEmoji ¶
type ResolvedChannel ¶
type ResolvedChannel struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Type ChannelType `json:"type"` Permissions Permissions `json:"permissions"` ThreadMetadata ThreadMetadata `json:"thread_metadata"` ParentID snowflake.ID `json:"parent_id"` }
type ResolvedMember ¶
type ResolvedMember struct { Member Permissions Permissions `json:"permissions,omitempty"` }
type Role ¶
type Role struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Color int `json:"color"` Hoist bool `json:"hoist"` Position int `json:"position"` Permissions Permissions `json:"permissions"` Managed bool `json:"managed"` Icon *string `json:"icon"` Emoji *string `json:"unicode_emoji"` Mentionable bool `json:"mentionable"` Tags *RoleTag `json:"tags,omitempty"` }
Role is a Guild Role object
type RoleCreate ¶
type RoleCreate struct { Name string `json:"name,omitempty"` Permissions Permissions `json:"permissions,omitempty"` Color int `json:"color,omitempty"` Hoist bool `json:"hoist,omitempty"` Icon *Icon `json:"icon,omitempty"` Emoji *string `json:"unicode_emoji,omitempty"` Mentionable bool `json:"mentionable,omitempty"` }
RoleCreate is the payload to create a Role
type RolePermissionOverwrite ¶
type RolePermissionOverwrite struct { RoleID snowflake.ID `json:"id"` Allow Permissions `json:"allow"` Deny Permissions `json:"deny"` }
func (RolePermissionOverwrite) ID ¶
func (o RolePermissionOverwrite) ID() snowflake.ID
func (RolePermissionOverwrite) MarshalJSON ¶
func (o RolePermissionOverwrite) MarshalJSON() ([]byte, error)
func (RolePermissionOverwrite) Type ¶
func (o RolePermissionOverwrite) Type() PermissionOverwriteType
type RolePermissionOverwriteUpdate ¶
type RolePermissionOverwriteUpdate struct { Allow Permissions `json:"allow"` Deny Permissions `json:"deny"` }
func (RolePermissionOverwriteUpdate) MarshalJSON ¶
func (u RolePermissionOverwriteUpdate) MarshalJSON() ([]byte, error)
func (RolePermissionOverwriteUpdate) Type ¶
func (RolePermissionOverwriteUpdate) Type() PermissionOverwriteType
type RolePositionUpdate ¶
type RolePositionUpdate struct { ID snowflake.ID `json:"id"` Position *int `json:"position"` }
RolePositionUpdate is the payload to update a Role(s) position
type RoleTag ¶
type RoleTag struct { BotID *snowflake.ID `json:"bot_id,omitempty"` IntegrationID *snowflake.ID `json:"integration_id,omitempty"` PremiumSubscriber bool `json:"premium_subscriber"` }
RoleTag are tags a Role has
type RoleUpdate ¶
type RoleUpdate struct { Name *string `json:"name"` Permissions *Permissions `json:"permissions"` Color *int `json:"color"` Hoist *bool `json:"hoist"` Icon *json.Nullable[Icon] `json:"icon,omitempty"` Emoji *string `json:"unicode_emoji,omitempty"` Mentionable *bool `json:"mentionable"` }
RoleUpdate is the payload to update a Role
type ScheduledEventEntityType ¶
type ScheduledEventEntityType int
ScheduledEventEntityType the type of the scheduled event (https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types)
const ( ScheduledEventEntityTypeStageInstance ScheduledEventEntityType = iota + 1 ScheduledEventEntityTypeVoice ScheduledEventEntityTypeExternal )
type ScheduledEventPrivacyLevel ¶
type ScheduledEventPrivacyLevel int
ScheduledEventPrivacyLevel the privacy level of the ScheduledEventPrivacyLevel (https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level)
const (
ScheduledEventPrivacyLevelGuildOnly ScheduledEventPrivacyLevel
)
type ScheduledEventStatus ¶
type ScheduledEventStatus int
ScheduledEventStatus the status of the scheduled event (https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status)
const ( ScheduledEventStatusScheduled ScheduledEventStatus = iota + 1 ScheduledEventStatusActive ScheduledEventStatusCompleted ScheduledEventStatusCancelled )
type SelectMenuComponent ¶
type SelectMenuComponent struct { CustomID CustomID `json:"custom_id"` Placeholder string `json:"placeholder,omitempty"` MinValues *int `json:"min_values,omitempty"` MaxValues int `json:"max_values,omitempty"` Disabled bool `json:"disabled,omitempty"` Options []SelectMenuOption `json:"options,omitempty"` }
func NewSelectMenu ¶
func NewSelectMenu(customID CustomID, placeholder string, options ...SelectMenuOption) SelectMenuComponent
NewSelectMenu builds a new SelectMenuComponent from the provided values
func (SelectMenuComponent) AddOptions ¶
func (c SelectMenuComponent) AddOptions(options ...SelectMenuOption) SelectMenuComponent
AddOptions returns a new SelectMenuComponent with the provided SelectMenuOption(s) added
func (SelectMenuComponent) AsDisabled ¶
func (c SelectMenuComponent) AsDisabled() SelectMenuComponent
AsDisabled returns a new SelectMenuComponent but disabled
func (SelectMenuComponent) AsEnabled ¶
func (c SelectMenuComponent) AsEnabled() SelectMenuComponent
AsEnabled returns a new SelectMenuComponent but enabled
func (SelectMenuComponent) ID ¶
func (c SelectMenuComponent) ID() CustomID
func (SelectMenuComponent) MarshalJSON ¶
func (c SelectMenuComponent) MarshalJSON() ([]byte, error)
func (SelectMenuComponent) RemoveOption ¶
func (c SelectMenuComponent) RemoveOption(index int) SelectMenuComponent
RemoveOption returns a new SelectMenuComponent with the provided SelectMenuOption at the index removed
func (SelectMenuComponent) SetOption ¶
func (c SelectMenuComponent) SetOption(value string, option SelectMenuOption) SelectMenuComponent
SetOption returns a new SelectMenuComponent with the SelectMenuOption which has the value replaced
func (SelectMenuComponent) SetOptions ¶
func (c SelectMenuComponent) SetOptions(options ...SelectMenuOption) SelectMenuComponent
SetOptions returns a new SelectMenuComponent with the provided SelectMenuOption(s)
func (SelectMenuComponent) Type ¶
func (SelectMenuComponent) Type() ComponentType
func (SelectMenuComponent) WithCustomID ¶
func (c SelectMenuComponent) WithCustomID(customID CustomID) SelectMenuComponent
WithCustomID returns a new SelectMenuComponent with the provided customID
func (SelectMenuComponent) WithDisabled ¶
func (c SelectMenuComponent) WithDisabled(disabled bool) SelectMenuComponent
WithDisabled returns a new SelectMenuComponent with the provided disabled
func (SelectMenuComponent) WithMaxValues ¶
func (c SelectMenuComponent) WithMaxValues(maxValue int) SelectMenuComponent
WithMaxValues returns a new SelectMenuComponent with the provided maxValue
func (SelectMenuComponent) WithMinValues ¶
func (c SelectMenuComponent) WithMinValues(minValue int) SelectMenuComponent
WithMinValues returns a new SelectMenuComponent with the provided minValue
func (SelectMenuComponent) WithPlaceholder ¶
func (c SelectMenuComponent) WithPlaceholder(placeholder string) SelectMenuComponent
WithPlaceholder returns a new SelectMenuComponent with the provided placeholder
type SelectMenuInteractionData ¶
type SelectMenuInteractionData struct { Values []string // contains filtered or unexported fields }
func (SelectMenuInteractionData) CustomID ¶
func (d SelectMenuInteractionData) CustomID() CustomID
func (SelectMenuInteractionData) MarshalJSON ¶
func (d SelectMenuInteractionData) MarshalJSON() ([]byte, error)
func (SelectMenuInteractionData) Type ¶
func (SelectMenuInteractionData) Type() ComponentType
func (*SelectMenuInteractionData) UnmarshalJSON ¶
func (d *SelectMenuInteractionData) UnmarshalJSON(data []byte) error
type SelectMenuOption ¶
type SelectMenuOption struct { Label string `json:"label"` Value string `json:"value"` Description string `json:"description,omitempty"` Emoji *ComponentEmoji `json:"emoji,omitempty"` Default bool `json:"default,omitempty"` }
SelectMenuOption represents an option in a SelectMenuComponent
func NewSelectMenuOption ¶
func NewSelectMenuOption(label string, value string) SelectMenuOption
NewSelectMenuOption builds a new SelectMenuOption
func (SelectMenuOption) WithDefault ¶
func (o SelectMenuOption) WithDefault(defaultOption bool) SelectMenuOption
WithDefault returns a new SelectMenuOption as default/non-default
func (SelectMenuOption) WithDescription ¶
func (o SelectMenuOption) WithDescription(description string) SelectMenuOption
WithDescription returns a new SelectMenuOption with the provided description
func (SelectMenuOption) WithEmoji ¶
func (o SelectMenuOption) WithEmoji(emoji ComponentEmoji) SelectMenuOption
WithEmoji returns a new SelectMenuOption with the provided Emoji
func (SelectMenuOption) WithLabel ¶
func (o SelectMenuOption) WithLabel(label string) SelectMenuOption
WithLabel returns a new SelectMenuOption with the provided label
func (SelectMenuOption) WithValue ¶
func (o SelectMenuOption) WithValue(value string) SelectMenuOption
WithValue returns a new SelectMenuOption with the provided value
type SelfNickUpdate ¶
type SelfNickUpdate struct {
Nick string `json:"nick"`
}
SelfNickUpdate is used to update your own nick
type SelfUserUpdate ¶
type SelfUserUpdate struct { Username string `json:"username"` Avatar *json.Nullable[Icon] `json:"avatar"` }
SelfUserUpdate is the payload used to update the OAuth2User
type SessionStartLimit ¶
type SlashCommand ¶
type SlashCommand struct { Description string DescriptionLocalizations map[Locale]string DescriptionLocalized string Options []ApplicationCommandOption // contains filtered or unexported fields }
func (SlashCommand) ApplicationID ¶
func (c SlashCommand) ApplicationID() snowflake.ID
func (SlashCommand) DMPermission ¶ added in v0.10.2
func (c SlashCommand) DMPermission() bool
func (SlashCommand) DefaultMemberPermissions ¶ added in v0.10.2
func (c SlashCommand) DefaultMemberPermissions() Permissions
func (SlashCommand) GuildID ¶
func (c SlashCommand) GuildID() *snowflake.ID
func (SlashCommand) ID ¶
func (c SlashCommand) ID() snowflake.ID
func (SlashCommand) MarshalJSON ¶
func (c SlashCommand) MarshalJSON() ([]byte, error)
func (SlashCommand) Name ¶
func (c SlashCommand) Name() string
func (SlashCommand) NameLocalizations ¶
func (c SlashCommand) NameLocalizations() map[Locale]string
func (SlashCommand) NameLocalized ¶
func (c SlashCommand) NameLocalized() string
func (SlashCommand) Type ¶
func (SlashCommand) Type() ApplicationCommandType
func (*SlashCommand) UnmarshalJSON ¶
func (c *SlashCommand) UnmarshalJSON(data []byte) error
func (SlashCommand) Version ¶
func (c SlashCommand) Version() snowflake.ID
type SlashCommandCreate ¶
type SlashCommandCreate struct { Name string `json:"name"` CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"` Description string `json:"description"` DescriptionLocalizations map[Locale]string `json:"description_localizations,omitempty"` Options []ApplicationCommandOption `json:"options,omitempty"` DefaultMemberPermissions Permissions `json:"default_member_permissions,omitempty"` DMPermission bool `json:"dm_permission"` }
func (SlashCommandCreate) CommandName ¶
func (c SlashCommandCreate) CommandName() string
func (SlashCommandCreate) MarshalJSON ¶
func (c SlashCommandCreate) MarshalJSON() ([]byte, error)
func (SlashCommandCreate) Type ¶
func (SlashCommandCreate) Type() ApplicationCommandType
type SlashCommandInteractionData ¶
type SlashCommandInteractionData struct { SubCommandName *string SubCommandGroupName *string Resolved SlashCommandResolved Options map[string]SlashCommandOption // contains filtered or unexported fields }
func (SlashCommandInteractionData) All ¶
func (d SlashCommandInteractionData) All() []SlashCommandOption
func (SlashCommandInteractionData) Attachment ¶ added in v0.12.0
func (d SlashCommandInteractionData) Attachment(name string) Attachment
func (SlashCommandInteractionData) Bool ¶
func (d SlashCommandInteractionData) Bool(name string) bool
func (SlashCommandInteractionData) Channel ¶
func (d SlashCommandInteractionData) Channel(name string) ResolvedChannel
func (SlashCommandInteractionData) CommandID ¶
func (d SlashCommandInteractionData) CommandID() snowflake.ID
func (SlashCommandInteractionData) CommandName ¶
func (d SlashCommandInteractionData) CommandName() string
func (SlashCommandInteractionData) Find ¶
func (d SlashCommandInteractionData) Find(optionFindFunc func(option SlashCommandOption) bool) (SlashCommandOption, bool)
func (SlashCommandInteractionData) FindAll ¶
func (d SlashCommandInteractionData) FindAll(optionFindFunc func(option SlashCommandOption) bool) []SlashCommandOption
func (SlashCommandInteractionData) Float ¶
func (d SlashCommandInteractionData) Float(name string) float64
func (SlashCommandInteractionData) GetByType ¶
func (d SlashCommandInteractionData) GetByType(optionType ApplicationCommandOptionType) []SlashCommandOption
func (SlashCommandInteractionData) GuildID ¶ added in v0.8.9
func (d SlashCommandInteractionData) GuildID() *snowflake.ID
func (SlashCommandInteractionData) Int ¶
func (d SlashCommandInteractionData) Int(name string) int
func (SlashCommandInteractionData) MarshalJSON ¶
func (d SlashCommandInteractionData) MarshalJSON() ([]byte, error)
func (SlashCommandInteractionData) Member ¶
func (d SlashCommandInteractionData) Member(name string) ResolvedMember
func (SlashCommandInteractionData) OptAttachment ¶ added in v0.12.0
func (d SlashCommandInteractionData) OptAttachment(name string) (Attachment, bool)
func (SlashCommandInteractionData) OptBool ¶
func (d SlashCommandInteractionData) OptBool(name string) (bool, bool)
func (SlashCommandInteractionData) OptChannel ¶
func (d SlashCommandInteractionData) OptChannel(name string) (ResolvedChannel, bool)
func (SlashCommandInteractionData) OptFloat ¶
func (d SlashCommandInteractionData) OptFloat(name string) (float64, bool)
func (SlashCommandInteractionData) OptInt ¶
func (d SlashCommandInteractionData) OptInt(name string) (int, bool)
func (SlashCommandInteractionData) OptMember ¶
func (d SlashCommandInteractionData) OptMember(name string) (ResolvedMember, bool)
func (SlashCommandInteractionData) OptRole ¶
func (d SlashCommandInteractionData) OptRole(name string) (Role, bool)
func (SlashCommandInteractionData) OptSnowflake ¶
func (d SlashCommandInteractionData) OptSnowflake(name string) (snowflake.ID, bool)
func (SlashCommandInteractionData) OptString ¶
func (d SlashCommandInteractionData) OptString(name string) (string, bool)
func (SlashCommandInteractionData) OptUser ¶
func (d SlashCommandInteractionData) OptUser(name string) (User, bool)
func (SlashCommandInteractionData) Option ¶
func (d SlashCommandInteractionData) Option(name string) (SlashCommandOption, bool)
func (SlashCommandInteractionData) Role ¶
func (d SlashCommandInteractionData) Role(name string) Role
func (SlashCommandInteractionData) Snowflake ¶
func (d SlashCommandInteractionData) Snowflake(name string) snowflake.ID
func (SlashCommandInteractionData) String ¶
func (d SlashCommandInteractionData) String(name string) string
func (SlashCommandInteractionData) Type ¶
func (SlashCommandInteractionData) Type() ApplicationCommandType
func (*SlashCommandInteractionData) UnmarshalJSON ¶
func (d *SlashCommandInteractionData) UnmarshalJSON(data []byte) error
func (SlashCommandInteractionData) User ¶
func (d SlashCommandInteractionData) User(name string) User
type SlashCommandOption ¶
type SlashCommandOption struct { Name string `json:"name"` Type ApplicationCommandOptionType `json:"type"` Value json.RawMessage `json:"value"` }
type SlashCommandOptionSubCommand ¶
type SlashCommandOptionSubCommand struct { Name string `json:"name"` Options []SlashCommandOption `json:"options,omitempty"` }
type SlashCommandOptionSubCommandGroup ¶
type SlashCommandOptionSubCommandGroup struct { Name string `json:"name"` Options []SlashCommandOptionSubCommand `json:"options,omitempty"` }
type SlashCommandResolved ¶
type SlashCommandResolved struct { Users map[snowflake.ID]User `json:"users,omitempty"` Members map[snowflake.ID]ResolvedMember `json:"members,omitempty"` Roles map[snowflake.ID]Role `json:"roles,omitempty"` Channels map[snowflake.ID]ResolvedChannel `json:"channels,omitempty"` Attachments map[snowflake.ID]Attachment `json:"attachments,omitempty"` }
type SlashCommandUpdate ¶
type SlashCommandUpdate struct { Name *string `json:"name,omitempty"` CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"` Description *string `json:"description,omitempty"` DescriptionLocalizations *map[Locale]string `json:"description_localizations,omitempty"` Options *[]ApplicationCommandOption `json:"options,omitempty"` DefaultMemberPermissions *Permissions `json:"default_member_permissions,omitempty"` DMPermission *bool `json:"dm_permission,omitempty"` }
func (SlashCommandUpdate) CommandName ¶
func (c SlashCommandUpdate) CommandName() *string
func (SlashCommandUpdate) MarshalJSON ¶
func (c SlashCommandUpdate) MarshalJSON() ([]byte, error)
func (SlashCommandUpdate) Type ¶
func (SlashCommandUpdate) Type() ApplicationCommandType
type StageInstance ¶
type StageInstance struct { ID snowflake.ID `json:"id"` GuildID snowflake.ID `json:"guild_id"` ChannelID snowflake.ID `json:"channel_id"` Topic string `json:"topic"` PrivacyLevel StagePrivacyLevel `json:"privacy_level"` DiscoverableDisabled bool `json:"discoverable_disabled"` }
type StageInstanceCreate ¶
type StageInstanceCreate struct { ChannelID snowflake.ID `json:"channel_id"` Topic string `json:"topic,omitempty"` PrivacyLevel StagePrivacyLevel `json:"privacy_level,omitempty"` SendStartNotification bool `json:"send_start_notification"` }
type StageInstanceUpdate ¶
type StageInstanceUpdate struct { Topic *string `json:"topic,omitempty"` PrivacyLevel *StagePrivacyLevel `json:"privacy_level,omitempty"` }
type StagePrivacyLevel ¶
type StagePrivacyLevel int
const ( StagePrivacyLevelPublic StagePrivacyLevel = iota + 1 StagePrivacyLevelGuildOnly )
type Sticker ¶
type Sticker struct { ID snowflake.ID `json:"id"` PackID *snowflake.ID `json:"pack_id"` Name string `json:"name"` Description string `json:"description"` Tags string `json:"tags"` Type StickerType `json:"type"` FormatType StickerFormatType `json:"format_type"` Available *bool `json:"available"` GuildID *snowflake.ID `json:"guild_id,omitempty"` User *User `json:"user,omitempty"` SortValue *int `json:"sort_value"` }
Sticker is a sticker sent with a Message
type StickerCreate ¶
type StickerCreate struct { Name string `json:"name"` Description string `json:"description,omitempty"` Tags string `json:"tags"` File *File `json:"-"` }
func (StickerCreate) ToBody ¶
func (c StickerCreate) ToBody() (any, error)
ToBody returns the MessageCreate ready for body
type StickerFormatType ¶
type StickerFormatType int
StickerFormatType is the Format type of Sticker
const ( StickerFormatTypePNG StickerFormatType = iota + 1 StickerFormatTypeAPNG StickerFormatTypeLottie )
Constants for StickerFormatType
type StickerPack ¶
type StickerPack struct { ID snowflake.ID `json:"id"` Stickers []Sticker `json:"stickers"` Name string `json:"name"` SkuID snowflake.ID `json:"sku_id"` CoverStickerID snowflake.ID `json:"cover_sticker_id"` Description string `json:"description"` BannerAssetID *snowflake.ID `json:"banner_asset_id"` }
func (StickerPack) BannerURL ¶
func (p StickerPack) BannerURL(opts ...CDNOpt) *string
type StickerPacks ¶
type StickerPacks struct {
StickerPacks []StickerPack `json:"sticker_packs"`
}
type StickerType ¶
type StickerType int
const ( StickerTypeStandard StickerType = iota + 1 StickerTypeGuild )
type StickerUpdate ¶
type SystemChannelFlags ¶
type SystemChannelFlags int
SystemChannelFlags contains the settings for the Guild(s) system channel
const ( SystemChannelFlagSuppressJoinNotifications SystemChannelFlags = 1 << iota SystemChannelFlagSuppressPremiumSubscriptions )
Constants for SystemChannelFlags
type Team ¶
type Team struct { Icon *string `json:"icon"` ID snowflake.ID `json:"id"` Members []TeamMember `json:"members"` Name string `json:"name"` OwnerID snowflake.ID `json:"owner_user_id"` }
type TeamMember ¶
type TeamMember struct { MembershipState MembershipState `json:"membership_state"` Permissions []TeamPermissions `json:"permissions"` TeamID snowflake.ID `json:"team_id"` User User `json:"user"` }
type TeamPermissions ¶
type TeamPermissions string
type TemplateGuild ¶
type TemplateGuild struct { Name string `json:"name"` Description *string `json:"description"` Icon *string `json:"icon_hash"` VerificationLevel VerificationLevel `json:"verification_level"` DefaultMessageNotifications MessageNotificationsLevel `json:"default_message_notifications"` ExplicitContentFilter ExplicitContentFilterLevel `json:"explicit_content_filter"` SystemChannelID *snowflake.ID `json:"system_channel_id"` SystemChannelFlags SystemChannelFlags `json:"system_channel_flags"` PreferredLocale string `json:"preferred_locale"` AfkChannelID *snowflake.ID `json:"afk_channel_id"` AfkTimeout int `json:"afk_timeout"` Roles []GuildCreateRole `json:"roles"` Channels []GuildCreateChannel `json:"channels"` }
type TextInputComponent ¶
type TextInputComponent struct { CustomID CustomID `json:"custom_id"` Style TextInputStyle `json:"style"` Label string `json:"label"` MinLength *int `json:"min_length,omitempty"` MaxLength int `json:"max_length,omitempty"` Required bool `json:"required"` Placeholder string `json:"placeholder,omitempty"` Value string `json:"value,omitempty"` }
func NewParagraphTextInput ¶
func NewParagraphTextInput(customID CustomID, label string) TextInputComponent
func NewShortTextInput ¶
func NewShortTextInput(customID CustomID, label string) TextInputComponent
func NewTextInput ¶
func NewTextInput(customID CustomID, style TextInputStyle, label string) TextInputComponent
func (TextInputComponent) ID ¶
func (c TextInputComponent) ID() CustomID
func (TextInputComponent) MarshalJSON ¶
func (c TextInputComponent) MarshalJSON() ([]byte, error)
func (TextInputComponent) Type ¶
func (TextInputComponent) Type() ComponentType
func (TextInputComponent) WithCustomID ¶
func (c TextInputComponent) WithCustomID(customID CustomID) TextInputComponent
WithCustomID returns a new SelectMenuComponent with the provided customID
func (TextInputComponent) WithMaxLength ¶
func (c TextInputComponent) WithMaxLength(maxLength int) TextInputComponent
WithMaxLength returns a new TextInputComponent with the provided maxLength
func (TextInputComponent) WithMinLength ¶
func (c TextInputComponent) WithMinLength(minLength int) TextInputComponent
WithMinLength returns a new TextInputComponent with the provided minLength
func (TextInputComponent) WithPlaceholder ¶
func (c TextInputComponent) WithPlaceholder(placeholder string) TextInputComponent
WithPlaceholder returns a new TextInputComponent with the provided placeholder
func (TextInputComponent) WithRequired ¶
func (c TextInputComponent) WithRequired(required bool) TextInputComponent
WithRequired returns a new TextInputComponent with the provided required
func (TextInputComponent) WithStyle ¶
func (c TextInputComponent) WithStyle(style TextInputStyle) TextInputComponent
WithStyle returns a new SelectMenuComponent with the provided TextInputStyle
func (TextInputComponent) WithValue ¶
func (c TextInputComponent) WithValue(value string) TextInputComponent
WithValue returns a new TextInputComponent with the provided value
type TextInputStyle ¶
type TextInputStyle int
type ThreadCreate ¶
type ThreadCreate interface { json.Marshaler Type() ChannelType }
type ThreadCreateFromMessage ¶ added in v0.13.12
type ThreadCreateFromMessage struct { Name string `json:"name"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration,omitempty"` }
type ThreadMember ¶
type ThreadMember struct { ThreadID snowflake.ID `json:"id"` UserID snowflake.ID `json:"user_id"` JoinTimestamp time.Time `json:"join_timestamp"` Flags ThreadMemberFlags `json:"flags"` }
type ThreadMemberFlags ¶
type ThreadMemberFlags int
type ThreadMetadata ¶
type ThreadMetadata struct { Archived bool `json:"archived"` AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"` ArchiveTimestamp time.Time `json:"archive_timestamp"` Locked bool `json:"locked"` Invitable bool `json:"invitable"` CreateTimestamp time.Time `json:"create_timestamp"` }
type Timestamp ¶
type Timestamp struct { time.Time TimestampStyle TimestampStyle }
Timestamp represents a timestamp markdown object https://discord.com/developers/docs/reference#message-formatting
func NewTimestamp ¶
func NewTimestamp(style TimestampStyle, time time.Time) Timestamp
NewTimestamp returns a new Timestamp with the given TimestampStyle & time.Time
func ParseTimestamp ¶
ParseTimestamp parses the first Timestamp found in the provided string
func ParseTimestamps ¶
ParseTimestamps parses all Timestamp(s) found in the provided string
func (Timestamp) FormatWith ¶
func (t Timestamp) FormatWith(style TimestampStyle) string
FormatWith returns the Timestamp as markdown with the given TimestampStyle
type TimestampStyle ¶
type TimestampStyle string
TimestampStyle is used to determine how to display the Timestamp for the User in the client
const ( // TimestampStyleNone formats as default TimestampStyleNone TimestampStyle = "" // TimestampStyleShortTime formats time as 16:20 TimestampStyleShortTime TimestampStyle = "t" // TimestampStyleLongTime formats time as 16:20:30 TimestampStyleLongTime TimestampStyle = "T" // TimestampStyleShortDate formats time as 20/04/2021 TimestampStyleShortDate TimestampStyle = "d" // TimestampStyleLongDate formats time as 20 April 2021 TimestampStyleLongDate TimestampStyle = "D" // TimestampStyleShortDateTime formats time as 20 April 2021 16:20 TimestampStyleShortDateTime TimestampStyle = "f" // TimestampStyleLongDateTime formats time as Tuesday, 20 April 2021 16:20 TimestampStyleLongDateTime TimestampStyle = "F" // TimestampStyleRelative formats time as 2 months ago TimestampStyleRelative TimestampStyle = "R" )
func (TimestampStyle) Format ¶
func (f TimestampStyle) Format(seconds int64) string
Format returns the seconds formatted as markdown string
func (TimestampStyle) FormatTime ¶
func (f TimestampStyle) FormatTime(time time.Time) string
FormatTime returns the time.Time formatted as markdown string
type TwitchIntegration ¶
type TwitchIntegration struct { IntegrationID snowflake.ID `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` Syncing bool `json:"syncing"` RoleID snowflake.ID `json:"role_id"` EnableEmoticons bool `json:"enable_emoticons"` ExpireBehavior int `json:"expire_behavior"` ExpireGracePeriod int `json:"expire_grace_period"` User User `json:"user"` Account IntegrationAccount `json:"account"` SyncedAt string `json:"synced_at"` SubscriberCount int `json:"subscriber_account"` Revoked bool `json:"revoked"` }
func (TwitchIntegration) ID ¶
func (i TwitchIntegration) ID() snowflake.ID
func (TwitchIntegration) MarshalJSON ¶
func (i TwitchIntegration) MarshalJSON() ([]byte, error)
func (TwitchIntegration) Type ¶
func (TwitchIntegration) Type() IntegrationType
type UnavailableGuild ¶
type UnavailableGuild struct {}
type UnmarshalApplicationCommand ¶
type UnmarshalApplicationCommand struct {
ApplicationCommand
}
func (*UnmarshalApplicationCommand) UnmarshalJSON ¶
func (u *UnmarshalApplicationCommand) UnmarshalJSON(data []byte) error
type UnmarshalApplicationCommandOption ¶
type UnmarshalApplicationCommandOption struct {
ApplicationCommandOption
}
func (*UnmarshalApplicationCommandOption) UnmarshalJSON ¶
func (u *UnmarshalApplicationCommandOption) UnmarshalJSON(data []byte) error
type UnmarshalApplicationCommandPermission ¶
type UnmarshalApplicationCommandPermission struct {
ApplicationCommandPermission
}
func (*UnmarshalApplicationCommandPermission) UnmarshalJSON ¶
func (p *UnmarshalApplicationCommandPermission) UnmarshalJSON(data []byte) error
type UnmarshalAutocompleteOption ¶
type UnmarshalAutocompleteOption struct {
// contains filtered or unexported fields
}
func (*UnmarshalAutocompleteOption) UnmarshalJSON ¶
func (o *UnmarshalAutocompleteOption) UnmarshalJSON(data []byte) error
type UnmarshalChannel ¶
type UnmarshalChannel struct {
Channel
}
func (*UnmarshalChannel) UnmarshalJSON ¶
func (u *UnmarshalChannel) UnmarshalJSON(data []byte) error
type UnmarshalComponent ¶
type UnmarshalComponent struct {
Component
}
func (*UnmarshalComponent) UnmarshalJSON ¶
func (u *UnmarshalComponent) UnmarshalJSON(data []byte) error
type UnmarshalIntegration ¶
type UnmarshalIntegration struct {
Integration
}
func (*UnmarshalIntegration) UnmarshalJSON ¶
func (i *UnmarshalIntegration) UnmarshalJSON(data []byte) error
type UnmarshalInteraction ¶
type UnmarshalInteraction struct {
Interaction
}
func (*UnmarshalInteraction) UnmarshalJSON ¶
func (i *UnmarshalInteraction) UnmarshalJSON(data []byte) error
type UnmarshalPermissionOverwrite ¶
type UnmarshalPermissionOverwrite struct {
PermissionOverwrite
}
func (*UnmarshalPermissionOverwrite) UnmarshalJSON ¶
func (o *UnmarshalPermissionOverwrite) UnmarshalJSON(data []byte) error
type UnmarshalSlashCommandOption ¶
type UnmarshalSlashCommandOption struct {
// contains filtered or unexported fields
}
func (*UnmarshalSlashCommandOption) UnmarshalJSON ¶
func (o *UnmarshalSlashCommandOption) UnmarshalJSON(data []byte) error
type UnmarshalWebhook ¶
type UnmarshalWebhook struct {
Webhook
}
func (*UnmarshalWebhook) UnmarshalJSON ¶
func (w *UnmarshalWebhook) UnmarshalJSON(data []byte) error
type User ¶
type User struct { ID snowflake.ID `json:"id"` Username string `json:"username"` Discriminator string `json:"discriminator"` Avatar *string `json:"avatar"` Banner *string `json:"banner"` AccentColor *int `json:"accent_color"` Bot bool `json:"bot"` System bool `json:"system"` PublicFlags UserFlags `json:"public_flags"` }
User is a struct for interacting with discord's users
func (User) DefaultAvatarURL ¶
func (User) EffectiveAvatarURL ¶
type UserCommand ¶
type UserCommand struct {
// contains filtered or unexported fields
}
func (UserCommand) ApplicationID ¶
func (c UserCommand) ApplicationID() snowflake.ID
func (UserCommand) DMPermission ¶ added in v0.10.2
func (c UserCommand) DMPermission() bool
func (UserCommand) DefaultMemberPermissions ¶ added in v0.10.2
func (c UserCommand) DefaultMemberPermissions() Permissions
func (UserCommand) GuildID ¶
func (c UserCommand) GuildID() *snowflake.ID
func (UserCommand) ID ¶
func (c UserCommand) ID() snowflake.ID
func (UserCommand) MarshalJSON ¶
func (c UserCommand) MarshalJSON() ([]byte, error)
func (UserCommand) Name ¶
func (c UserCommand) Name() string
func (UserCommand) NameLocalizations ¶
func (c UserCommand) NameLocalizations() map[Locale]string
func (UserCommand) NameLocalized ¶
func (c UserCommand) NameLocalized() string
func (UserCommand) Type ¶
func (c UserCommand) Type() ApplicationCommandType
func (*UserCommand) UnmarshalJSON ¶
func (c *UserCommand) UnmarshalJSON(data []byte) error
func (UserCommand) Version ¶
func (c UserCommand) Version() snowflake.ID
type UserCommandCreate ¶
type UserCommandCreate struct { Name string `json:"name"` CommandNameLocalizations map[Locale]string `json:"name_localizations,omitempty"` DefaultMemberPermissions Permissions `json:"default_member_permissions"` DMPermission bool `json:"dm_permission"` }
func (UserCommandCreate) CommandName ¶
func (c UserCommandCreate) CommandName() string
func (UserCommandCreate) MarshalJSON ¶
func (c UserCommandCreate) MarshalJSON() ([]byte, error)
func (UserCommandCreate) Type ¶
func (UserCommandCreate) Type() ApplicationCommandType
type UserCommandInteractionData ¶
type UserCommandInteractionData struct { Resolved UserCommandResolved `json:"resolved"` // contains filtered or unexported fields }
func (UserCommandInteractionData) CommandID ¶
func (d UserCommandInteractionData) CommandID() snowflake.ID
func (UserCommandInteractionData) CommandName ¶
func (d UserCommandInteractionData) CommandName() string
func (UserCommandInteractionData) GuildID ¶ added in v0.8.9
func (d UserCommandInteractionData) GuildID() *snowflake.ID
func (*UserCommandInteractionData) MarshalJSON ¶
func (d *UserCommandInteractionData) MarshalJSON() ([]byte, error)
func (UserCommandInteractionData) TargetID ¶
func (d UserCommandInteractionData) TargetID() snowflake.ID
func (UserCommandInteractionData) TargetMember ¶
func (d UserCommandInteractionData) TargetMember() ResolvedMember
func (UserCommandInteractionData) TargetUser ¶
func (d UserCommandInteractionData) TargetUser() User
func (UserCommandInteractionData) Type ¶
func (UserCommandInteractionData) Type() ApplicationCommandType
func (*UserCommandInteractionData) UnmarshalJSON ¶
func (d *UserCommandInteractionData) UnmarshalJSON(data []byte) error
type UserCommandResolved ¶
type UserCommandResolved struct { Users map[snowflake.ID]User `json:"users,omitempty"` Members map[snowflake.ID]ResolvedMember `json:"members,omitempty"` }
type UserCommandUpdate ¶
type UserCommandUpdate struct { Name *string `json:"name"` CommandNameLocalizations *map[Locale]string `json:"name_localizations,omitempty"` DefaultMemberPermissions *Permissions `json:"default_member_permissions,omitempty"` DMPermission *bool `json:"dm_permission,omitempty"` }
func (UserCommandUpdate) CommandName ¶
func (c UserCommandUpdate) CommandName() *string
func (UserCommandUpdate) MarshalJSON ¶
func (c UserCommandUpdate) MarshalJSON() ([]byte, error)
func (UserCommandUpdate) Type ¶
func (UserCommandUpdate) Type() ApplicationCommandType
type UserFlags ¶
type UserFlags int
UserFlags defines certain flags/badges a user can have (https://discord.com/developers/docs/resources/user#user-object-user-flags)
const ( UserFlagDiscordEmployee UserFlags = 1 << iota UserFlagPartneredServerOwner UserFlagHypeSquadEvents UserFlagBugHunterLevel1 UserFlagHouseBravery UserFlagHouseBrilliance UserFlagHouseBalance UserFlagEarlySupporter UserFlagTeamUser UserFlagBugHunterLevel2 UserFlagVerifiedBot UserFlagEarlyVerifiedBotDeveloper UserFlagDiscordCertifiedModerator UserFlagBotHTTPInteractions UserFlagsNone UserFlags = 0 )
All UserFlags
type UserVoiceStateUpdate ¶
type VerificationLevel ¶
type VerificationLevel int
The VerificationLevel of a Guild that members must be to send messages
const ( VerificationLevelNone VerificationLevel = iota VerificationLevelLow VerificationLevelMedium VerificationLevelHigh VerificationLevelVeryHigh )
Constants for VerificationLevel
type VideoQualityMode ¶
type VideoQualityMode int
VideoQualityMode https://com/developers/docs/resources/channel#channel-object-video-quality-modes
type VisibilityType ¶
type VisibilityType int
const ( VisibilityTypeNone VisibilityType = iota VisibilityTypeEveryone )
type VoiceRegion ¶
type VoiceRegion struct { ID snowflake.ID `json:"id"` Name string `json:"name"` Vip bool `json:"vip"` Optimal bool `json:"optimal"` Deprecated bool `json:"deprecated"` Custom bool `json:"custom"` }
VoiceRegion (https://discord.com/developers/docs/resources/voice#voice-region-object)
type VoiceState ¶
type VoiceState struct { GuildID snowflake.ID `json:"guild_id,omitempty"` ChannelID *snowflake.ID `json:"channel_id"` UserID snowflake.ID `json:"user_id"` SessionID string `json:"session_id"` GuildDeaf bool `json:"deaf"` GuildMute bool `json:"mute"` SelfDeaf bool `json:"self_deaf"` SelfMute bool `json:"self_mute"` SelfStream bool `json:"self_stream"` SelfVideo bool `json:"self_video"` Suppress bool `json:"suppress"` RequestToSpeakTimestamp *time.Time `json:"request_to_speak_timestamp"` }
VoiceState from Discord
type Webhook ¶
type Webhook interface { json.Marshaler Type() WebhookType ID() snowflake.ID Name() string Avatar() *string AvatarURL(opts ...CDNOpt) *string // contains filtered or unexported methods }
Webhook (https://discord.com/developers/docs/resources/webhook) is a way to post messages to Discord using the Discord API which do not require bot authentication or use.
type WebhookCreate ¶
WebhookCreate is used to create a Webhook
type WebhookMessageCreate ¶
type WebhookMessageCreate struct { Content string `json:"content,omitempty"` Username string `json:"username,omitempty"` AvatarURL string `json:"avatar_url,omitempty"` TTS bool `json:"tts,omitempty"` Embeds []Embed `json:"embeds,omitempty"` Components []ContainerComponent `json:"components,omitempty"` Attachments []AttachmentCreate `json:"attachments,omitempty"` Files []*File `json:"-"` AllowedMentions *AllowedMentions `json:"allowed_mentions,omitempty"` Flags MessageFlags `json:"flags,omitempty"` ThreadName string `json:"thread_name,omitempty"` }
func (WebhookMessageCreate) ToBody ¶
func (m WebhookMessageCreate) ToBody() (any, error)
ToBody returns the MessageCreate ready for body
type WebhookMessageCreateBuilder ¶
type WebhookMessageCreateBuilder struct {
WebhookMessageCreate
}
WebhookMessageCreateBuilder helper to build Message(s) easier
func NewWebhookMessageCreateBuilder ¶
func NewWebhookMessageCreateBuilder() *WebhookMessageCreateBuilder
NewWebhookMessageCreateBuilder creates a new WebhookMessageCreateBuilder to be built later
func (*WebhookMessageCreateBuilder) AddActionRow ¶
func (b *WebhookMessageCreateBuilder) AddActionRow(components ...InteractiveComponent) *WebhookMessageCreateBuilder
AddActionRow adds a new discord.ActionRowComponent with the provided discord.InteractiveComponent(s) to the Message
func (*WebhookMessageCreateBuilder) AddContainerComponents ¶
func (b *WebhookMessageCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *WebhookMessageCreateBuilder
AddContainerComponents adds the discord.ContainerComponent(s) to the Message
func (*WebhookMessageCreateBuilder) AddEmbeds ¶
func (b *WebhookMessageCreateBuilder) AddEmbeds(embeds ...Embed) *WebhookMessageCreateBuilder
AddEmbeds adds multiple embeds to the Message
func (*WebhookMessageCreateBuilder) AddFile ¶
func (b *WebhookMessageCreateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *WebhookMessageCreateBuilder
AddFile adds a discord.File to the discord.MessageCreate
func (*WebhookMessageCreateBuilder) AddFiles ¶
func (b *WebhookMessageCreateBuilder) AddFiles(files ...*File) *WebhookMessageCreateBuilder
AddFiles adds the discord.File(s) to the discord.MessageCreate
func (*WebhookMessageCreateBuilder) AddFlags ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) AddFlags(flags ...MessageFlags) *WebhookMessageCreateBuilder
AddFlags adds the MessageFlags of the Message
func (*WebhookMessageCreateBuilder) Build ¶
func (b *WebhookMessageCreateBuilder) Build() WebhookMessageCreate
Build builds the WebhookMessageCreateBuilder to a MessageCreate struct
func (*WebhookMessageCreateBuilder) ClearAllowedMentions ¶
func (b *WebhookMessageCreateBuilder) ClearAllowedMentions() *WebhookMessageCreateBuilder
ClearAllowedMentions clears the allowed mentions of the Message
func (*WebhookMessageCreateBuilder) ClearContainerComponents ¶
func (b *WebhookMessageCreateBuilder) ClearContainerComponents() *WebhookMessageCreateBuilder
ClearContainerComponents removes all the discord.ContainerComponent(s) of the Message
func (*WebhookMessageCreateBuilder) ClearEmbeds ¶
func (b *WebhookMessageCreateBuilder) ClearEmbeds() *WebhookMessageCreateBuilder
ClearEmbeds removes all the embeds from the Message
func (*WebhookMessageCreateBuilder) ClearFiles ¶
func (b *WebhookMessageCreateBuilder) ClearFiles() *WebhookMessageCreateBuilder
ClearFiles removes all discord.File(s) of this discord.MessageCreate
func (*WebhookMessageCreateBuilder) ClearFlags ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) ClearFlags() *WebhookMessageCreateBuilder
ClearFlags clears the discord.MessageFlags of the Message
func (*WebhookMessageCreateBuilder) RemoveContainerComponent ¶
func (b *WebhookMessageCreateBuilder) RemoveContainerComponent(i int) *WebhookMessageCreateBuilder
RemoveContainerComponent removes a discord.ActionRowComponent from the Message
func (*WebhookMessageCreateBuilder) RemoveEmbed ¶
func (b *WebhookMessageCreateBuilder) RemoveEmbed(i int) *WebhookMessageCreateBuilder
RemoveEmbed removes an embed from the Message
func (*WebhookMessageCreateBuilder) RemoveFile ¶
func (b *WebhookMessageCreateBuilder) RemoveFile(i int) *WebhookMessageCreateBuilder
RemoveFile removes the discord.File at this index
func (*WebhookMessageCreateBuilder) RemoveFlags ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) RemoveFlags(flags ...MessageFlags) *WebhookMessageCreateBuilder
RemoveFlags removes the MessageFlags of the Message
func (*WebhookMessageCreateBuilder) SetAllowedMentions ¶
func (b *WebhookMessageCreateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *WebhookMessageCreateBuilder
SetAllowedMentions sets the AllowedMentions of the Message
func (*WebhookMessageCreateBuilder) SetAvatarURL ¶
func (b *WebhookMessageCreateBuilder) SetAvatarURL(url string) *WebhookMessageCreateBuilder
func (*WebhookMessageCreateBuilder) SetContainerComponent ¶
func (b *WebhookMessageCreateBuilder) SetContainerComponent(i int, container ContainerComponent) *WebhookMessageCreateBuilder
SetContainerComponent sets the provided discord.InteractiveComponent at the index of discord.InteractiveComponent(s)
func (*WebhookMessageCreateBuilder) SetContainerComponents ¶
func (b *WebhookMessageCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *WebhookMessageCreateBuilder
SetContainerComponents sets the discord.ContainerComponent(s) of the Message
func (*WebhookMessageCreateBuilder) SetContent ¶
func (b *WebhookMessageCreateBuilder) SetContent(content string) *WebhookMessageCreateBuilder
SetContent sets content of the Message
func (*WebhookMessageCreateBuilder) SetContentf ¶
func (b *WebhookMessageCreateBuilder) SetContentf(content string, a ...any) *WebhookMessageCreateBuilder
SetContentf sets content of the Message
func (*WebhookMessageCreateBuilder) SetEmbed ¶
func (b *WebhookMessageCreateBuilder) SetEmbed(i int, embed Embed) *WebhookMessageCreateBuilder
SetEmbed sets the provided Embed at the index of the Message
func (*WebhookMessageCreateBuilder) SetEmbeds ¶
func (b *WebhookMessageCreateBuilder) SetEmbeds(embeds ...Embed) *WebhookMessageCreateBuilder
SetEmbeds sets the Embed(s) of the Message
func (*WebhookMessageCreateBuilder) SetFile ¶
func (b *WebhookMessageCreateBuilder) SetFile(i int, file *File) *WebhookMessageCreateBuilder
SetFile sets the discord.File at the index for this discord.MessageCreate
func (*WebhookMessageCreateBuilder) SetFiles ¶
func (b *WebhookMessageCreateBuilder) SetFiles(files ...*File) *WebhookMessageCreateBuilder
SetFiles sets the File(s) for this MessageCreate
func (*WebhookMessageCreateBuilder) SetFlags ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) SetFlags(flags MessageFlags) *WebhookMessageCreateBuilder
SetFlags sets the message flags of the Message
func (*WebhookMessageCreateBuilder) SetSuppressEmbeds ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *WebhookMessageCreateBuilder
SetSuppressEmbeds adds/removes discord.MessageFlagSuppressEmbeds to the Message flags
func (*WebhookMessageCreateBuilder) SetTTS ¶
func (b *WebhookMessageCreateBuilder) SetTTS(tts bool) *WebhookMessageCreateBuilder
SetTTS sets the text to speech of the Message
func (*WebhookMessageCreateBuilder) SetThreadName ¶ added in v0.12.1
func (b *WebhookMessageCreateBuilder) SetThreadName(threadName string) *WebhookMessageCreateBuilder
SetThreadName sets the thread name the new webhook message should create.
func (*WebhookMessageCreateBuilder) SetUsername ¶
func (b *WebhookMessageCreateBuilder) SetUsername(username string) *WebhookMessageCreateBuilder
type WebhookMessageUpdate ¶
type WebhookMessageUpdate struct { Content *string `json:"content,omitempty"` Embeds *[]Embed `json:"embeds,omitempty"` Components *[]ContainerComponent `json:"components,omitempty"` Attachments *[]AttachmentUpdate `json:"attachments,omitempty"` Files []*File `json:"-"` AllowedMentions *AllowedMentions `json:"allowed_mentions,omitempty"` }
WebhookMessageUpdate is used to edit a Message
func (WebhookMessageUpdate) ToBody ¶
func (m WebhookMessageUpdate) ToBody() (any, error)
ToBody returns the WebhookMessageUpdate ready for body
type WebhookMessageUpdateBuilder ¶
type WebhookMessageUpdateBuilder struct {
WebhookMessageUpdate
}
WebhookMessageUpdateBuilder helper to build MessageUpdate easier
func NewWebhookMessageUpdateBuilder ¶
func NewWebhookMessageUpdateBuilder() *WebhookMessageUpdateBuilder
NewWebhookMessageUpdateBuilder creates a new WebhookMessageUpdateBuilder to be built later
func (*WebhookMessageUpdateBuilder) AddActionRow ¶
func (b *WebhookMessageUpdateBuilder) AddActionRow(components ...InteractiveComponent) *WebhookMessageUpdateBuilder
AddActionRow adds a new discord.ActionRowComponent with the provided discord.InteractiveComponent(s) to the Message
func (*WebhookMessageUpdateBuilder) AddContainerComponents ¶
func (b *WebhookMessageUpdateBuilder) AddContainerComponents(containers ...ContainerComponent) *WebhookMessageUpdateBuilder
AddContainerComponents adds the discord.ContainerComponent(s) to the Message
func (*WebhookMessageUpdateBuilder) AddEmbeds ¶
func (b *WebhookMessageUpdateBuilder) AddEmbeds(embeds ...Embed) *WebhookMessageUpdateBuilder
AddEmbeds adds multiple embeds to the Message
func (*WebhookMessageUpdateBuilder) AddFile ¶
func (b *WebhookMessageUpdateBuilder) AddFile(name string, description string, reader io.Reader, flags ...FileFlags) *WebhookMessageUpdateBuilder
AddFile adds a new discord.File to the discord.MessageUpdate
func (*WebhookMessageUpdateBuilder) AddFiles ¶
func (b *WebhookMessageUpdateBuilder) AddFiles(files ...*File) *WebhookMessageUpdateBuilder
AddFiles adds the new discord.File(s) to the discord.MessageUpdate
func (*WebhookMessageUpdateBuilder) Build ¶
func (b *WebhookMessageUpdateBuilder) Build() WebhookMessageUpdate
Build builds the WebhookMessageUpdateBuilder to a MessageUpdate struct
func (*WebhookMessageUpdateBuilder) ClearAllowedMentions ¶
func (b *WebhookMessageUpdateBuilder) ClearAllowedMentions() *WebhookMessageUpdateBuilder
ClearAllowedMentions clears the allowed mentions of the Message
func (*WebhookMessageUpdateBuilder) ClearContainerComponents ¶
func (b *WebhookMessageUpdateBuilder) ClearContainerComponents() *WebhookMessageUpdateBuilder
ClearContainerComponents removes all the discord.ContainerComponent(s) of the Message
func (*WebhookMessageUpdateBuilder) ClearContent ¶
func (b *WebhookMessageUpdateBuilder) ClearContent() *WebhookMessageUpdateBuilder
ClearContent removes content of the Message
func (*WebhookMessageUpdateBuilder) ClearEmbeds ¶
func (b *WebhookMessageUpdateBuilder) ClearEmbeds() *WebhookMessageUpdateBuilder
ClearEmbeds removes all the embeds from the Message
func (*WebhookMessageUpdateBuilder) ClearFiles ¶
func (b *WebhookMessageUpdateBuilder) ClearFiles() *WebhookMessageUpdateBuilder
ClearFiles removes all new discord.File(s) of this discord.MessageUpdate
func (*WebhookMessageUpdateBuilder) RemoveContainerComponent ¶
func (b *WebhookMessageUpdateBuilder) RemoveContainerComponent(i int) *WebhookMessageUpdateBuilder
RemoveContainerComponent removes a discord.ContainerComponent from the Message
func (*WebhookMessageUpdateBuilder) RemoveEmbed ¶
func (b *WebhookMessageUpdateBuilder) RemoveEmbed(i int) *WebhookMessageUpdateBuilder
RemoveEmbed removes an embed from the Message
func (*WebhookMessageUpdateBuilder) RemoveFile ¶
func (b *WebhookMessageUpdateBuilder) RemoveFile(i int) *WebhookMessageUpdateBuilder
RemoveFile removes the new discord.File at this index
func (*WebhookMessageUpdateBuilder) RetainAttachments ¶
func (b *WebhookMessageUpdateBuilder) RetainAttachments(attachments ...Attachment) *WebhookMessageUpdateBuilder
RetainAttachments removes all Attachment(s) from this Message except the ones provided
func (*WebhookMessageUpdateBuilder) RetainAttachmentsByID ¶
func (b *WebhookMessageUpdateBuilder) RetainAttachmentsByID(attachmentIDs ...snowflake.ID) *WebhookMessageUpdateBuilder
RetainAttachmentsByID removes all Attachment(s) from this Message except the ones provided
func (*WebhookMessageUpdateBuilder) SetAllowedMentions ¶
func (b *WebhookMessageUpdateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *WebhookMessageUpdateBuilder
SetAllowedMentions sets the AllowedMentions of the Message
func (*WebhookMessageUpdateBuilder) SetContainerComponent ¶
func (b *WebhookMessageUpdateBuilder) SetContainerComponent(i int, container ContainerComponent) *WebhookMessageUpdateBuilder
SetContainerComponent sets the provided discord.InteractiveComponent at the index of discord.InteractiveComponent(s)
func (*WebhookMessageUpdateBuilder) SetContainerComponents ¶
func (b *WebhookMessageUpdateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *WebhookMessageUpdateBuilder
SetContainerComponents sets the discord.ContainerComponent(s) of the Message
func (*WebhookMessageUpdateBuilder) SetContent ¶
func (b *WebhookMessageUpdateBuilder) SetContent(content string) *WebhookMessageUpdateBuilder
SetContent sets content of the Message
func (*WebhookMessageUpdateBuilder) SetContentf ¶
func (b *WebhookMessageUpdateBuilder) SetContentf(content string, a ...any) *WebhookMessageUpdateBuilder
SetContentf sets content of the Message
func (*WebhookMessageUpdateBuilder) SetEmbed ¶
func (b *WebhookMessageUpdateBuilder) SetEmbed(i int, embed Embed) *WebhookMessageUpdateBuilder
SetEmbed sets the provided Embed at the index of the Message
func (*WebhookMessageUpdateBuilder) SetEmbeds ¶
func (b *WebhookMessageUpdateBuilder) SetEmbeds(embeds ...Embed) *WebhookMessageUpdateBuilder
SetEmbeds sets the Embed(s) of the Message
func (*WebhookMessageUpdateBuilder) SetFile ¶
func (b *WebhookMessageUpdateBuilder) SetFile(i int, file *File) *WebhookMessageUpdateBuilder
SetFile sets the new discord.File at the index for this discord.MessageUpdate
func (*WebhookMessageUpdateBuilder) SetFiles ¶
func (b *WebhookMessageUpdateBuilder) SetFiles(files ...*File) *WebhookMessageUpdateBuilder
SetFiles sets the new discord.File(s) for this discord.MessageUpdate
type WebhookSourceChannel ¶
type WebhookSourceChannel struct { ID snowflake.ID `json:"id"` Name string `json:"name"` }
type WebhookSourceGuild ¶
type WebhookType ¶
type WebhookType int
WebhookType (https: //discord.com/developers/docs/resources/webhook#webhook-object-webhook-types)
const ( WebhookTypeIncoming WebhookType = iota + 1 WebhookTypeChannelFollower WebhookTypeApplication )
All WebhookType(s)
type WebhookUpdate ¶
type WebhookUpdate struct { Name *string `json:"name,omitempty"` Avatar *json.Nullable[Icon] `json:"avatar,omitempty"` ChannelID *snowflake.ID `json:"channel_id"` }
WebhookUpdate is used to update a Webhook
type WebhookUpdateWithToken ¶
type WebhookUpdateWithToken struct { Name *string `json:"name,omitempty"` Avatar *string `json:"avatar,omitempty"` }
WebhookUpdateWithToken is used to update a Webhook with the token
type WelcomeScreen ¶
type WelcomeScreen struct { Description *string `json:"description,omitempty"` WelcomeChannels []GuildWelcomeChannel `json:"welcome_channels"` }
WelcomeScreen is the Welcome Screen of a Guild
type YouTubeIntegration ¶
type YouTubeIntegration struct { IntegrationID snowflake.ID `json:"id"` Name string `json:"name"` Enabled bool `json:"enabled"` Syncing bool `json:"syncing"` RoleID snowflake.ID `json:"role_id"` ExpireBehavior int `json:"expire_behavior"` ExpireGracePeriod int `json:"expire_grace_period"` User User `json:"user"` Account IntegrationAccount `json:"account"` SyncedAt string `json:"synced_at"` SubscriberCount int `json:"subscriber_account"` Revoked bool `json:"revoked"` }
func (YouTubeIntegration) ID ¶
func (i YouTubeIntegration) ID() snowflake.ID
func (YouTubeIntegration) MarshalJSON ¶
func (i YouTubeIntegration) MarshalJSON() ([]byte, error)
func (YouTubeIntegration) Type ¶
func (YouTubeIntegration) Type() IntegrationType
Source Files ¶
- access_token.go
- activity.go
- allowed_mentions.go
- application.go
- application_command.go
- application_command_autocomplete_option.go
- application_command_create.go
- application_command_option.go
- application_command_permission.go
- application_command_raw.go
- application_command_update.go
- attachment.go
- audit_log.go
- auto_moderation.go
- ban.go
- cdn_endpoints.go
- channel.go
- channel_create.go
- channel_update.go
- channels_raw.go
- component.go
- connection.go
- embed.go
- embed_builder.go
- emoji.go
- errors.go
- file.go
- gateway.go
- guild.go
- guild_scheduled_event.go
- guild_template.go
- icon.go
- integration.go
- interaction.go
- interaction_application_command.go
- interaction_autocomplete.go
- interaction_base.go
- interaction_component.go
- interaction_modal_submit.go
- interaction_ping.go
- interaction_response.go
- invite.go
- locale.go
- member.go
- mentionable.go
- message.go
- message_create.go
- message_create_builder.go
- message_update.go
- message_update_builder.go
- modal_create.go
- permission_overwrite.go
- permissions.go
- presence.go
- role.go
- slash_command_option.go
- stage_instance.go
- sticker.go
- thread.go
- thread_member.go
- timestamp.go
- url.go
- user.go
- voice_region.go
- voice_state.go
- webhook.go
- webhook_message_create.go
- webhook_message_create_builder.go
- webhook_message_update.go
- webhook_message_update_builder.go