discord

package
v0.7.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationFlagGatewayPresence = 1 << (iota + 12)
	ApplicationFlagGatewayPresenceLimited
	ApplicationFlagGatewayGuildMembers
	ApplicationFlagGatewayGuildMemberLimited
	ApplicationFlagVerificationPendingGuildLimit
	ApplicationFlagEmbedded
)
View Source
const (
	MembershipStateInvited = iota + 1
	MembershipStateAccepted
)
View Source
const (
	ApplicationCommandTypeSlash = iota + 1
	ApplicationCommandTypeUser
	ApplicationCommandTypeMessage
)
View Source
const (
	ApplicationCommandPermissionTypeRole = iota + 1
	ApplicationCommandPermissionTypeUser
)

types of ApplicationCommandPermissionType

View Source
const (
	VideoQualityModeAuto = iota + 1
	VideoQualityModeFull
)
View Source
const (
	ComponentTypeActionRow = iota + 1
	ComponentTypeButton
	ComponentTypeSelectMenu
	ComponentTypeTextInput
)

Supported ComponentType(s)

View Source
const (
	ButtonStylePrimary = iota + 1
	ButtonStyleSecondary
	ButtonStyleSuccess
	ButtonStyleDanger
	ButtonStyleLink
)

Supported ButtonStyle(s)

View Source
const (
	TextInputStyleShort = iota + 1
	TextInputStyleParagraph
)

Constants for the different bit offsets of general permissions

View Source
const ScopeSeparator = " "
View Source
const (
	TeamPermissionAdmin = "*"
)
View Source
const TimeFormat = "2006-01-02T15:04:05+00:00"

Variables

View Source
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("BotToken is not in a valid format")
	ErrNoBotToken      = errors.New("please specify the BotToken")

	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")
)
View Source
var (
	MentionTypeUser      = MentionType{regexp.MustCompile(`<@!?(\d+)>`)}
	MentionTypeRole      = MentionType{regexp.MustCompile(`<@&(\d+)>`)}
	MentionTypeChannel   = MentionType{regexp.MustCompile(`<#(\d+)>`)}
	MentionTypeEmoji     = MentionType{regexp.MustCompile(`<a?:([a-zA-Z0-9_]+):([0-9]+)>`)}
	MentionTypeTimestamp = MentionType{regexp.MustCompile(`<t:(?P<time>-?\d{1,17})(?::(?P<format>[tTdDfFR]))?>`)}
	MentionTypeHere      = MentionType{regexp.MustCompile(`@here`)}
	MentionTypeEveryone  = MentionType{regexp.MustCompile(`@everyone`)}
)

DefaultAllowedMentions gives you the default AllowedMentions for a Message

View Source
var ErrNoTimestampMatch = errors.New("no matching timestamp found in string")

ErrNoTimestampMatch is returned when no valid Timestamp is found in the Message

View Source
var Locales = map[Locale]string{
	EnglishUS:    "English (United States)",
	EnglishGB:    "English (Great Britain)",
	Bulgarian:    "Bulgarian",
	ChineseCN:    "Chinese (China)",
	ChineseTW:    "Chinese (Taiwan)",
	Croatian:     "Croatian",
	Czech:        "Czech",
	Danish:       "Danish",
	Dutch:        "Dutch",
	Finnish:      "Finnish",
	French:       "French",
	German:       "German",
	Greek:        "Greek",
	Hindi:        "Hindi",
	Hungarian:    "Hungarian",
	Italian:      "Italian",
	Japanese:     "Japanese",
	Korean:       "Korean",
	Lithuanian:   "Lithuanian",
	Norwegian:    "Norwegian",
	Polish:       "Polish",
	PortugueseBR: "Portuguese (Brazil)",
	Romanian:     "Romanian",
	Russian:      "Russian",
	SpanishES:    "Spanish (Spain)",
	Swedish:      "Swedish",
	Thai:         "Thai",
	Turkish:      "Turkish",
	Ukrainian:    "Ukrainian",
	Vietnamese:   "Vietnamese",
	Unknown:      "unknown",
}

Functions

func FormatAssetURL

func FormatAssetURL(cdnRoute *route.CDNRoute, entityId snowflake.Snowflake, assetId *string, size int) *string

func HasScope

func HasScope(scope ApplicationScope, scopes ...ApplicationScope) bool

func JoinScopes

func JoinScopes(scopes []ApplicationScope) string

Types

type APIError

type APIError struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
	Errors  string    `json:"errors"`
}

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) UnmarshalJSON

func (e *APIError) UnmarshalJSON(data []byte) error

type AccessTokenExchange

type AccessTokenExchange struct {
	AccessToken  string           `json:"access_token"`
	TokenType    TokenType        `json:"token_type"`
	ExpiresIn    time.Duration    `json:"expires_in"`
	RefreshToken string           `json:"refresh_token"`
	Scope        string           `json:"scope"`
	Webhook      *IncomingWebhook `json:"webhook"`
}

func (*AccessTokenExchange) UnmarshalJSON

func (e *AccessTokenExchange) UnmarshalJSON(data []byte) error

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) Type

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.Snowflake `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         int                 `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

type ActivityButton struct {
	Label string `json:"label"`
	URL   string `json:"url"`
}

type ActivityEmoji

type ActivityEmoji struct {
	Name     string               `json:"name"`
	ID       *snowflake.Snowflake `json:"id,omitempty"`
	Animated *bool                `json:"animated,omitempty"`
}

ActivityEmoji is an Emoji object for an Activity

type ActivityParty

type ActivityParty struct {
	ID   snowflake.Snowflake `json:"id,omitempty"`
	Size []int               `json:"size,omitempty"`
}

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.Snowflake `json:"roles"`
	Users       []snowflake.Snowflake `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.Snowflake  `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.Snowflake `json:"guild_id,omitempty"`
	PrimarySkuID          *snowflake.Snowflake `json:"primary_sku_id,omitempty"`
	Slug                  *string              `json:"slug,omitempty"`
	CoverImage            *string              `json:"cover_image,omitempty"`
	Flags                 ApplicationFlags     `json:"flags,omitempty"`
}

type ApplicationCommand

type ApplicationCommand interface {
	json.Marshaler
	Type() ApplicationCommandType
	ID() snowflake.Snowflake
	Name() string
	// contains filtered or unexported methods
}

type ApplicationCommandCreate

type ApplicationCommandCreate interface {
	json.Marshaler
	Type() ApplicationCommandType
	Name() string
	// contains filtered or unexported methods
}

type ApplicationCommandInteraction

type ApplicationCommandInteraction struct {
	BaseInteraction
	Data ApplicationCommandInteractionData `json:"data"`
}

func (ApplicationCommandInteraction) Type added in v0.6.9

func (*ApplicationCommandInteraction) UnmarshalJSON added in v0.6.9

func (i *ApplicationCommandInteraction) UnmarshalJSON(data []byte) error

type ApplicationCommandInteractionData added in v0.6.9

type ApplicationCommandInteractionData interface {
	Type() ApplicationCommandType
	ID() snowflake.Snowflake
	Name() string
	// contains filtered or unexported methods
}

type ApplicationCommandOption

type ApplicationCommandOption interface {
	json.Marshaler
	Type() ApplicationCommandOptionType
	// contains filtered or unexported methods
}

type ApplicationCommandOptionAttachment added in v0.7.1

type ApplicationCommandOptionAttachment struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required,omitempty"`
}

func (ApplicationCommandOptionAttachment) MarshalJSON added in v0.7.1

func (o ApplicationCommandOptionAttachment) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionAttachment) Type added in v0.7.1

type ApplicationCommandOptionBool

type ApplicationCommandOptionBool struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required,omitempty"`
}

func (ApplicationCommandOptionBool) MarshalJSON

func (o ApplicationCommandOptionBool) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionBool) Type

type ApplicationCommandOptionChannel

type ApplicationCommandOptionChannel struct {
	Name         string        `json:"name"`
	Description  string        `json:"description"`
	Required     bool          `json:"required,omitempty"`
	ChannelTypes []ChannelType `json:"channel_types,omitempty"`
}

func (ApplicationCommandOptionChannel) MarshalJSON

func (o ApplicationCommandOptionChannel) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionChannel) Type

type ApplicationCommandOptionChoice

type ApplicationCommandOptionChoice interface {
	// contains filtered or unexported methods
}

type ApplicationCommandOptionChoiceFloat

type ApplicationCommandOptionChoiceFloat struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
}

type ApplicationCommandOptionChoiceInt

type ApplicationCommandOptionChoiceInt struct {
	Name  string `json:"name"`
	Value int    `json:"value"`
}

type ApplicationCommandOptionChoiceString

type ApplicationCommandOptionChoiceString struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type ApplicationCommandOptionFloat

type ApplicationCommandOptionFloat struct {
	Name         string                                `json:"name"`
	Description  string                                `json:"description"`
	Required     bool                                  `json:"required,omitempty"`
	Choices      []ApplicationCommandOptionChoiceFloat `json:"choices,omitempty"`
	Autocomplete bool                                  `json:"autocomplete,omitempty"`
	MinValue     *json.NullFloat                       `json:"min_value,omitempty"`
	MaxValue     *json.NullFloat                       `json:"max_value,omitempty"`
}

func (ApplicationCommandOptionFloat) MarshalJSON

func (o ApplicationCommandOptionFloat) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionFloat) Type

type ApplicationCommandOptionInt

type ApplicationCommandOptionInt struct {
	Name         string                              `json:"name"`
	Description  string                              `json:"description"`
	Required     bool                                `json:"required,omitempty"`
	Choices      []ApplicationCommandOptionChoiceInt `json:"choices,omitempty"`
	Autocomplete bool                                `json:"autocomplete,omitempty"`
	MinValue     *json.NullInt                       `json:"min_value,omitempty"`
	MaxValue     *json.NullInt                       `json:"max_value,omitempty"`
}

func (ApplicationCommandOptionInt) MarshalJSON

func (o ApplicationCommandOptionInt) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionInt) Type

type ApplicationCommandOptionMentionable

type ApplicationCommandOptionMentionable struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required,omitempty"`
}

func (ApplicationCommandOptionMentionable) MarshalJSON

func (o ApplicationCommandOptionMentionable) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionMentionable) Type

type ApplicationCommandOptionRole

type ApplicationCommandOptionRole struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required,omitempty"`
}

func (ApplicationCommandOptionRole) MarshalJSON

func (o ApplicationCommandOptionRole) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionRole) Type

type ApplicationCommandOptionString

type ApplicationCommandOptionString struct {
	Name         string                                 `json:"name"`
	Description  string                                 `json:"description"`
	Required     bool                                   `json:"required,omitempty"`
	Choices      []ApplicationCommandOptionChoiceString `json:"choices,omitempty"`
	Autocomplete bool                                   `json:"autocomplete,omitempty"`
}

func (ApplicationCommandOptionString) MarshalJSON

func (o ApplicationCommandOptionString) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionString) Type

type ApplicationCommandOptionSubCommand

type ApplicationCommandOptionSubCommand struct {
	Name        string                     `json:"name"`
	Description string                     `json:"description"`
	Options     []ApplicationCommandOption `json:"options,omitempty"`
}

func (ApplicationCommandOptionSubCommand) MarshalJSON

func (o ApplicationCommandOptionSubCommand) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionSubCommand) Type

func (*ApplicationCommandOptionSubCommand) UnmarshalJSON

func (o *ApplicationCommandOptionSubCommand) UnmarshalJSON(data []byte) error

type ApplicationCommandOptionSubCommandGroup

type ApplicationCommandOptionSubCommandGroup struct {
	Name        string                               `json:"name"`
	Description string                               `json:"description"`
	Options     []ApplicationCommandOptionSubCommand `json:"options,omitempty"`
}

func (ApplicationCommandOptionSubCommandGroup) MarshalJSON

func (o ApplicationCommandOptionSubCommandGroup) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionSubCommandGroup) Type

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"`
	Description string `json:"description"`
	Required    bool   `json:"required,omitempty"`
}

func (ApplicationCommandOptionUser) MarshalJSON

func (o ApplicationCommandOptionUser) MarshalJSON() ([]byte, error)

func (ApplicationCommandOptionUser) Type

type ApplicationCommandPermission

type ApplicationCommandPermission interface {
	json.Marshaler
	Type() ApplicationCommandPermissionType
	ID() snowflake.Snowflake
	// contains filtered or unexported methods
}

ApplicationCommandPermission holds a User or Role and if they are allowed to use the ApplicationCommand

type ApplicationCommandPermissionRole

type ApplicationCommandPermissionRole struct {
	RoleID     snowflake.Snowflake `json:"id"`
	Permission bool                `json:"permission"`
}

func (ApplicationCommandPermissionRole) ID

func (ApplicationCommandPermissionRole) MarshalJSON

func (p ApplicationCommandPermissionRole) MarshalJSON() ([]byte, error)

func (ApplicationCommandPermissionRole) Type

type ApplicationCommandPermissionType

type ApplicationCommandPermissionType int

ApplicationCommandPermissionType is the type of the ApplicationCommandPermission

type ApplicationCommandPermissionUser

type ApplicationCommandPermissionUser struct {
	UserID     snowflake.Snowflake `json:"id"`
	Permission bool                `json:"permission"`
}

func (ApplicationCommandPermissionUser) ID

func (ApplicationCommandPermissionUser) MarshalJSON

func (p ApplicationCommandPermissionUser) MarshalJSON() ([]byte, error)

func (ApplicationCommandPermissionUser) Type

type ApplicationCommandPermissions

type ApplicationCommandPermissions struct {
	ID            snowflake.Snowflake            `json:"id"`
	ApplicationID snowflake.Snowflake            `json:"application_id"`
	GuildID       snowflake.Snowflake            `json:"guild_id"`
	Permissions   []ApplicationCommandPermission `json:"permissions"`
}

ApplicationCommandPermissions holds all permissions for a ApplicationCommand

func (*ApplicationCommandPermissions) UnmarshalJSON

func (p *ApplicationCommandPermissions) UnmarshalJSON(data []byte) error

type ApplicationCommandPermissionsSet

type ApplicationCommandPermissionsSet struct {
	ID          snowflake.Snowflake            `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
	// 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

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

Remove allows you to subtract multiple bits from the first, producing a new bit

type ApplicationScope

type ApplicationScope string
const (
	ApplicationScopeActivitiesWrite ApplicationScope = "activities.write"
	ApplicationScopeActivitiesRead  ApplicationScope = "activities.read"

	ApplicationScopeRPC                  ApplicationScope = "rpc"
	ApplicationScopeRPCNotificationsRead ApplicationScope = "rpc.notifications.read"
	ApplicationScopeRPCVoiceWrite        ApplicationScope = "rpc.voice.write"
	ApplicationScopeRPCVoiceRead         ApplicationScope = "rpc.voice.read"
	ApplicationScopeRPCActivitiesWrite   ApplicationScope = "rpc.activities.write"

	ApplicationScopeGuilds     ApplicationScope = "guilds"
	ApplicationScopeGuildsJoin ApplicationScope = "guilds.join"
	ApplicationScopeGDMJoin    ApplicationScope = "gdm.join"

	ApplicationScopeRelationshipsRead ApplicationScope = "relationships.read"
	ApplicationScopeIdentify          ApplicationScope = "identify"
	ApplicationScopeEmail             ApplicationScope = "email"
	ApplicationScopeConnections       ApplicationScope = "connections"
	ApplicationScopeBot               ApplicationScope = "bot"
	ApplicationScopeMessagesRead      ApplicationScope = "messages.read"
	ApplicationScopeWebhookIncoming   ApplicationScope = "webhook.incoming"

	ApplicationScopeApplicationsCommands       ApplicationScope = "applications.commands"
	ApplicationScopeApplicationsCommandsUpdate ApplicationScope = "applications.commands.update"
	ApplicationScopeApplicationsEntitlements   ApplicationScope = "applications.entitlements"
	ApplicationScopeApplicationsStoreUpdate    ApplicationScope = "applications.store.update"
	ApplicationScopeApplicationsBuildsRead     ApplicationScope = "applications.builds.read"
	ApplicationScopeApplicationsBuildsUpload   ApplicationScope = "applications.builds.upload"
)

func SplitScopes

func SplitScopes(joinedScopes string) []ApplicationScope

func (ApplicationScope) String

func (s ApplicationScope) String() string

type ApplicationWebhook

type ApplicationWebhook struct {
	WebhookID     snowflake.Snowflake `json:"id"`
	Name          string              `json:"name"`
	Avatar        *string             `json:"avatar"`
	ApplicationID snowflake.Snowflake `json:"application_id"`
}

func (ApplicationWebhook) ID

func (ApplicationWebhook) MarshalJSON

func (w ApplicationWebhook) MarshalJSON() ([]byte, error)

func (ApplicationWebhook) Type

type Attachment

type Attachment struct {
	ID        snowflake.Snowflake `json:"id,omitempty"`
	Filename  string              `json:"filename"`
	Size      int                 `json:"size"`
	URL       string              `json:"url"`
	ProxyURL  string              `json:"proxy_url"`
	Height    *int                `json:"height"`
	Width     *int                `json:"width"`
	Ephemeral bool                `json:"ephemeral"`
}

Attachment is used for files sent in a Message

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 added in v0.6.7

func (l *AuditLog) UnmarshalJSON(data []byte) error

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.Snowflake        `json:"owner_id"`
	Region                      *string                     `json:"region"`
	PreferredLocale             *string                     `json:"preferred_locale"`
	AFKChannelID                *snowflake.Snowflake        `json:"afk_channel_id"`
	AFKTimeout                  *int                        `json:"afk_timeout"`
	RulesChannelID              *snowflake.Snowflake        `json:"rules_channel_id"`
	PublicUpdatesChannelID      *snowflake.Snowflake        `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.Snowflake        `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.Snowflake        `json:"channel_id"`
	InviterID                   *snowflake.Snowflake        `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.Snowflake        `json:"id"`
	Type                        interface{}                 `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.Snowflake       `json:"target_id"`
	Changes    []AuditLogChangeKey        `json:"changes"`
	UserID     snowflake.Snowflake        `json:"user_id"`
	ID         snowflake.Snowflake        `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      []ApplicationScope `json:"scopes"`
	Expires     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 AutocompleteChoice

type AutocompleteChoice interface {
	// contains filtered or unexported methods
}

type AutocompleteChoiceFloat

type AutocompleteChoiceFloat struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
}

type AutocompleteChoiceInt

type AutocompleteChoiceInt struct {
	Name  string `json:"name"`
	Value int    `json:"value"`
}

type AutocompleteChoiceString

type AutocompleteChoiceString struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type AutocompleteInteraction

type AutocompleteInteraction struct {
	BaseInteraction
	Data AutocompleteInteractionData `json:"data"`
}

func (AutocompleteInteraction) Type added in v0.6.9

type AutocompleteInteractionData

type AutocompleteInteractionData struct {
	CommandID   snowflake.Snowflake  `json:"id"`
	CommandName string               `json:"name"`
	Options     []AutocompleteOption `json:"options"`
}

func (*AutocompleteInteractionData) UnmarshalJSON

func (d *AutocompleteInteractionData) UnmarshalJSON(data []byte) error

type AutocompleteOption

type AutocompleteOption interface {
	Type() ApplicationCommandOptionType
	Name() string
	Focused() bool
	// contains filtered or unexported methods
}

type AutocompleteOptionAttachment added in v0.7.1

type AutocompleteOptionAttachment struct {
	OptionName    string              `json:"name"`
	Value         snowflake.Snowflake `json:"value"`
	OptionFocused bool                `json:"focused"`
}

func (AutocompleteOptionAttachment) Focused added in v0.7.1

func (o AutocompleteOptionAttachment) Focused() bool

func (AutocompleteOptionAttachment) Name added in v0.7.1

func (AutocompleteOptionAttachment) Type added in v0.7.1

type AutocompleteOptionBool

type AutocompleteOptionBool struct {
	OptionName    string `json:"name"`
	Value         bool   `json:"value"`
	OptionFocused bool   `json:"focused"`
}

func (AutocompleteOptionBool) Focused

func (o AutocompleteOptionBool) Focused() bool

func (AutocompleteOptionBool) Name

func (o AutocompleteOptionBool) Name() string

func (AutocompleteOptionBool) Type

type AutocompleteOptionChannel

type AutocompleteOptionChannel struct {
	OptionName    string              `json:"name"`
	Value         snowflake.Snowflake `json:"value"`
	OptionFocused bool                `json:"focused"`
}

func (AutocompleteOptionChannel) Focused

func (o AutocompleteOptionChannel) Focused() bool

func (AutocompleteOptionChannel) Name

func (AutocompleteOptionChannel) Type

type AutocompleteOptionFloat

type AutocompleteOptionFloat struct {
	OptionName    string  `json:"name"`
	Value         float64 `json:"value"`
	OptionFocused bool    `json:"focused"`
}

func (AutocompleteOptionFloat) Focused

func (o AutocompleteOptionFloat) Focused() bool

func (AutocompleteOptionFloat) Name

func (AutocompleteOptionFloat) Type

type AutocompleteOptionInt

type AutocompleteOptionInt struct {
	OptionName    string `json:"name"`
	Value         int    `json:"value"`
	OptionFocused bool   `json:"focused"`
}

func (AutocompleteOptionInt) Focused

func (o AutocompleteOptionInt) Focused() bool

func (AutocompleteOptionInt) Name

func (o AutocompleteOptionInt) Name() string

func (AutocompleteOptionInt) Type

type AutocompleteOptionMentionable

type AutocompleteOptionMentionable struct {
	OptionName    string              `json:"name"`
	Value         snowflake.Snowflake `json:"value"`
	OptionFocused bool                `json:"focused"`
}

func (AutocompleteOptionMentionable) Focused

func (o AutocompleteOptionMentionable) Focused() bool

func (AutocompleteOptionMentionable) Name

func (AutocompleteOptionMentionable) Type

type AutocompleteOptionRole

type AutocompleteOptionRole struct {
	OptionName    string              `json:"name"`
	Value         snowflake.Snowflake `json:"value"`
	OptionFocused bool                `json:"focused"`
}

func (AutocompleteOptionRole) Focused

func (o AutocompleteOptionRole) Focused() bool

func (AutocompleteOptionRole) Name

func (o AutocompleteOptionRole) Name() string

func (AutocompleteOptionRole) Type

type AutocompleteOptionString

type AutocompleteOptionString struct {
	OptionName    string `json:"name"`
	Value         string `json:"value"`
	OptionFocused bool   `json:"focused"`
}

func (AutocompleteOptionString) Focused

func (o AutocompleteOptionString) Focused() bool

func (AutocompleteOptionString) Name

func (AutocompleteOptionString) Type

type AutocompleteOptionSubCommand

type AutocompleteOptionSubCommand struct {
	CommandName string               `json:"name"`
	Description string               `json:"description"`
	Options     []AutocompleteOption `json:"options,omitempty"`
}

func (AutocompleteOptionSubCommand) Focused

func (o AutocompleteOptionSubCommand) Focused() bool

func (AutocompleteOptionSubCommand) Name

func (AutocompleteOptionSubCommand) Type

func (*AutocompleteOptionSubCommand) UnmarshalJSON added in v0.7.1

func (o *AutocompleteOptionSubCommand) UnmarshalJSON(data []byte) error

type AutocompleteOptionSubCommandGroup

type AutocompleteOptionSubCommandGroup struct {
	GroupName   string                         `json:"name"`
	Description string                         `json:"description"`
	Options     []AutocompleteOptionSubCommand `json:"options,omitempty"`
}

func (AutocompleteOptionSubCommandGroup) Focused

func (AutocompleteOptionSubCommandGroup) Name

func (AutocompleteOptionSubCommandGroup) Type

type AutocompleteOptionUser

type AutocompleteOptionUser struct {
	OptionName    string              `json:"name"`
	Value         snowflake.Snowflake `json:"value"`
	OptionFocused bool                `json:"focused"`
}

func (AutocompleteOptionUser) Focused

func (o AutocompleteOptionUser) Focused() bool

func (AutocompleteOptionUser) Name

func (o AutocompleteOptionUser) Name() string

func (AutocompleteOptionUser) Type

type AutocompleteResult

type AutocompleteResult struct {
	Choices []AutocompleteChoice `json:"choices"`
}

type Ban

type Ban struct {
	Reason *string `json:"reason,omitempty"`
	User   User    `json:"user"`
}

Ban represents a banned User from a Guild (https://discord.com/developers/docs/resources/guild#ban-object)

type BaseGuildMessageChannel

type BaseGuildMessageChannel interface {
	GuildChannel
	MessageChannel
	// contains filtered or unexported methods
}

type BaseInteraction added in v0.6.9

type BaseInteraction struct {
	ID            snowflake.Snowflake  `json:"id"`
	ApplicationID snowflake.Snowflake  `json:"application_id"`
	Token         string               `json:"token"`
	Version       int                  `json:"version"`
	GuildID       *snowflake.Snowflake `json:"guild_id,omitempty"`
	ChannelID     snowflake.Snowflake  `json:"channel_id"`
	Locale        Locale               `json:"locale"`
	GuildLocale   *Locale              `json:"guild_locale,omitempty"`
	Member        *Member              `json:"member,omitempty"`
	User          *User                `json:"user,omitempty"`
}

type BotIntegration

type BotIntegration struct {
	IntegrationID snowflake.Snowflake    `json:"id"`
	Name          string                 `json:"name"`
	Enabled       bool                   `json:"enabled"`
	Account       IntegrationAccount     `json:"account"`
	Application   IntegrationApplication `json:"application"`
}

func (BotIntegration) ID

func (BotIntegration) MarshalJSON

func (i BotIntegration) MarshalJSON() ([]byte, error)

func (BotIntegration) Type

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 added in v0.7.3

func (ButtonComponent) Type

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 {
	CustomID CustomID `json:"custom_id"`
}

func (ButtonInteractionData) ID added in v0.7.1

func (ButtonInteractionData) Type added in v0.6.9

type ButtonStyle

type ButtonStyle int

ButtonStyle defines how the ButtonComponent looks like (https://discord.com/assets/7bb017ce52cfd6575e21c058feb3883b.png)

type Channel

type Channel interface {
	json.Marshaler
	fmt.Stringer
	Type() ChannelType
	ID() snowflake.Snowflake
	Name() string
	// contains filtered or unexported methods
}

type ChannelCreate

type ChannelCreate interface {
	json.Marshaler
	Type() ChannelType
	// contains filtered or unexported methods
}

type ChannelFollowerWebhook

type ChannelFollowerWebhook struct {
	WebhookID     snowflake.Snowflake  `json:"id"`
	Name          string               `json:"name"`
	Avatar        *string              `json:"avatar"`
	ChannelID     snowflake.Snowflake  `json:"channel_id"`
	GuildID       snowflake.Snowflake  `json:"guild_id"`
	SourceGuild   WebhookSourceGuild   `json:"source_guild"`
	SourceChannel WebhookSourceChannel `json:"source_channel"`
	User          User                 `json:"user"`
}

func (ChannelFollowerWebhook) ID

func (ChannelFollowerWebhook) MarshalJSON

func (w ChannelFollowerWebhook) MarshalJSON() ([]byte, error)

func (ChannelFollowerWebhook) Type

type ChannelPinsUpdateGatewayEvent

type ChannelPinsUpdateGatewayEvent struct {
	GuildID          *snowflake.Snowflake `json:"guild_id"`
	ChannelID        snowflake.Snowflake  `json:"channel_id"`
	LastPinTimestamp *Time                `json:"last_pin_timestamp"`
}

type ChannelType

type ChannelType int

ChannelType for interacting with discord's channels

const (
	ChannelTypeGuildText ChannelType = iota
	ChannelTypeDM
	ChannelTypeGuildVoice
	ChannelTypeGroupDM
	ChannelTypeGuildCategory
	ChannelTypeGuildNews
	ChannelTypeGuildStore

	ChannelTypeGuildNewsThread
	ChannelTypeGuildPublicThread
	ChannelTypeGuildPrivateThread
	ChannelTypeGuildStageVoice
)

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 ComponentEmoji struct {
	ID       snowflake.Snowflake `json:"id,omitempty"`
	Name     string              `json:"name,omitempty"`
	Animated bool                `json:"animated,omitempty"`
}

type ComponentInteraction

type ComponentInteraction struct {
	BaseInteraction
	Data    ComponentInteractionData `json:"data"`
	Message Message                  `json:"message"`
}

func (ComponentInteraction) Type added in v0.6.9

func (*ComponentInteraction) UnmarshalJSON added in v0.6.9

func (i *ComponentInteraction) UnmarshalJSON(data []byte) error

type ComponentInteractionData added in v0.6.9

type ComponentInteractionData interface {
	Type() ComponentType
	ID() CustomID
	// contains filtered or unexported methods
}

type ComponentType

type ComponentType int

ComponentType defines different Component(s)

type Connection

type Connection struct {
	ID           snowflake.Snowflake `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 CustomID

type CustomID string

func (CustomID) String

func (c CustomID) String() string

type DMChannel

type DMChannel struct {
	ChannelID        snowflake.Snowflake  `json:"id"`
	LastMessageID    *snowflake.Snowflake `json:"last_message_id,omitempty"`
	Recipients       []User               `json:"recipients,omitempty"`
	LastPinTimestamp *Time                `json:"last_pin_timestamp,omitempty"`
}

func (DMChannel) ID

func (c DMChannel) ID() snowflake.Snowflake

func (DMChannel) MarshalJSON

func (c DMChannel) MarshalJSON() ([]byte, error)

func (DMChannel) Name

func (c DMChannel) Name() string

func (DMChannel) String

func (c DMChannel) String() string

func (DMChannel) Type

func (DMChannel) Type() ChannelType

type DMChannelCreate

type DMChannelCreate struct {
	RecipientID snowflake.Snowflake `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          `json:"timestamp,omitempty"`
	Color       int            `json:"color,omitempty"`
	Footer      *EmbedFooter   `json:"footer,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) Build

func (b *EmbedBuilder) Build() Embed

Build returns your built Embed

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 ...interface{}) *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 added in v0.7.1

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 ...interface{}) *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 EmbedFooter

type EmbedFooter struct {
	Text         string `json:"text"`
	IconURL      string `json:"icon_url,omitempty"`
	ProxyIconURL string `json:"proxy_icon_url,omitempty"`
}

The EmbedFooter of an Embed

type EmbedProvider

type EmbedProvider struct {
	Name string `json:"name,omitempty"`
	URL  string `json:"url,omitempty"`
}

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 EmbedType

type EmbedType string

EmbedType is the type of Embed

const (
	EmbedTypeRich    EmbedType = "rich"
	EmbedTypeImage   EmbedType = "image"
	EmbedTypeVideo   EmbedType = "video"
	EmbedTypeGifV    EmbedType = "rich"
	EmbedTypeArticle EmbedType = "article"
	EmbedTypeLink    EmbedType = "link"
)

Constants for EmbedType

type Emoji

type Emoji struct {
	ID            snowflake.Snowflake   `json:"id,omitempty"`
	Name          string                `json:"name,omitempty"` // may be empty for deleted emojis
	Roles         []snowflake.Snowflake `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"`

	GuildID snowflake.Snowflake `json:"guild_id,omitempty"`
}

Emoji allows you to interact with emojis & emotes

func (Emoji) Mention

func (e Emoji) Mention() string

Mention returns the string used to send the Emoji

func (Emoji) String

func (e Emoji) String() string

String formats the Emoji as string

type EmojiCreate

type EmojiCreate struct {
	Name  string                `json:"name"`
	Image Icon                  `json:"image"`
	Roles []snowflake.Snowflake `json:"roles,omitempty"`
}

type EmojiUpdate

type EmojiUpdate struct {
	Name  string                `json:"name,omitempty"`
	Roles []snowflake.Snowflake `json:"roles,omitempty"`
}

type EntityMetaData added in v0.6.1

type EntityMetaData struct {
	Location string
}

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 ErrorCode

type ErrorCode int

type ExplicitContentFilterLevel

type ExplicitContentFilterLevel int

The ExplicitContentFilterLevel of a Guild

const (
	ExplicitContentFilterLevelDisabled ExplicitContentFilterLevel = iota
	ExplicitContentFilterLevelMembersWithoutRoles
	ExplicitContentFilterLevelAllMembers
)

Constants for ExplicitContentFilterLevel

type File

type File struct {
	Name   string
	Reader io.Reader
	Flags  FileFlags
}

File holds all information about a given io.Reader

func NewFile

func NewFile(name string, reader io.Reader, flags ...FileFlags) *File

NewFile returns a new File struct with the given name, io.Reader & FileFlags

type FileFlags

type FileFlags int

FileFlags are used to mark Attachments as Spoiler

const (
	FileFlagSpoiler FileFlags = 1 << iota
	FileFlagNone    FileFlags = 0
)

all FileFlags

func (FileFlags) Add

func (f FileFlags) Add(bits ...FileFlags) FileFlags

Add allows you to add multiple bits together, producing a new bit

func (FileFlags) Has

func (f FileFlags) Has(bits ...FileFlags) bool

Has will ensure that the bit includes all the bits entered

func (FileFlags) Missing

func (f FileFlags) Missing(bits ...FileFlags) bool

Missing will check whether the bit is missing any one of the bits

func (FileFlags) Remove

func (f FileFlags) Remove(bits ...FileFlags) FileFlags

Remove allows you to subtract multiple bits from the first, producing a new bit

type Gateway

type Gateway struct {
	URL string `json:"url"`
}

type GatewayBot

type GatewayBot struct {
	URL               string            `json:"url"`
	Shards            int               `json:"shards"`
	SessionStartLimit SessionStartLimit `json:"session_start_limit"`
}

type GatewayCloseEventCode

type GatewayCloseEventCode int
const (
	GatewayCloseEventCodeUnknownError GatewayCloseEventCode = iota + 4000
	GatewayCloseEventCodeUnknownOpcode
	GatewayCloseEventCodeDecodeError
	GatewayCloseEventCodeNotAuthenticated
	GatewayCloseEventCodeAuthenticationFailed
	GatewayCloseEventCodeAlreadyAuthenticated

	GatewayCloseEventCodeInvalidSeq
	GatewayCloseEventCodeRateLimited
	GatewayCloseEventCodeSessionTimedOut
	GatewayCloseEventCodeInvalidShard
	GatewayCloseEventCodeShardingRequired
	GatewayCloseEventCodeInvalidAPIVersion
	GatewayCloseEventCodeInvalidIntents
	GatewayCloseEventCodeDisallowedIntents
)

func (GatewayCloseEventCode) ShouldReconnect added in v0.7.2

func (c GatewayCloseEventCode) ShouldReconnect() bool

type GatewayCommand

type GatewayCommand struct {
	GatewayPayload
	D GatewayCommandData `json:"d"`
}

GatewayCommand object is used when sending data to discord's websocket, it's recommended that you don't use these

func NewGatewayCommand

func NewGatewayCommand(op GatewayOpcode, d GatewayCommandData) GatewayCommand

NewGatewayCommand returns a new GatewayCommand struct with the given payload

type GatewayCommandData added in v0.6.7

type GatewayCommandData interface {
	// contains filtered or unexported methods
}

type GatewayEventHello

type GatewayEventHello struct {
	HeartbeatInterval time.Duration `json:"heartbeat_interval"`
}

GatewayEventHello is sent when we connect to the gateway

type GatewayEventMessageReactionAdd

type GatewayEventMessageReactionAdd struct {
	UserID    snowflake.Snowflake  `json:"user_id"`
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	MessageID snowflake.Snowflake  `json:"message_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id"`
	Member    *Member              `json:"member"`
	Emoji     ReactionEmoji        `json:"emoji"`
}

type GatewayEventMessageReactionRemove

type GatewayEventMessageReactionRemove struct {
	UserID    snowflake.Snowflake  `json:"user_id"`
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	MessageID snowflake.Snowflake  `json:"message_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id"`
	Emoji     ReactionEmoji        `json:"emoji"`
}

type GatewayEventMessageReactionRemoveAll

type GatewayEventMessageReactionRemoveAll struct {
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	MessageID snowflake.Snowflake  `json:"message_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id"`
}

type GatewayEventMessageReactionRemoveEmoji

type GatewayEventMessageReactionRemoveEmoji struct {
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	MessageID snowflake.Snowflake  `json:"message_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id"`
	Emoji     ReactionEmoji        `json:"emoji"`
}

type GatewayEventReady

type GatewayEventReady struct {
	Version     int                `json:"v"`
	User        OAuth2User         `json:"user"`
	Guilds      []UnavailableGuild `json:"guilds"`
	SessionID   string             `json:"session_id"`
	Shard       []int              `json:"shard,omitempty"`
	Application PartialApplication `json:"application"`
}

GatewayEventReady is the event sent by discord when you successfully Identify

type GatewayEventThreadCreate

type GatewayEventThreadCreate struct {
	GuildThread
	ThreadMember ThreadMember `json:"thread_member"`
}

func (*GatewayEventThreadCreate) UnmarshalJSON

func (e *GatewayEventThreadCreate) UnmarshalJSON(data []byte) error

type GatewayEventThreadDelete

type GatewayEventThreadDelete struct {
	ID       snowflake.Snowflake `json:"id"`
	GuildID  snowflake.Snowflake `json:"guild_id"`
	ParentID snowflake.Snowflake `json:"parent_id"`
	Type     ChannelType         `json:"type"`
}

type GatewayEventThreadListSync

type GatewayEventThreadListSync struct {
	GuildID    snowflake.Snowflake   `json:"guild_id"`
	ChannelIDs []snowflake.Snowflake `json:"channel_ids"`
	Threads    []GuildThread         `json:"threads"`
	Members    []ThreadMember        `json:"members"`
}

func (*GatewayEventThreadListSync) UnmarshalJSON

func (e *GatewayEventThreadListSync) UnmarshalJSON(data []byte) error

type GatewayEventThreadMembersUpdate

type GatewayEventThreadMembersUpdate struct {
	ID               snowflake.Snowflake        `json:"id"`
	GuildID          snowflake.Snowflake        `json:"guild_id"`
	MemberCount      int                        `json:"member_count"`
	AddedMembers     []ThreadMembersAddedMember `json:"added_members"`
	RemovedMemberIDs []snowflake.Snowflake      `json:"removed_member_ids"`
}

type GatewayEventThreadUpdate

type GatewayEventThreadUpdate struct {
	GuildThread
}

func (*GatewayEventThreadUpdate) UnmarshalJSON

func (e *GatewayEventThreadUpdate) UnmarshalJSON(data []byte) error

type GatewayEventType

type GatewayEventType string

GatewayEventType wraps all GatewayEventType types

const (
	GatewayEventTypeHello                         GatewayEventType = "HELLO"
	GatewayEventTypeReady                         GatewayEventType = "READY"
	GatewayEventTypeResumed                       GatewayEventType = "RESUMED"
	GatewayEventTypeReconnect                     GatewayEventType = "RECONNECT"
	GatewayEventTypeChannelCreate                 GatewayEventType = "CHANNEL_CREATE"
	GatewayEventTypeChannelUpdate                 GatewayEventType = "CHANNEL_UPDATE"
	GatewayEventTypeChannelDelete                 GatewayEventType = "CHANNEL_DELETE"
	GatewayEventTypeChannelPinsUpdate             GatewayEventType = "CHANNEL_PINS_UPDATE"
	GatewayEventTypeThreadCreate                  GatewayEventType = "THREAD_CREATE"
	GatewayEventTypeThreadUpdate                  GatewayEventType = "THREAD_UPDATE"
	GatewayEventTypeThreadDelete                  GatewayEventType = "THREAD_DELETE"
	GatewayEventTypeThreadListSync                GatewayEventType = "THREAD_LIST_SYNC"
	GatewayEventTypeThreadMemberUpdate            GatewayEventType = "THREAD_MEMBER_UPDATE"
	GatewayEventTypeThreadMembersUpdate           GatewayEventType = "THREAD_MEMBERS_UPDATE"
	GatewayEventTypeGuildCreate                   GatewayEventType = "GUILD_CREATE"
	GatewayEventTypeGuildUpdate                   GatewayEventType = "GUILD_UPDATE"
	GatewayEventTypeGuildDelete                   GatewayEventType = "GUILD_DELETE"
	GatewayEventTypeGuildBanAdd                   GatewayEventType = "GUILD_BAN_ADD"
	GatewayEventTypeGuildBanRemove                GatewayEventType = "GUILD_BAN_REMOVE"
	GatewayEventTypeGuildEmojisUpdate             GatewayEventType = "GUILD_EMOJIS_UPDATE"
	GatewayEventTypeGuildStickersUpdate           GatewayEventType = "GUILD_STICKERS_UPDATE"
	GatewayEventTypeGuildIntegrationsUpdate       GatewayEventType = "GUILD_INTEGRATIONS_UPDATE"
	GatewayEventTypeGuildMemberAdd                GatewayEventType = "GUILD_MEMBER_ADD"
	GatewayEventTypeGuildMemberRemove             GatewayEventType = "GUILD_MEMBER_REMOVE"
	GatewayEventTypeGuildMemberUpdate             GatewayEventType = "GUILD_MEMBER_UPDATE"
	GatewayEventTypeGuildMembersChunk             GatewayEventType = "GUILD_MEMBERS_CHUNK"
	GatewayEventTypeGuildRoleCreate               GatewayEventType = "GUILD_ROLE_CREATE"
	GatewayEventTypeGuildRoleUpdate               GatewayEventType = "GUILD_ROLE_UPDATE"
	GatewayEventTypeGuildRoleDelete               GatewayEventType = "GUILD_ROLE_DELETE"
	GatewayEventTypeGuildScheduledEventCreate     GatewayEventType = "GUILD_SCHEDULED_EVENT_CREATE"
	GatewayEventTypeGuildScheduledEventUpdate     GatewayEventType = "GUILD_SCHEDULED_EVENT_UPDATE"
	GatewayEventTypeGuildScheduledEventDelete     GatewayEventType = "GUILD_SCHEDULED_EVENT_DELETE"
	GatewayEventTypeGuildScheduledEventUserAdd    GatewayEventType = "GUILD_SCHEDULED_EVENT_USER_ADD"
	GatewayEventTypeGuildScheduledEventUserRemove GatewayEventType = "GUILD_SCHEDULED_EVENT_USER_REMOVE"
	GatewayEventTypeIntegrationCreate             GatewayEventType = "INTEGRATION_CREATE"
	GatewayEventTypeIntegrationUpdate             GatewayEventType = "INTEGRATION_UPDATE"
	GatewayEventTypeIntegrationDelete             GatewayEventType = "INTEGRATION_DELETE"
	GatewayEventTypeInteractionCreate             GatewayEventType = "INTERACTION_CREATE"
	GatewayEventTypeInviteCreate                  GatewayEventType = "INVITE_CREATE"
	GatewayEventTypeInviteDelete                  GatewayEventType = "INVITE_DELETE"
	GatewayEventTypeMessageCreate                 GatewayEventType = "MESSAGE_CREATE"
	GatewayEventTypeMessageUpdate                 GatewayEventType = "MESSAGE_UPDATE"
	GatewayEventTypeMessageDelete                 GatewayEventType = "MESSAGE_DELETE"
	GatewayEventTypeMessageDeleteBulk             GatewayEventType = "MESSAGE_DELETE_BULK"
	GatewayEventTypeMessageReactionAdd            GatewayEventType = "MESSAGE_REACTION_ADD"
	GatewayEventTypeMessageReactionRemove         GatewayEventType = "MESSAGE_REACTION_REMOVE"
	GatewayEventTypeMessageReactionRemoveAll      GatewayEventType = "MESSAGE_REACTION_REMOVE_ALL"
	GatewayEventTypeMessageReactionRemoveEmoji    GatewayEventType = "MESSAGE_REACTION_REMOVE_EMOJI"
	GatewayEventTypePresenceUpdate                GatewayEventType = "PRESENCE_UPDATE"
	GatewayEventTypeStageInstanceCreate           GatewayEventType = "STAGE_INSTANCE_CREATE"
	GatewayEventTypeStageInstanceDelete           GatewayEventType = "STAGE_INSTANCE_DELETE"
	GatewayEventTypeStageInstanceUpdate           GatewayEventType = "STAGE_INSTANCE_UPDATE"
	GatewayEventTypeTypingStart                   GatewayEventType = "TYPING_START"
	GatewayEventTypeUserUpdate                    GatewayEventType = "USER_UPDATE"
	GatewayEventTypeVoiceStateUpdate              GatewayEventType = "VOICE_STATE_UPDATE"
	GatewayEventTypeVoiceServerUpdate             GatewayEventType = "VOICE_SERVER_UPDATE"
	GatewayEventTypeWebhooksUpdate                GatewayEventType = "WEBHOOKS_UPDATE"
)

Constants for the gateway events

type GatewayGuild

type GatewayGuild struct {
	Guild
	Large                bool                  `json:"large"`
	Unavailable          bool                  `json:"unavailable"`
	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 GatewayIntents

type GatewayIntents int64

GatewayIntents is an extension of the Bit structure used when identifying with discord

const (
	GatewayIntentGuilds GatewayIntents = 1 << iota
	GatewayIntentGuildMembers
	GatewayIntentGuildBans
	GatewayIntentGuildEmojisAndStickers
	GatewayIntentGuildIntegrations
	GatewayIntentGuildWebhooks
	GatewayIntentGuildInvites
	GatewayIntentGuildVoiceStates
	GatewayIntentGuildPresences
	GatewayIntentGuildMessages
	GatewayIntentGuildMessageReactions
	GatewayIntentGuildMessageTyping
	GatewayIntentDirectMessages
	GatewayIntentDirectMessageReactions
	GatewayIntentDirectMessageTyping
	GatewayIntentMessageContent
	GatewayIntentGuildScheduledEvents

	GatewayIntentsGuild = GatewayIntentGuilds |
		GatewayIntentGuildMembers |
		GatewayIntentGuildBans |
		GatewayIntentGuildEmojisAndStickers |
		GatewayIntentGuildIntegrations |
		GatewayIntentGuildWebhooks |
		GatewayIntentGuildInvites |
		GatewayIntentGuildVoiceStates |
		GatewayIntentGuildPresences |
		GatewayIntentGuildMessages |
		GatewayIntentGuildMessageReactions |
		GatewayIntentGuildMessageTyping |
		GatewayIntentGuildScheduledEvents

	GatewayIntentsDirectMessage = GatewayIntentDirectMessages |
		GatewayIntentDirectMessageReactions |
		GatewayIntentDirectMessageTyping

	GatewayIntentsNonPrivileged = GatewayIntentGuilds |
		GatewayIntentGuildBans |
		GatewayIntentGuildEmojisAndStickers |
		GatewayIntentGuildIntegrations |
		GatewayIntentGuildWebhooks |
		GatewayIntentGuildInvites |
		GatewayIntentGuildVoiceStates |
		GatewayIntentGuildMessages |
		GatewayIntentGuildMessageReactions |
		GatewayIntentGuildMessageTyping |
		GatewayIntentDirectMessages |
		GatewayIntentDirectMessageReactions |
		GatewayIntentDirectMessageTyping |
		GatewayIntentGuildScheduledEvents

	GatewayIntentsPrivileged = GatewayIntentGuildMembers |
		GatewayIntentGuildPresences | GatewayIntentMessageContent

	GatewayIntentsAll = GatewayIntentsNonPrivileged |
		GatewayIntentsPrivileged

	GatewayIntentsDefault = GatewayIntentsNone

	GatewayIntentsNone GatewayIntents = 0
)

Constants for the different bit offsets of GatewayIntents

func (GatewayIntents) Add

Add allows you to add multiple bits together, producing a new bit

func (GatewayIntents) Has

func (i GatewayIntents) Has(bits ...GatewayIntents) bool

Has will ensure that the bit includes all the bits entered

func (GatewayIntents) Missing

func (i GatewayIntents) Missing(bits ...GatewayIntents) bool

Missing will check whether the bit is missing any one of the bits

func (GatewayIntents) Remove

func (i GatewayIntents) Remove(bits ...GatewayIntents) GatewayIntents

Remove allows you to subtract multiple bits from the first, producing a new bit

type GatewayOpcode

type GatewayOpcode int

GatewayOpcode are opcodes used by discord

const (
	GatewayOpcodeDispatch GatewayOpcode = iota
	GatewayOpcodeHeartbeat
	GatewayOpcodeIdentify
	GatewayOpcodePresenceUpdate
	GatewayOpcodeVoiceStateUpdate

	GatewayOpcodeResume
	GatewayOpcodeReconnect
	GatewayOpcodeRequestGuildMembers
	GatewayOpcodeInvalidSession
	GatewayOpcodeHello
	GatewayOpcodeHeartbeatACK
)

https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes

type GatewayPayload

type GatewayPayload struct {
	Op GatewayOpcode    `json:"op"`
	S  GatewaySequence  `json:"s,omitempty"`
	T  GatewayEventType `json:"t,omitempty"`
	D  json.RawMessage  `json:"d,omitempty"`
}

GatewayPayload raw GatewayEvent type

type GatewaySequence added in v0.7.2

type GatewaySequence int

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
const (
	GrantTypeAuthorizationCode GrantType = "authorization_code"
	GrantTypeRefreshToken      GrantType = "refresh_token"
)

func (GrantType) String

func (t GrantType) String() string

type GroupDMChannel

type GroupDMChannel struct {
	ChannelID        snowflake.Snowflake  `json:"id"`
	ChannelName      string               `json:"name,omitempty"`
	LastMessageID    *snowflake.Snowflake `json:"last_message_id,omitempty"`
	Recipients       []User               `json:"recipients,omitempty"`
	Icon             *string              `json:"icon,omitempty"`
	OwnerID          snowflake.Snowflake  `json:"owner_id,omitempty"`
	ApplicationID    snowflake.Snowflake  `json:"application_id,omitempty"`
	LastPinTimestamp *Time                `json:"last_pin_timestamp,omitempty"`
}

func (GroupDMChannel) ID

func (GroupDMChannel) MarshalJSON

func (c GroupDMChannel) MarshalJSON() ([]byte, error)

func (GroupDMChannel) Name

func (c GroupDMChannel) Name() string

func (GroupDMChannel) String

func (c GroupDMChannel) String() string

func (GroupDMChannel) Type

func (GroupDMChannel) Type() ChannelType

type GroupDMChannelUpdate

type GroupDMChannelUpdate struct {
	Name *string   `json:"name,omitempty"`
	Icon *NullIcon `json:"icon,omitempty"`
}

type Guild

type Guild struct {
	ID                          snowflake.Snowflake        `json:"id"`
	Name                        string                     `json:"name"`
	Icon                        *string                    `json:"icon"`
	Splash                      *string                    `json:"splash"`
	DiscoverySplash             *string                    `json:"discovery_splash"`
	OwnerID                     snowflake.Snowflake        `json:"owner_id"`
	AfkChannelID                *snowflake.Snowflake       `json:"afk_channel_id"`
	AfkTimeout                  int                        `json:"afk_timeout"`
	WidgetEnabled               bool                       `json:"widget_enabled"`
	WidgetChannelID             snowflake.Snowflake        `json:"widget_channel_id"`
	VerificationLevel           VerificationLevel          `json:"verification_level"`
	DefaultMessageNotifications MessageNotificationsLevel  `json:"default_message_notifications"`
	ExplicitContentFilter       ExplicitContentFilterLevel `json:"explicit_content_filter"`
	Roles                       []Role                     `json:"roles"`
	Emojis                      []Emoji                    `json:"emojis"`
	Features                    []GuildFeature             `json:"features"`
	MFALevel                    MFALevel                   `json:"mfa_level"`
	ApplicationID               *snowflake.Snowflake       `json:"application_id"`
	SystemChannelID             *snowflake.Snowflake       `json:"system_channel_id"`
	SystemChannelFlags          SystemChannelFlags         `json:"system_channel_flags"`
	RulesChannelID              *snowflake.Snowflake       `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.Snowflake       `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"`
	Stickers                    []Sticker                  `json:"stickers"`
	JoinedAt                    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

type GuildAudioChannel

type GuildAudioChannel interface {
	GuildChannel
	// contains filtered or unexported methods
}

type GuildBanAddGatewayEvent

type GuildBanAddGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	User    User                `json:"user"`
}

type GuildBanRemoveGatewayEvent

type GuildBanRemoveGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	User    User                `json:"user"`
}

type GuildCategoryChannel

type GuildCategoryChannel struct {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id"`
	Position                    int                   `json:"position"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name"`
	NSFW                        bool                  `json:"nsfw"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildCategoryChannel) GuildID

func (GuildCategoryChannel) 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) String

func (c GuildCategoryChannel) String() string

func (GuildCategoryChannel) Type

func (*GuildCategoryChannel) UnmarshalJSON

func (c *GuildCategoryChannel) UnmarshalJSON(data []byte) error

type GuildCategoryChannelCreate added in v0.7.3

type GuildCategoryChannelCreate struct {
	Name                 string                `json:"name"`
	Topic                string                `json:"topic,omitempty"`
	Position             int                   `json:"position,omitempty"`
	PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites,omitempty"`
	ParentID             snowflake.Snowflake   `json:"parent_id,omitempty"`
}

func (GuildCategoryChannelCreate) MarshalJSON added in v0.7.3

func (c GuildCategoryChannelCreate) MarshalJSON() ([]byte, error)

func (GuildCategoryChannelCreate) Type added in v0.7.3

type GuildCategoryChannelUpdate

type GuildCategoryChannelUpdate struct {
}

type GuildChannel

type GuildChannel interface {
	Channel
	Mentionable
	GuildID() snowflake.Snowflake
	// contains filtered or unexported methods
}

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.Snowflake        `json:"afk_channel_id,omitempty"`
	AFKTimeout                      int                        `json:"afk_timeout,omitempty"`
	SystemChannelID                 snowflake.Snowflake        `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 GuildEmojisUpdateGatewayEvent

type GuildEmojisUpdateGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	Emojis  []Emoji             `json:"emojis"`
}

type GuildFeature

type GuildFeature string

The GuildFeature (s) that a Guild contains

const (
	GuildFeatureAnimatedIcon                  GuildFeature = "ANIMATED_ICON"
	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 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 GuildIntegrationsUpdateGatewayEvent

type GuildIntegrationsUpdateGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
}

type GuildMemberRemoveGatewayEvent

type GuildMemberRemoveGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	User    User                `json:"user"`
}

type GuildMembersChunkGatewayEvent

type GuildMembersChunkGatewayEvent struct {
	GuildID    snowflake.Snowflake   `json:"guild_id"`
	Members    []Member              `json:"members"`
	ChunkIndex int                   `json:"chunk_index"`
	ChunkCount int                   `json:"chunk_count"`
	NotFound   []snowflake.Snowflake `json:"not_found"`
	Presences  []Presence            `json:"presences"`
	Nonce      string                `json:"nonce"`
}

type GuildMessageChannel

type GuildMessageChannel interface {
	BaseGuildMessageChannel
	// contains filtered or unexported methods
}

type GuildNewsChannel

type GuildNewsChannel struct {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id,omitempty"`
	Position                    int                   `json:"position,omitempty"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name,omitempty"`
	Topic                       *string               `json:"topic,omitempty"`
	NSFW                        bool                  `json:"nsfw,omitempty"`
	LastMessageID               *snowflake.Snowflake  `json:"last_message_id,omitempty"`
	RateLimitPerUser            int                   `json:"rate_limit_per_user,omitempty"`
	ParentID                    *snowflake.Snowflake  `json:"parent_id,omitempty"`
	LastPinTimestamp            *Time                 `json:"last_pin_timestamp,omitempty"`
	DefaultAutoArchiveDuration  AutoArchiveDuration   `json:"default_auto_archive_duration"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildNewsChannel) GuildID

func (c GuildNewsChannel) GuildID() snowflake.Snowflake

func (GuildNewsChannel) ID

func (GuildNewsChannel) MarshalJSON

func (c GuildNewsChannel) MarshalJSON() ([]byte, error)

func (GuildNewsChannel) Mention

func (c GuildNewsChannel) Mention() string

func (GuildNewsChannel) Name

func (c GuildNewsChannel) Name() string

func (GuildNewsChannel) String

func (c GuildNewsChannel) String() string

func (GuildNewsChannel) Type

func (*GuildNewsChannel) UnmarshalJSON

func (c *GuildNewsChannel) UnmarshalJSON(data []byte) error

type GuildNewsChannelCreate added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
	NSFW                 bool                  `json:"nsfw,omitempty"`
}

func (GuildNewsChannelCreate) MarshalJSON added in v0.7.3

func (c GuildNewsChannelCreate) MarshalJSON() ([]byte, error)

func (GuildNewsChannelCreate) Type added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
	DefaultAutoArchiveDuration *int                   `json:"default_auto_archive_duration"`
}

type GuildNewsThread

type GuildNewsThread struct {
	ChannelID        snowflake.Snowflake `json:"id"`
	ChannelGuildID   snowflake.Snowflake `json:"guild_id"`
	ChannelName      string              `json:"name"`
	NSFW             bool                `json:"nsfw"`
	LastMessageID    snowflake.Snowflake `json:"last_message_id"`
	LastPinTimestamp *Time               `json:"last_pin_timestamp"`
	RateLimitPerUser int                 `json:"rate_limit_per_user"`
	OwnerID          snowflake.Snowflake `json:"owner_id"`
	ParentChannelID  snowflake.Snowflake `json:"parent_id"`
	MessageCount     int                 `json:"message_count"`
	MemberCount      int                 `json:"member_count"`
	ThreadMetadata   ThreadMetadata      `json:"thread_metadata"`
}

func (GuildNewsThread) GuildID

func (c GuildNewsThread) GuildID() snowflake.Snowflake

func (GuildNewsThread) ID

func (GuildNewsThread) MarshalJSON

func (c GuildNewsThread) MarshalJSON() ([]byte, error)

func (GuildNewsThread) Mention

func (c GuildNewsThread) Mention() string

func (GuildNewsThread) Name

func (c GuildNewsThread) Name() string

func (GuildNewsThread) ParentID

func (c GuildNewsThread) ParentID() snowflake.Snowflake

func (GuildNewsThread) String

func (c GuildNewsThread) String() string

func (GuildNewsThread) Type

type GuildNewsThreadCreate

type GuildNewsThreadCreate struct {
	Name                string              `json:"name"`
	AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"`
}

func (GuildNewsThreadCreate) MarshalJSON

func (c GuildNewsThreadCreate) MarshalJSON() ([]byte, error)

func (GuildNewsThreadCreate) Type

type GuildNewsThreadUpdate

type GuildNewsThreadUpdate struct {
}

type GuildPreview

type GuildPreview struct {
	ID                       snowflake.Snowflake `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 GuildPrivateThread

type GuildPrivateThread struct {
	ChannelID        snowflake.Snowflake `json:"id"`
	ChannelGuildID   snowflake.Snowflake `json:"guild_id"`
	ChannelName      string              `json:"name"`
	NSFW             bool                `json:"nsfw"`
	LastMessageID    snowflake.Snowflake `json:"last_message_id"`
	LastPinTimestamp *Time               `json:"last_pin_timestamp"`
	RateLimitPerUser int                 `json:"rate_limit_per_user"`
	OwnerID          snowflake.Snowflake `json:"owner_id"`
	ParentChannelID  snowflake.Snowflake `json:"parent_id"`
	MessageCount     int                 `json:"message_count"`
	MemberCount      int                 `json:"member_count"`
	ThreadMetadata   ThreadMetadata      `json:"thread_metadata"`
}

func (GuildPrivateThread) GuildID

func (GuildPrivateThread) ID

func (GuildPrivateThread) MarshalJSON

func (c GuildPrivateThread) MarshalJSON() ([]byte, error)

func (GuildPrivateThread) Mention

func (c GuildPrivateThread) Mention() string

func (GuildPrivateThread) Name

func (c GuildPrivateThread) Name() string

func (GuildPrivateThread) ParentID

func (c GuildPrivateThread) ParentID() snowflake.Snowflake

func (GuildPrivateThread) String

func (c GuildPrivateThread) String() string

func (GuildPrivateThread) Type

type GuildPrivateThreadCreate

type GuildPrivateThreadCreate struct {
	Name                string              `json:"name"`
	AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"`
	Invitable           bool                `json:"invitable"`
}

func (GuildPrivateThreadCreate) MarshalJSON

func (c GuildPrivateThreadCreate) MarshalJSON() ([]byte, error)

func (GuildPrivateThreadCreate) Type

type GuildPrivateThreadUpdate

type GuildPrivateThreadUpdate struct {
}

type GuildPublicThread

type GuildPublicThread struct {
	ChannelID        snowflake.Snowflake `json:"id"`
	ChannelGuildID   snowflake.Snowflake `json:"guild_id"`
	ChannelName      string              `json:"name"`
	NSFW             bool                `json:"nsfw"`
	LastMessageID    snowflake.Snowflake `json:"last_message_id"`
	LastPinTimestamp *Time               `json:"last_pin_timestamp"`
	RateLimitPerUser int                 `json:"rate_limit_per_user"`
	OwnerID          snowflake.Snowflake `json:"owner_id"`
	ParentChannelID  snowflake.Snowflake `json:"parent_id"`
	MessageCount     int                 `json:"message_count"`
	MemberCount      int                 `json:"member_count"`
	ThreadMetadata   ThreadMetadata      `json:"thread_metadata"`
}

func (GuildPublicThread) GuildID

func (GuildPublicThread) ID

func (GuildPublicThread) MarshalJSON

func (c GuildPublicThread) MarshalJSON() ([]byte, error)

func (GuildPublicThread) Mention

func (c GuildPublicThread) Mention() string

func (GuildPublicThread) Name

func (c GuildPublicThread) Name() string

func (GuildPublicThread) ParentID

func (c GuildPublicThread) ParentID() snowflake.Snowflake

func (GuildPublicThread) String

func (c GuildPublicThread) String() string

func (GuildPublicThread) Type

type GuildPublicThreadCreate

type GuildPublicThreadCreate struct {
	Name                string              `json:"name"`
	AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"`
}

func (GuildPublicThreadCreate) MarshalJSON

func (c GuildPublicThreadCreate) MarshalJSON() ([]byte, error)

func (GuildPublicThreadCreate) Type

type GuildPublicThreadUpdate

type GuildPublicThreadUpdate struct {
}

type GuildRoleCreateGatewayEvent

type GuildRoleCreateGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	Role    Role                `json:"role"`
}

type GuildRoleDeleteGatewayEvent

type GuildRoleDeleteGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	RoleID  snowflake.Snowflake `json:"role_id"`
}

type GuildRoleUpdateGatewayEvent

type GuildRoleUpdateGatewayEvent struct {
	GuildID snowflake.Snowflake `json:"guild_id"`
	Role    Role                `json:"role"`
}

type GuildScheduledEvent added in v0.6.1

type GuildScheduledEvent struct {
	ID                 snowflake.Snowflake        `json:"id"`
	GuildID            snowflake.Snowflake        `json:"guild_id"`
	ChannelID          *snowflake.Snowflake       `json:"channel_id"`
	CreatorID          snowflake.Snowflake        `json:"creator_id"`
	Name               string                     `json:"name"`
	Description        string                     `json:"description"`
	ScheduledStartTime Time                       `json:"scheduled_start_time"`
	ScheduledEndTime   *Time                      `json:"scheduled_end_time"`
	PrivacyLevel       ScheduledEventPrivacyLevel `json:"privacy_level"`
	Status             ScheduledEventStatus       `json:"status"`
	EntityType         ScheduledEventEntityType   `json:"entity_type"`
	EntityID           *snowflake.Snowflake       `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 added in v0.6.1

type GuildScheduledEventCreate struct {
	ChannelID          snowflake.Snowflake        `json:"channel_id,omitempty"`
	EntityMetaData     *EntityMetaData            `json:"entity_metadata,omitempty"`
	Name               string                     `json:"name"`
	PrivacyLevel       ScheduledEventPrivacyLevel `json:"privacy_level"`
	ScheduledStartTime Time                       `json:"scheduled_start_time"`
	ScheduledEndTime   Time                       `json:"scheduled_end_time,omitempty"`
	Description        string                     `json:"description,omitempty"`
	EntityType         ScheduledEventEntityType   `json:"entity_type"`
}

type GuildScheduledEventUpdate added in v0.6.1

type GuildScheduledEventUpdate struct {
	ChannelID          *snowflake.Snowflake        `json:"channel_id,omitempty"`
	EntityMetaData     *EntityMetaData             `json:"entity_metadata,omitempty"`
	Name               string                      `json:"name,omitempty"`
	PrivacyLevel       *ScheduledEventPrivacyLevel `json:"privacy_level,omitempty"`
	ScheduledStartTime *Time                       `json:"scheduled_start_time,omitempty"`
	ScheduledEndTime   *Time                       `json:"scheduled_end_time,omitempty"`
	Description        *string                     `json:"description,omitempty"`
	EntityType         *ScheduledEventEntityType   `json:"entity_type,omitempty"`
	Status             *ScheduledEventStatus       `json:"status,omitempty"`
}

type GuildScheduledEventUser added in v0.6.1

type GuildScheduledEventUser struct {
	GuildScheduledEventID snowflake.Snowflake `json:"guild_scheduled_event_id"`
	User                  User                `json:"user"`
	Member                *Member             `json:"member"`
}

type GuildScheduledEventUserEvent added in v0.6.1

type GuildScheduledEventUserEvent struct {
	GuildScheduledEventID snowflake.Snowflake `json:"guild_scheduled_event_id"`
	UserID                snowflake.Snowflake `json:"user_id"`
	GuildID               snowflake.Snowflake `json:"guild_id"`
}

type GuildStageChannelCreate added in v0.7.3

type GuildStageChannelCreate 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.Snowflake   `json:"parent_id,omitempty"`
}

func (GuildStageChannelCreate) MarshalJSON added in v0.7.3

func (c GuildStageChannelCreate) MarshalJSON() ([]byte, error)

func (GuildStageChannelCreate) Type added in v0.7.3

type GuildStageVoiceChannel

type GuildStageVoiceChannel struct {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id,omitempty"`
	Position                    int                   `json:"position,omitempty"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name,omitempty"`
	Topic                       *string               `json:"topic,omitempty"`
	Bitrate                     int                   `json:"bitrate,omitempty"`
	UserLimit                   int                   `json:"user_limit,omitempty"`
	ParentID                    *snowflake.Snowflake  `json:"parent_id,omitempty"`
	RTCRegion                   string                `json:"rtc_region"`
	VideoQualityMode            VideoQualityMode      `json:"video_quality_mode"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildStageVoiceChannel) GuildID

func (GuildStageVoiceChannel) 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) String

func (c GuildStageVoiceChannel) String() string

func (GuildStageVoiceChannel) Type

func (*GuildStageVoiceChannel) UnmarshalJSON

func (c *GuildStageVoiceChannel) UnmarshalJSON(data []byte) error

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.Snowflake   `json:"parent_id,omitempty"`
	RTCRegion            *string                `json:"rtc_region"`
	VideoQualityMode     *VideoQualityMode      `json:"video_quality_mode"`
}

type GuildStickersUpdateGatewayEvent

type GuildStickersUpdateGatewayEvent struct {
	GuildID  snowflake.Snowflake `json:"guild_id"`
	Stickers []Sticker           `json:"stickers"`
}

type GuildStoreChannel

type GuildStoreChannel struct {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id"`
	Position                    int                   `json:"position"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name"`
	NSFW                        bool                  `json:"nsfw,omitempty"`
	ParentID                    *snowflake.Snowflake  `json:"parent_id"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildStoreChannel) GuildID

func (GuildStoreChannel) ID

func (GuildStoreChannel) MarshalJSON

func (c GuildStoreChannel) MarshalJSON() ([]byte, error)

func (GuildStoreChannel) Mention

func (c GuildStoreChannel) Mention() string

func (GuildStoreChannel) Name

func (c GuildStoreChannel) Name() string

func (GuildStoreChannel) String

func (c GuildStoreChannel) String() string

func (GuildStoreChannel) Type

func (*GuildStoreChannel) UnmarshalJSON

func (c *GuildStoreChannel) UnmarshalJSON(data []byte) error

type GuildStoreChannelUpdate

type GuildStoreChannelUpdate struct {
}

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.Snowflake `json:"creator_id"`
	Creator     User                `json:"creator"`
	CreatedAt   Time                `json:"created_at"`
	UpdatedAt   Time                `json:"updated_at"`
	GuildID     snowflake.Snowflake `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 {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id,omitempty"`
	Position                    int                   `json:"position,omitempty"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name,omitempty"`
	Topic                       *string               `json:"topic,omitempty"`
	NSFW                        bool                  `json:"nsfw,omitempty"`
	LastMessageID               *snowflake.Snowflake  `json:"last_message_id,omitempty"`
	RateLimitPerUser            int                   `json:"rate_limit_per_user,omitempty"`
	ParentID                    *snowflake.Snowflake  `json:"parent_id,omitempty"`
	LastPinTimestamp            *Time                 `json:"last_pin_timestamp,omitempty"`
	DefaultAutoArchiveDuration  AutoArchiveDuration   `json:"default_auto_archive_duration"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildTextChannel) GuildID

func (c GuildTextChannel) GuildID() snowflake.Snowflake

func (GuildTextChannel) ID

func (GuildTextChannel) MarshalJSON

func (c GuildTextChannel) MarshalJSON() ([]byte, error)

func (GuildTextChannel) Mention

func (c GuildTextChannel) Mention() string

func (GuildTextChannel) Name

func (c GuildTextChannel) Name() string

func (GuildTextChannel) String

func (c GuildTextChannel) String() string

func (GuildTextChannel) Type

func (*GuildTextChannel) UnmarshalJSON

func (c *GuildTextChannel) UnmarshalJSON(data []byte) error

type GuildTextChannelCreate added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
	NSFW                 bool                  `json:"nsfw,omitempty"`
}

func (GuildTextChannelCreate) MarshalJSON added in v0.7.3

func (c GuildTextChannelCreate) MarshalJSON() ([]byte, error)

func (GuildTextChannelCreate) Type added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
	DefaultAutoArchiveDuration *int                   `json:"default_auto_archive_duration,omitempty"`
}

type GuildThread

type GuildThread interface {
	BaseGuildMessageChannel
	ParentID() snowflake.Snowflake
	// contains filtered or unexported methods
}

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.Snowflake        `json:"afk_channel_id,omitempty"`
	AFKTimeout                      *int                        `json:"afk_timeout,omitempty"`
	Icon                            *NullIcon                   `json:"icon,omitempty"`
	OwnerID                         *snowflake.Snowflake        `json:"owner_id,omitempty"`
	Splash                          *NullIcon                   `json:"splash,omitempty"`
	DiscoverySplash                 *NullIcon                   `json:"discovery_splash,omitempty"`
	Banner                          *NullIcon                   `json:"banner,omitempty"`
	SystemChannelID                 *snowflake.Snowflake        `json:"system_channel_id,omitempty"`
	SystemChannelFlags              *SystemChannelFlags         `json:"system_channel_flags,omitempty"`
	RulesChannelID                  *snowflake.Snowflake        `json:"rules_channel_id,omitempty"`
	PublicUpdatesChannelID          *snowflake.Snowflake        `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 {
	ChannelID                   snowflake.Snowflake   `json:"id"`
	ChannelGuildID              snowflake.Snowflake   `json:"guild_id,omitempty"`
	Position                    int                   `json:"position,omitempty"`
	ChannelPermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ChannelName                 string                `json:"name,omitempty"`
	NSFW                        bool                  `json:"nsfw,omitempty"`
	Topic                       *string               `json:"topic,omitempty"`
	Bitrate                     int                   `json:"bitrate,omitempty"`
	UserLimit                   int                   `json:"user_limit,omitempty"`
	ParentID                    *snowflake.Snowflake  `json:"parent_id,omitempty"`
	RTCRegion                   string                `json:"rtc_region"`
	VideoQualityMode            VideoQualityMode      `json:"video_quality_mode"`
	InteractionPermissions      Permissions           `json:"permissions,omitempty"`
}

func (GuildVoiceChannel) GuildID

func (GuildVoiceChannel) ID

func (GuildVoiceChannel) MarshalJSON

func (c GuildVoiceChannel) MarshalJSON() ([]byte, error)

func (GuildVoiceChannel) Mention

func (c GuildVoiceChannel) Mention() string

func (GuildVoiceChannel) Name

func (c GuildVoiceChannel) Name() string

func (GuildVoiceChannel) String

func (c GuildVoiceChannel) String() string

func (GuildVoiceChannel) Type

func (*GuildVoiceChannel) UnmarshalJSON

func (c *GuildVoiceChannel) UnmarshalJSON(data []byte) error

type GuildVoiceChannelCreate added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
}

func (GuildVoiceChannelCreate) MarshalJSON added in v0.7.3

func (c GuildVoiceChannelCreate) MarshalJSON() ([]byte, error)

func (GuildVoiceChannelCreate) Type added in v0.7.3

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.Snowflake   `json:"parent_id,omitempty"`
	RTCRegion                  *string                `json:"rtc_region"`
	VideoQualityMode           *VideoQualityMode      `json:"video_quality_mode"`
	DefaultAutoArchiveDuration *int                   `json:"default_auto_archive_duration"`
}

type GuildWelcomeChannel

type GuildWelcomeChannel struct {
	ChannelID   snowflake.Snowflake  `json:"channel_id"`
	Description string               `json:"description"`
	EmojiID     *snowflake.Snowflake `json:"emoji_id,omitempty"`
	EmojiName   *string              `json:"emoji_name,omitempty"`
}

GuildWelcomeChannel is one of the channels in a WelcomeScreen

type HeartbeatCommandData added in v0.6.7

type HeartbeatCommandData int

HeartbeatCommandData is used to ensure the websocket connection remains open, and disconnect if not.

type Icon

type Icon struct {
	Type IconType
	Data []byte
}

func NewIcon

func NewIcon(iconType IconType, reader io.Reader) (*Icon, error)

func NewIconRaw

func NewIconRaw(iconType IconType, src []byte) *Icon

func (Icon) MarshalJSON

func (i Icon) MarshalJSON() ([]byte, error)

func (Icon) String

func (i Icon) String() string

type IconType

type IconType string
const (
	IconTypeJPEG    IconType = "image/jpeg"
	IconTypePNG     IconType = "image/png"
	IconTypeWEBP    IconType = "image/webp"
	IconTypeGIF     IconType = "image/gif"
	IconTypeUnknown          = IconTypeJPEG
)

func (IconType) GetHeader

func (t IconType) GetHeader() string

func (IconType) GetMIME

func (t IconType) GetMIME() string

type IdentifyCommandData added in v0.6.7

type IdentifyCommandData struct {
	Token          string                        `json:"token"`
	Properties     IdentifyCommandDataProperties `json:"properties"`
	Compress       bool                          `json:"compress,omitempty"`
	LargeThreshold int                           `json:"large_threshold,omitempty"`
	Shard          []int                         `json:"shard,omitempty"`
	GatewayIntents GatewayIntents                `json:"intents"`
	Presence       *UpdatePresenceCommandData    `json:"presence,omitempty"`
}

IdentifyCommandData is the data used in IdentifyCommandData

type IdentifyCommandDataProperties

type IdentifyCommandDataProperties struct {
	OS      string `json:"$os"`      // user OS
	Browser string `json:"$browser"` // library name
	Device  string `json:"$device"`  // library name
}

IdentifyCommandDataProperties is used for specifying to discord which library and OS the bot is using, is automatically handled by the library and should rarely be used.

type IncomingWebhook

type IncomingWebhook struct {
	WebhookID     snowflake.Snowflake  `json:"id"`
	Name          string               `json:"name"`
	Avatar        *string              `json:"avatar"`
	ChannelID     snowflake.Snowflake  `json:"channel_id"`
	GuildID       snowflake.Snowflake  `json:"guild_id"`
	Token         string               `json:"token"`
	ApplicationID *snowflake.Snowflake `json:"application_id"`
	User          User                 `json:"user"`
}

func (IncomingWebhook) ID

func (IncomingWebhook) MarshalJSON

func (w IncomingWebhook) MarshalJSON() ([]byte, error)

func (IncomingWebhook) Type

type InputComponent added in v0.7.3

type InputComponent interface {
	InteractiveComponent
	// contains filtered or unexported methods
}

type InstallationParams

type InstallationParams struct {
	Scopes      []ApplicationScope `json:"scopes"`
	Permissions Permissions        `json:"permissions"`
}

type IntegrationAccount

type IntegrationAccount struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

IntegrationAccount (https://discord.com/developers/docs/resources/guild#integration-account-object)

type IntegrationApplication

type IntegrationApplication struct {
	ID          snowflake.Snowflake `json:"id"`
	Name        string              `json:"name"`
	Icon        string              `json:"icon"`
	Description string              `json:"description"`
	Summary     string              `json:"summary"`
	Bot         User                `json:"bot"`
}

IntegrationApplication (https://discord.com/developers/docs/resources/guild#integration-application-object)

type IntegrationCreateGatewayEvent

type IntegrationCreateGatewayEvent struct {
	Integration
	GuildID snowflake.Snowflake `json:"guild_id"`
}

func (*IntegrationCreateGatewayEvent) UnmarshalJSON

func (e *IntegrationCreateGatewayEvent) UnmarshalJSON(data []byte) error

type IntegrationDeleteGatewayEvent

type IntegrationDeleteGatewayEvent struct {
	ID            snowflake.Snowflake  `json:"id"`
	GuildID       snowflake.Snowflake  `json:"guild_id"`
	ApplicationID *snowflake.Snowflake `json:"application_id"`
}

type IntegrationType

type IntegrationType string

IntegrationType the type of Integration

const (
	IntegrationTypeTwitch  IntegrationType = "twitch"
	IntegrationTypeYouTube IntegrationType = "youtube"
	IntegrationTypeBot     IntegrationType = "discord"
)

All IntegrationType(s)

type IntegrationUpdateGatewayEvent

type IntegrationUpdateGatewayEvent struct {
	Integration
	GuildID snowflake.Snowflake `json:"guild_id"`
}

func (*IntegrationUpdateGatewayEvent) UnmarshalJSON

func (e *IntegrationUpdateGatewayEvent) UnmarshalJSON(data []byte) error

type Interaction

type Interaction interface {
	Type() InteractionType
	// contains filtered or unexported methods
}

Interaction is used for easier unmarshalling of different Interaction(s)

type InteractionCallbackData

type InteractionCallbackData interface {
	// contains filtered or unexported methods
}

type InteractionCallbackType

type InteractionCallbackType int

InteractionCallbackType indicates the type of slash command response, whether it's responding immediately or deferring to edit your response later

const (
	InteractionCallbackTypePong InteractionCallbackType = iota + 1

	InteractionCallbackTypeChannelMessageWithSource
	InteractionCallbackTypeDeferredChannelMessageWithSource
	InteractionCallbackTypeDeferredUpdateMessage
	InteractionCallbackTypeUpdateMessage
	InteractionCallbackTypeAutocompleteResult
	InteractionCallbackTypeModal
)

Constants for the InteractionCallbackType(s)

type InteractionResponse

type InteractionResponse struct {
	Type InteractionCallbackType `json:"type"`
	Data InteractionCallbackData `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() (interface{}, error)

ToBody returns the InteractionResponse ready for body

type InteractionResponseCreator

type InteractionResponseCreator interface {
	ToResponseBody(response InteractionResponse) (interface{}, error)
}

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 InteractiveComponent interface {
	Component
	ID() CustomID
	SetID(id CustomID) InteractiveComponent
	// contains filtered or unexported methods
}

type Invite

type Invite struct {
	Code                     string               `json:"code"`
	Guild                    *InviteGuild         `json:"guild"`
	GuildID                  *snowflake.Snowflake `json:"guild_id"`
	Channel                  PartialChannel       `json:"channel"`
	ChannelID                snowflake.Snowflake  `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"`
	Uses                     *int                 `json:"uses"`
	MaxUses                  *int                 `json:"max_uses"`
	MaxAge                   *int                 `json:"max_age"`
	Temporary                *bool                `json:"temporary"`
	CreatedAt                *Time                `json:"created_at"`
}

Invite is a partial invite struct

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.Snowflake `json:"target_user_id,omitempty"`
	TargetApplicationID snowflake.Snowflake `json:"target_application_id,omitempty"`
}

type InviteDeleteGatewayEvent

type InviteDeleteGatewayEvent struct {
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id"`
	Code      string               `json:"code"`
}

type InviteGuild

type InviteGuild struct {
	ID                snowflake.Snowflake `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 added in v0.6.12

type Locale string
const (
	EnglishUS    Locale = "en-US"
	EnglishGB    Locale = "en-GB"
	Bulgarian    Locale = "bg"
	ChineseCN    Locale = "zh-CN"
	ChineseTW    Locale = "zh-TW"
	Croatian     Locale = "hr"
	Czech        Locale = "cs"
	Danish       Locale = "da"
	Dutch        Locale = "nl"
	Finnish      Locale = "fi"
	French       Locale = "fr"
	German       Locale = "de"
	Greek        Locale = "el"
	Hindi        Locale = "hi"
	Hungarian    Locale = "hu"
	Italian      Locale = "it"
	Japanese     Locale = "ja"
	Korean       Locale = "ko"
	Lithuanian   Locale = "lt"
	Norwegian    Locale = "no"
	Polish       Locale = "pl"
	PortugueseBR Locale = "pt-BR"
	Romanian     Locale = "ro"
	Russian      Locale = "ru"
	SpanishES    Locale = "es-ES"
	Swedish      Locale = "sv-SE"
	Thai         Locale = "th"
	Turkish      Locale = "tr"
	Ukrainian    Locale = "uk"
	Vietnamese   Locale = "vi"
	Unknown      Locale = ""
)

func (Locale) Code added in v0.6.12

func (l Locale) Code() string

func (Locale) String added in v0.6.12

func (l Locale) String() string

type MFALevel

type MFALevel int

The MFALevel of a Guild

const (
	MFALevelNone MFALevel = iota
	MFALevelElevated
)

Constants for MFALevel

type Member

type Member struct {
	GuildID                    snowflake.Snowflake   `json:"guild_id"`
	User                       User                  `json:"user"`
	Nick                       *string               `json:"nick"`
	Avatar                     *string               `json:"avatar"`
	RoleIDs                    []snowflake.Snowflake `json:"roles,omitempty"`
	JoinedAt                   Time                  `json:"joined_at"`
	PremiumSince               *Time                 `json:"premium_since,omitempty"`
	Deaf                       bool                  `json:"deaf,omitempty"`
	Mute                       bool                  `json:"mute,omitempty"`
	Pending                    bool                  `json:"pending"`
	CommunicationDisabledUntil *Time                 `json:"communication_disabled_until"`
	Permissions                *Permissions          `json:"permissions"` // only sent from slash commands & should not be cached
}

Member is a discord GuildMember

func (Member) EffectiveName

func (m Member) EffectiveName() string

EffectiveName returns either the nickname or username depending on if the user has a nickname

func (Member) Mention

func (m Member) Mention() string

func (Member) String

func (m Member) String() string

type MemberAdd

type MemberAdd struct {
	AccessToken string                `json:"access_token"`
	Nick        string                `json:"nick,omitempty"`
	Roles       []snowflake.Snowflake `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.Snowflake `json:"id"`
	Allow  Permissions         `json:"allow"`
	Deny   Permissions         `json:"deny"`
}

func (MemberPermissionOverwrite) ID

func (MemberPermissionOverwrite) MarshalJSON

func (o MemberPermissionOverwrite) MarshalJSON() ([]byte, error)

func (MemberPermissionOverwrite) Type

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

type MemberUpdate

type MemberUpdate struct {
	ChannelID                  *snowflake.Snowflake  `json:"channel_id,omitempty"`
	Nick                       *string               `json:"nick,omitempty"`
	Roles                      []snowflake.Snowflake `json:"roles,omitempty"`
	Mute                       *bool                 `json:"mute,omitempty"`
	Deaf                       *bool                 `json:"deaf,omitempty"`
	CommunicationDisabledUntil *NullTime             `json:"communication_disabled_until,omitempty"`
}

MemberUpdate is used to modify

type MembershipState

type MembershipState int

type MentionType

type MentionType struct {
	*regexp.Regexp
}

type Mentionable

type Mentionable interface {
	Mention() string
}

type Message

type Message struct {
	ID                snowflake.Snowflake   `json:"id"`
	GuildID           *snowflake.Snowflake  `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                  `json:"timestamp"`
	Mentions          []interface{}         `json:"mentions"`
	MentionEveryone   bool                  `json:"mention_everyone"`
	MentionRoles      []snowflake.Snowflake `json:"mention_roles"`
	MentionChannels   []Channel             `json:"mention_channels"`
	Pinned            bool                  `json:"pinned"`
	EditedTimestamp   *Time                 `json:"edited_timestamp"`
	Author            User                  `json:"author"`
	Member            *Member               `json:"member"`
	Content           string                `json:"content,omitempty"`
	ChannelID         snowflake.Snowflake   `json:"channel_id"`
	Type              MessageType           `json:"type"`
	Flags             MessageFlags          `json:"flags"`
	MessageReference  *MessageReference     `json:"message_reference,omitempty"`
	Interaction       *MessageInteraction   `json:"interaction,omitempty"`
	WebhookID         *snowflake.Snowflake  `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                 `json:"last_updated,omitempty"`
	Thread            GuildThread           `json:"thread,omitempty"`
}

Message is a struct for messages sent in discord text-based channels

func (*Message) UnmarshalJSON

func (m *Message) UnmarshalJSON(data []byte) error

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://discord.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.Snowflake `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.Snowflake `json:"message s"`
}

type MessageChannel

type MessageChannel interface {
	Channel
	// contains filtered or unexported methods
}

type MessageCommand

type MessageCommand struct {
	CommandID         snowflake.Snowflake  `json:"id"`
	ApplicationID     snowflake.Snowflake  `json:"application_id"`
	GuildID           *snowflake.Snowflake `json:"guild_id,omitempty"`
	CommandName       string               `json:"name"`
	DefaultPermission bool                 `json:"default_permission,omitempty"`
	Version           snowflake.Snowflake  `json:"version"`
}

func (MessageCommand) ID

func (MessageCommand) MarshalJSON

func (c MessageCommand) MarshalJSON() ([]byte, error)

func (MessageCommand) Name

func (c MessageCommand) Name() string

func (MessageCommand) Type

type MessageCommandCreate

type MessageCommandCreate struct {
	CommandName       string `json:"name"`
	DefaultPermission bool   `json:"default_permission"`
}

func (MessageCommandCreate) MarshalJSON

func (c MessageCommandCreate) MarshalJSON() ([]byte, error)

func (MessageCommandCreate) Name

func (c MessageCommandCreate) Name() string

func (MessageCommandCreate) Type

type MessageCommandInteractionData

type MessageCommandInteractionData struct {
	CommandID   snowflake.Snowflake    `json:"id"`
	CommandName string                 `json:"name"`
	Resolved    MessageCommandResolved `json:"resolved"`
	TargetID    snowflake.Snowflake    `json:"target_id"`
}

func (MessageCommandInteractionData) ID added in v0.7.1

func (MessageCommandInteractionData) Name added in v0.7.1

func (MessageCommandInteractionData) Type added in v0.6.9

type MessageCommandResolved

type MessageCommandResolved struct {
	Messages map[snowflake.Snowflake]Message `json:"messages,omitempty"`
}

type MessageCommandUpdate

type MessageCommandUpdate struct {
	Name              *string `json:"name"`
	DefaultPermission *bool   `json:"default_permission,omitempty"`
}

func (MessageCommandUpdate) MarshalJSON

func (c MessageCommandUpdate) MarshalJSON() ([]byte, error)

func (MessageCommandUpdate) Type

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.Snowflake `json:"sticker_ids,omitempty"`
	Files            []*File               `json:"-"`
	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() (interface{}, error)

ToBody returns the MessageCreate ready for body

func (MessageCreate) ToResponseBody

func (m MessageCreate) ToResponseBody(response InteractionResponse) (interface{}, 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, 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

AddFlags adds the MessageFlags of the Message

func (*MessageCreateBuilder) AddStickers

func (b *MessageCreateBuilder) AddStickers(stickerIds ...snowflake.Snowflake) *MessageCreateBuilder

AddStickers adds provided stickers to the Message

func (*MessageCreateBuilder) Build

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 ...interface{}) *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

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.Snowflake) *MessageCreateBuilder

SetMessageReferenceByID allows you to specify a Message CommandID to reply to

func (*MessageCreateBuilder) SetStickers

func (b *MessageCreateBuilder) SetStickers(stickerIds ...snowflake.Snowflake) *MessageCreateBuilder

SetStickers sets the stickers of the Message

func (*MessageCreateBuilder) SetSuppressEmbeds added in v0.7.0

func (b *MessageCreateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageCreateBuilder

SetSuppressEmbeds adds/removes discord.MessageFlagSuppressEmbeds to the Message flags

func (*MessageCreateBuilder) SetTTS

SetTTS sets whether the Message should be text to speech

type MessageDeleteBulkGatewayEvent

type MessageDeleteBulkGatewayEvent struct {
	IDs       []snowflake.Snowflake `json:"id"`
	ChannelID snowflake.Snowflake   `json:"channel_id"`
	GuildID   *snowflake.Snowflake  `json:"guild_id,omitempty"`
}

type MessageDeleteGatewayEvent

type MessageDeleteGatewayEvent struct {
	ID        snowflake.Snowflake  `json:"id"`
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id,omitempty"`
}

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
	MessageFlagNone    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.Snowflake `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.Snowflake `json:"message_id"`
	ChannelID       *snowflake.Snowflake `json:"channel_id,omitempty"`
	GuildID         *snowflake.Snowflake `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.Snowflake `json:"id"`
	Name       string              `json:"name"`
	FormatType StickerFormatType   `json:"format_type"`
}

type MessageType

type MessageType int

The MessageType indicates the Message type

const (
	MessageTypeDefault MessageType = iota
	MessageTypeRecipientAdd
	MessageTypeRecipientRemove
	MessageTypeCall
	MessageTypeChannelNameChange
	MessageTypeChannelIconChange
	ChannelPinnedMessage
	MessageTypeGuildMemberJoin
	MessageTypeUserPremiumGuildSubscription
	MessageTypeUserPremiumGuildSubscriptionTier1
	MMessageTypeUserPremiumGuildSubscriptionTier2
	MessageTypeUserPremiumGuildSubscriptionTier3
	MessageTypeChannelFollowAdd

	MessageTypeGuildDiscoveryDisqualified
	MessageTypeGuildDiscoveryRequalified
	MessageTypeGuildDiscoveryInitialWarning
	MessageTypeGuildDiscoveryFinalWarning
	MessageTypeThreadCreated
	MessageTypeReply
	MessageTypeSlashCommand
	MessageTypeThreadStarterMessage
	MessageTypeGuildInviteReminder
	MessageTypeContextMenuCommand
)

Constants for the MessageType

type MessageUpdate

type MessageUpdate struct {
	Content         *string               `json:"content,omitempty"`
	Embeds          *[]Embed              `json:"embeds,omitempty"`
	Components      *[]ContainerComponent `json:"components,omitempty"`
	Attachments     *[]Attachment         `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() (interface{}, error)

ToBody returns the MessageUpdate ready for body

func (MessageUpdate) ToResponseBody

func (m MessageUpdate) ToResponseBody(response InteractionResponse) (interface{}, 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, 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

AddFlags adds the MessageFlags of the Message

func (*MessageUpdateBuilder) Build

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.Snowflake) *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 ...interface{}) *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

SetFlags sets the message flags of the Message

func (*MessageUpdateBuilder) SetSuppressEmbeds added in v0.7.0

func (b *MessageUpdateBuilder) SetSuppressEmbeds(suppressEmbeds bool) *MessageUpdateBuilder

SetSuppressEmbeds adds/removes discord.MessageFlagSuppressEmbeds to the Message flags

type ModalCreate added in v0.7.2

type ModalCreate struct {
	CustomID   CustomID             `json:"custom_id"`
	Title      string               `json:"title"`
	Components []ContainerComponent `json:"components"`
}

type ModalCreateBuilder added in v0.7.2

type ModalCreateBuilder struct {
	ModalCreate
}

func NewModalCreateBuilder added in v0.7.2

func NewModalCreateBuilder() *ModalCreateBuilder

NewModalCreateBuilder creates a new ModalCreateBuilder to be built later

func (*ModalCreateBuilder) AddActionRow added in v0.7.2

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 added in v0.7.2

func (b *ModalCreateBuilder) AddContainerComponents(containers ...ContainerComponent) *ModalCreateBuilder

AddContainerComponents adds the discord.ContainerComponent(s) to the ModalCreate

func (*ModalCreateBuilder) Build added in v0.7.3

func (b *ModalCreateBuilder) Build() ModalCreate

Build builds the ModalCreateBuilder to a ModalCreate struct

func (*ModalCreateBuilder) ClearContainerComponents added in v0.7.2

func (b *ModalCreateBuilder) ClearContainerComponents() *ModalCreateBuilder

ClearContainerComponents removes all the discord.ContainerComponent(s) of the ModalCreate

func (*ModalCreateBuilder) RemoveContainerComponent added in v0.7.2

func (b *ModalCreateBuilder) RemoveContainerComponent(i int) *ModalCreateBuilder

RemoveContainerComponent removes a discord.ActionRowComponent from the ModalCreate

func (*ModalCreateBuilder) SetContainerComponent added in v0.7.2

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 added in v0.7.2

func (b *ModalCreateBuilder) SetContainerComponents(containerComponents ...ContainerComponent) *ModalCreateBuilder

SetContainerComponents sets the discord.ContainerComponent(s) of the ModalCreate

func (*ModalCreateBuilder) SetCustomID added in v0.7.2

func (b *ModalCreateBuilder) SetCustomID(customID CustomID) *ModalCreateBuilder

SetCustomID sets the CustomID of the ModalCreate

func (*ModalCreateBuilder) SetTitle added in v0.7.2

func (b *ModalCreateBuilder) SetTitle(title string) *ModalCreateBuilder

SetTitle sets the title of the ModalCreate

type ModalSubmitInteraction added in v0.7.2

type ModalSubmitInteraction struct {
	BaseInteraction
	Data ModalSubmitInteractionData `json:"data"`
}

func (ModalSubmitInteraction) Type added in v0.7.2

type ModalSubmitInteractionData added in v0.7.2

type ModalSubmitInteractionData struct {
	CustomID   CustomID             `json:"custom_id"`
	Components []ContainerComponent `json:"components"`
}

func (*ModalSubmitInteractionData) UnmarshalJSON added in v0.7.2

func (d *ModalSubmitInteractionData) UnmarshalJSON(data []byte) error

type MultipartBuffer

type MultipartBuffer struct {
	Buffer      *bytes.Buffer
	ContentType string
}

MultipartBuffer holds the Body & ContentType of the multipart body

func PayloadWithFiles

func PayloadWithFiles(v interface{}, files ...*File) (*MultipartBuffer, error)

PayloadWithFiles returns the given payload as multipart body with all files in it

type NSFWLevel

type NSFWLevel int
const (
	NSFWLevelDefault NSFWLevel = iota
	NSFWLevelExplicit
	NSFWLevelSafe
	NSFWLevelAgeRestricted
)

type NullIcon

type NullIcon *Icon

func NewNIcon

func NewNIcon(icon Icon) *NullIcon

func NewNullIcon

func NewNullIcon() *NullIcon

type NullTime

type NullTime *Time

func NewNullTime

func NewNullTime() *NullTime

func NewTime

func NewTime(time time.Time) *NullTime

type OAuth2Guild

type OAuth2Guild struct {
	ID          snowflake.Snowflake `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 route.GetGuilds route

type OAuth2User

type OAuth2User struct {
	User
	// Requires ApplicationScopeIdentify
	MfaEnabled  bool        `json:"mfa_enabled"`
	Locale      string      `json:"locale"`
	Flags       UserFlags   `json:"flags"`
	PremiumType PremiumType `json:"premium_type"`

	// Requires ApplicationScopeEmail
	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.Snowflake `json:"channel_id"`
	MessageID        *snowflake.Snowflake `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.Snowflake `json:"id"`
	Flags ApplicationFlags    `json:"flags"`
}

type PartialChannel

type PartialChannel struct {
	ID   snowflake.Snowflake `json:"id"`
	Type ChannelType         `json:"type"`
	Name string              `json:"name"`
	Icon *string             `json:"icon,omitempty"`
}

PartialChannel contains basic info about a Channel

func (*PartialChannel) GetIconURL

func (c *PartialChannel) GetIconURL(size int) *string

GetIconURL returns the Icon URL of this channel. This will be nil for every ChannelType except ChannelTypeGroupDM

type PartialRole

type PartialRole struct {
	ID   snowflake.Snowflake `json:"id"`
	Name string              `json:"name"`
}

PartialRole holds basic info about a Role

type Payload

type Payload interface {
	ToBody() (interface{}, error)
}

type PermissionOverwrite

type PermissionOverwrite interface {
	Type() PermissionOverwriteType
	ID() snowflake.Snowflake
}

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 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 {
	ID            snowflake.Snowflake `json:"id"`
	ApplicationID snowflake.Snowflake `json:"application_id"`
	Token         string              `json:"token"`
	Version       int                 `json:"version"`
}

func (PingInteraction) Type added in v0.6.9

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.Snowflake `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.Snowflake `json:"id"`
}

type ReactionEmoji

type ReactionEmoji struct {
	ID       snowflake.Snowflake `json:"id,omitempty"`
	Name     string              `json:"name,omitempty"`
	Animated bool                `json:"animated"`
}

type RequestGuildMembersCommandData added in v0.6.7

type RequestGuildMembersCommandData struct {
	GuildID   snowflake.Snowflake   `json:"guild_id"`
	Query     *string               `json:"query,omitempty"` //If specified, user_ids must not be entered
	Limit     *int                  `json:"limit,omitempty"` //Must be >=1 if query/user_ids is used, otherwise 0
	Presences bool                  `json:"presences,omitempty"`
	UserIDs   []snowflake.Snowflake `json:"user_ids,omitempty"` //If specified, query must not be entered
	Nonce     string                `json:"nonce,omitempty"`    //All responses are hashed with this nonce, optional
}

RequestGuildMembersCommandData is used for fetching all the members of a guild_events. It is recommended you have a strict member caching policy when using this.

type ResumeCommandData added in v0.6.7

type ResumeCommandData struct {
	Token     string          `json:"token"`
	SessionID string          `json:"session_id"`
	Seq       GatewaySequence `json:"seq"`
}

ResumeCommandData is used to resume a connection to discord in the case that you are disconnected. Is automatically handled by the library and should rarely be used.

type Role

type Role struct {
	ID          snowflake.Snowflake `json:"id"`
	GuildID     snowflake.Snowflake `json:"guild_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

func (Role) Mention

func (r Role) Mention() string

func (Role) String

func (r Role) String() string

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.Snowflake `json:"id"`
	Allow  Permissions         `json:"allow"`
	Deny   Permissions         `json:"deny"`
}

func (RolePermissionOverwrite) ID

func (RolePermissionOverwrite) MarshalJSON

func (o RolePermissionOverwrite) MarshalJSON() ([]byte, error)

func (RolePermissionOverwrite) Type

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

type RolePositionUpdate

type RolePositionUpdate struct {
	ID       snowflake.Snowflake `json:"id"`
	Position *int                `json:"position"`
}

RolePositionUpdate is the payload to update a Role(s) position

type RoleTag

type RoleTag struct {
	BotID             *snowflake.Snowflake `json:"bot_id,omitempty"`
	IntegrationID     *snowflake.Snowflake `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        *NullIcon        `json:"icon,omitempty"`
	Emoji       *json.NullString `json:"unicode_emoji,omitempty"`
	Mentionable *bool            `json:"mentionable"`
}

RoleUpdate is the payload to update a Role

type ScheduledEventEntityType added in v0.6.1

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 added in v0.6.1

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 added in v0.6.1

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   json.NullInt       `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

AsDisabled returns a new SelectMenuComponent but disabled

func (SelectMenuComponent) AsEnabled

AsEnabled returns a new SelectMenuComponent but enabled

func (SelectMenuComponent) ID

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) SetID added in v0.7.3

func (SelectMenuComponent) SetOption

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) 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 {
	CustomID CustomID `json:"custom_id"`
	Values   []string `json:"values"`
}

func (SelectMenuInteractionData) ID added in v0.7.1

func (SelectMenuInteractionData) Type added in v0.6.9

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

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   *NullIcon `json:"avatar"`
}

SelfUserUpdate is the payload used to update the OAuth2User

type SessionStartLimit

type SessionStartLimit struct {
	Total          int `json:"total"`
	Remaining      int `json:"remaining"`
	ResetAfter     int `json:"reset_after"`
	MaxConcurrency int `json:"max_concurrency"`
}

type SlashCommand

type SlashCommand struct {
	CommandID         snowflake.Snowflake        `json:"id"`
	ApplicationID     snowflake.Snowflake        `json:"application_id"`
	GuildID           *snowflake.Snowflake       `json:"guild_id,omitempty"`
	CommandName       string                     `json:"name"`
	Description       string                     `json:"description,omitempty"`
	Options           []ApplicationCommandOption `json:"options,omitempty"`
	DefaultPermission bool                       `json:"default_permission,omitempty"`
	Version           snowflake.Snowflake        `json:"version"`
}

func (SlashCommand) ID

func (SlashCommand) MarshalJSON

func (c SlashCommand) MarshalJSON() ([]byte, error)

func (SlashCommand) Name

func (c SlashCommand) Name() string

func (SlashCommand) Type

func (*SlashCommand) UnmarshalJSON

func (c *SlashCommand) UnmarshalJSON(data []byte) error

type SlashCommandCreate

type SlashCommandCreate struct {
	CommandName       string                     `json:"name"`
	Description       string                     `json:"description"`
	Options           []ApplicationCommandOption `json:"options"`
	DefaultPermission bool                       `json:"default_permission"`
}

func (SlashCommandCreate) MarshalJSON

func (c SlashCommandCreate) MarshalJSON() ([]byte, error)

func (SlashCommandCreate) Name

func (c SlashCommandCreate) Name() string

func (SlashCommandCreate) Type

type SlashCommandInteractionData

type SlashCommandInteractionData struct {
	CommandID   snowflake.Snowflake  `json:"id"`
	CommandName string               `json:"name"`
	Resolved    SlashCommandResolved `json:"resolved"`
	Options     []SlashCommandOption `json:"options"`
}

func (SlashCommandInteractionData) ID added in v0.7.1

func (SlashCommandInteractionData) Name added in v0.7.1

func (SlashCommandInteractionData) Type added in v0.6.9

func (*SlashCommandInteractionData) UnmarshalJSON

func (d *SlashCommandInteractionData) UnmarshalJSON(data []byte) error

type SlashCommandOption

type SlashCommandOption interface {
	Type() ApplicationCommandOptionType
	Name() string
	// contains filtered or unexported methods
}

type SlashCommandOptionAttachment added in v0.7.1

type SlashCommandOptionAttachment struct {
	OptionName string              `json:"name"`
	Value      snowflake.Snowflake `json:"value"`
}

func (SlashCommandOptionAttachment) Name added in v0.7.1

func (SlashCommandOptionAttachment) Type added in v0.7.1

type SlashCommandOptionBool

type SlashCommandOptionBool struct {
	OptionName string `json:"name"`
	Value      bool   `json:"value"`
}

func (SlashCommandOptionBool) Name

func (o SlashCommandOptionBool) Name() string

func (SlashCommandOptionBool) Type

type SlashCommandOptionChannel

type SlashCommandOptionChannel struct {
	OptionName string              `json:"name"`
	Value      snowflake.Snowflake `json:"value"`
}

func (SlashCommandOptionChannel) Name

func (SlashCommandOptionChannel) Type

type SlashCommandOptionFloat

type SlashCommandOptionFloat struct {
	OptionName string  `json:"name"`
	Value      float64 `json:"value"`
}

func (SlashCommandOptionFloat) Name

func (SlashCommandOptionFloat) Type

type SlashCommandOptionInt

type SlashCommandOptionInt struct {
	OptionName string `json:"name"`
	Value      int    `json:"value"`
}

func (SlashCommandOptionInt) Name

func (o SlashCommandOptionInt) Name() string

func (SlashCommandOptionInt) Type

type SlashCommandOptionMentionable

type SlashCommandOptionMentionable struct {
	OptionName string              `json:"name"`
	Value      snowflake.Snowflake `json:"value"`
}

func (SlashCommandOptionMentionable) Name

func (SlashCommandOptionMentionable) Type

type SlashCommandOptionRole

type SlashCommandOptionRole struct {
	OptionName string              `json:"name"`
	Value      snowflake.Snowflake `json:"value"`
}

func (SlashCommandOptionRole) Name

func (o SlashCommandOptionRole) Name() string

func (SlashCommandOptionRole) Type

type SlashCommandOptionString

type SlashCommandOptionString struct {
	OptionName string `json:"name"`
	Value      string `json:"value"`
}

func (SlashCommandOptionString) Name

func (SlashCommandOptionString) Type

type SlashCommandOptionSubCommand

type SlashCommandOptionSubCommand struct {
	OptionName  string               `json:"name"`
	Description string               `json:"description"`
	Options     []SlashCommandOption `json:"options,omitempty"`
}

func (SlashCommandOptionSubCommand) Name

func (SlashCommandOptionSubCommand) Type

func (*SlashCommandOptionSubCommand) UnmarshalJSON

func (o *SlashCommandOptionSubCommand) UnmarshalJSON(data []byte) error

type SlashCommandOptionSubCommandGroup

type SlashCommandOptionSubCommandGroup struct {
	OptionName  string                         `json:"name"`
	Description string                         `json:"description"`
	Options     []SlashCommandOptionSubCommand `json:"options,omitempty"`
}

func (SlashCommandOptionSubCommandGroup) Name

func (SlashCommandOptionSubCommandGroup) Type

type SlashCommandOptionUser

type SlashCommandOptionUser struct {
	OptionName string              `json:"name"`
	Value      snowflake.Snowflake `json:"value"`
}

func (SlashCommandOptionUser) Name

func (o SlashCommandOptionUser) Name() string

func (SlashCommandOptionUser) Type

type SlashCommandResolved

type SlashCommandResolved struct {
	Users    map[snowflake.Snowflake]User    `json:"users,omitempty"`
	Members  map[snowflake.Snowflake]Member  `json:"members,omitempty"`
	Roles    map[snowflake.Snowflake]Role    `json:"roles,omitempty"`
	Channels map[snowflake.Snowflake]Channel `json:"channels,omitempty"`
}

type SlashCommandUpdate

type SlashCommandUpdate struct {
	Name              *string                     `json:"name,omitempty"`
	Description       *string                     `json:"description,omitempty"`
	Options           *[]ApplicationCommandOption `json:"options,omitempty"`
	DefaultPermission *bool                       `json:"default_permission,omitempty"`
}

func (SlashCommandUpdate) MarshalJSON

func (c SlashCommandUpdate) MarshalJSON() ([]byte, error)

func (SlashCommandUpdate) Type

type StageInstance

type StageInstance struct {
	ID                   snowflake.Snowflake `json:"id"`
	GuildID              snowflake.Snowflake `json:"guild_id"`
	ChannelID            snowflake.Snowflake `json:"channel_id"`
	Topic                string              `json:"topic"`
	PrivacyLevel         StagePrivacyLevel   `json:"privacy_level"`
	DiscoverableDisabled bool                `json:"discoverable_disabled"`
}

type StageInstanceCreate

type StageInstanceCreate struct {
	ChannelID    snowflake.Snowflake `json:"channel_id"`
	Topic        string              `json:"topic,omitempty"`
	PrivacyLevel StagePrivacyLevel   `json:"privacy_level,omitempty"`
}

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.Snowflake  `json:"id"`
	PackID      *snowflake.Snowflake `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.Snowflake `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() (interface{}, 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.Snowflake `json:"id"`
	Stickers       []Sticker           `json:"stickers"`
	Name           string              `json:"name"`
	SkuID          snowflake.Snowflake `json:"sku_id"`
	CoverStickerID snowflake.Snowflake `json:"cover_sticker_id"`
	Description    string              `json:"description"`
	BannerAssetID  snowflake.Snowflake `json:"banner_asset_id"`
}

type StickerPacks

type StickerPacks struct {
	StickerPacks []StickerPack `json:"sticker_packs"`
}

type StickerType

type StickerType int
const (
	StickerTypeStandard StickerType = iota + 1
	StickerTypeGuild
)

type StickerUpdate

type StickerUpdate struct {
	Name        *string          `json:"name,omitempty"`
	Description *json.NullString `json:"description,omitempty"`
	Tags        *string          `json:"tags,omitempty"`
}

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      string              `json:"id"`
	Members []TeamMember        `json:"members"`
	Name    string              `json:"name"`
	OwnerID snowflake.Snowflake `json:"owner_user_id"`
}

type TeamMember

type TeamMember struct {
	MembershipState MembershipState     `json:"membership_state"`
	Permissions     []TeamPermissions   `json:"permissions"`
	TeamID          snowflake.Snowflake `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.Snowflake       `json:"system_channel_id"`
	SystemChannelFlags          SystemChannelFlags         `json:"system_channel_flags"`
	PreferredLocale             string                     `json:"preferred_locale"`
	AfkChannelID                *snowflake.Snowflake       `json:"afk_channel_id"`
	AfkTimeout                  int                        `json:"afk_timeout"`
	Roles                       []GuildCreateRole          `json:"roles"`
	Channels                    []GuildCreateChannel       `json:"channels"`
}

type TextInputComponent added in v0.7.2

type TextInputComponent struct {
	CustomID    CustomID       `json:"custom_id"`
	Style       TextInputStyle `json:"style"`
	Label       string         `json:"label"`
	MinLength   json.NullInt   `json:"min_length,omitempty"`
	MaxLength   int            `json:"max_length,omitempty"`
	Required    bool           `json:"required,omitempty"`
	Placeholder string         `json:"placeholder,omitempty"`
	Value       string         `json:"value,omitempty"`
}

func NewParagraphTextInput added in v0.7.3

func NewParagraphTextInput(customID CustomID, label string) TextInputComponent

func NewShortTextInput added in v0.7.3

func NewShortTextInput(customID CustomID, label string) TextInputComponent

func NewTextInput added in v0.7.3

func NewTextInput(customID CustomID, style TextInputStyle, label string) TextInputComponent

func (TextInputComponent) ID added in v0.7.2

func (TextInputComponent) MarshalJSON added in v0.7.2

func (c TextInputComponent) MarshalJSON() ([]byte, error)

func (TextInputComponent) SetID added in v0.7.3

func (TextInputComponent) Type added in v0.7.2

func (TextInputComponent) WithCustomID added in v0.7.3

func (c TextInputComponent) WithCustomID(customID CustomID) TextInputComponent

WithCustomID returns a new SelectMenuComponent with the provided customID

func (TextInputComponent) WithMaxLength added in v0.7.3

func (c TextInputComponent) WithMaxLength(maxLength int) TextInputComponent

WithMaxLength returns a new TextInputComponent with the provided maxLength

func (TextInputComponent) WithMinLength added in v0.7.3

func (c TextInputComponent) WithMinLength(minLength int) TextInputComponent

WithMinLength returns a new TextInputComponent with the provided minLength

func (TextInputComponent) WithPlaceholder added in v0.7.3

func (c TextInputComponent) WithPlaceholder(placeholder string) TextInputComponent

WithPlaceholder returns a new TextInputComponent with the provided placeholder

func (TextInputComponent) WithRequired added in v0.7.3

func (c TextInputComponent) WithRequired(required bool) TextInputComponent

WithRequired returns a new TextInputComponent with the provided required

func (TextInputComponent) WithStyle added in v0.7.3

WithStyle returns a new SelectMenuComponent with the provided TextInputStyle

func (TextInputComponent) WithValue added in v0.7.3

func (c TextInputComponent) WithValue(value string) TextInputComponent

WithValue returns a new TextInputComponent with the provided value

type TextInputStyle added in v0.7.2

type TextInputStyle int

type ThreadCreate

type ThreadCreate interface {
	json.Marshaler
	Type() ChannelType
}

type ThreadCreateWithMessage

type ThreadCreateWithMessage struct {
	Name                string              `json:"name"`
	AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"`
}

type ThreadMember

type ThreadMember struct {
	ThreadID      snowflake.Snowflake `json:"id"`
	UserID        snowflake.Snowflake `json:"user_id"`
	JoinTimestamp Time                `json:"join_timestamp"`
	Flags         ThreadMemberFlags   `json:"flags"`
}

type ThreadMemberFlags

type ThreadMemberFlags int

type ThreadMembersAddedMember

type ThreadMembersAddedMember struct {
	ThreadMember
	Member   Member    `json:"member"`
	Presence *Presence `json:"presence"`
}

type ThreadMetadata

type ThreadMetadata struct {
	Archived            bool                `json:"archived"`
	AutoArchiveDuration AutoArchiveDuration `json:"auto_archive_duration"`
	ArchiveTimestamp    Time                `json:"archive_timestamp"`
	Locked              bool                `json:"locked"`
	Invitable           bool                `json:"invitable"`
	CreateTimestamp     Time                `json:"create_timestamp"`
}

type Time

type Time struct {
	time.Time
}

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) error

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

func ParseTimestamp(str string) (*Timestamp, error)

ParseTimestamp parses the first Timestamp found in the provided string

func ParseTimestamps

func ParseTimestamps(str string, n int) ([]Timestamp, error)

ParseTimestamps parses all Timestamp(s) found in the provided string

func (Timestamp) Format

func (t Timestamp) Format() string

Format returns the Timestamp as markdown

func (Timestamp) FormatWith

func (t Timestamp) FormatWith(style TimestampStyle) string

FormatWith returns the Timestamp as markdown with the given TimestampStyle

func (Timestamp) String

func (t Timestamp) String() string

String returns the Timestamp as markdown

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 TokenType

type TokenType string
const (
	TokenTypeBearer TokenType = "Bearer"
	TokenTypeBot    TokenType = "Bot"
)

func (TokenType) Apply

func (t TokenType) Apply(token string) string

func (TokenType) String

func (t TokenType) String() string

type TwitchIntegration

type TwitchIntegration struct {
	IntegrationID     snowflake.Snowflake `json:"id"`
	Name              string              `json:"name"`
	Enabled           bool                `json:"enabled"`
	Syncing           bool                `json:"syncing"`
	RoleID            snowflake.Snowflake `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 (TwitchIntegration) MarshalJSON

func (i TwitchIntegration) MarshalJSON() ([]byte, error)

func (TwitchIntegration) Type

type TypingStartGatewayEvent

type TypingStartGatewayEvent struct {
	ChannelID snowflake.Snowflake  `json:"channel_id"`
	GuildID   *snowflake.Snowflake `json:"guild_id,omitempty"`
	UserID    snowflake.Snowflake  `json:"user_id"`
	Timestamp time.Time            `json:"timestamp"`
	Member    *Member              `json:"member,omitempty"`
	User      User                 `json:"user"`
}

func (*TypingStartGatewayEvent) UnmarshalJSON

func (e *TypingStartGatewayEvent) UnmarshalJSON(data []byte) error

type UnavailableGuild

type UnavailableGuild struct {
	ID          snowflake.Snowflake `json:"id"`
	Unavailable bool                `json:"unavailable"`
}

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 {
	AutocompleteOption
}

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 {
	SlashCommandOption
}

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 UpdatePresenceCommandData added in v0.6.7

type UpdatePresenceCommandData struct {
	Since      *int64       `json:"since"`
	Activities []Activity   `json:"activities"`
	Status     OnlineStatus `json:"status"`
	AFK        bool         `json:"afk"`
}

UpdatePresenceCommandData is used for updating Bot's presence

type UpdateVoiceStateCommandData added in v0.6.7

type UpdateVoiceStateCommandData struct {
	GuildID   snowflake.Snowflake  `json:"guild_id"`
	ChannelID *snowflake.Snowflake `json:"channel_id"`
	SelfMute  bool                 `json:"self_mute"`
	SelfDeaf  bool                 `json:"self_deaf"`
}

UpdateVoiceStateCommandData is used for updating the bots voice state in a guild_events

type User

type User struct {
	ID            snowflake.Snowflake `json:"id"`
	Username      string              `json:"username"`
	Discriminator string              `json:"discriminator"`
	Avatar        *string             `json:"avatar"`
	Banner        *string             `json:"banner"`
	AccentColor   *int                `json:"accent_color"`
	BotUser       bool                `json:"bot"`
	System        bool                `json:"system"`
	PublicFlags   UserFlags           `json:"public_flags"`
}

User is a struct for interacting with discord's users

func (User) Mention

func (u User) Mention() string

func (User) String

func (u User) String() string

func (User) Tag

func (u User) Tag() string

type UserCommand

type UserCommand struct {
	CommandID         snowflake.Snowflake  `json:"id"`
	ApplicationID     snowflake.Snowflake  `json:"application_id"`
	GuildID           *snowflake.Snowflake `json:"guild_id,omitempty"`
	CommandName       string               `json:"name"`
	DefaultPermission bool                 `json:"default_permission,omitempty"`
	Version           snowflake.Snowflake  `json:"version"`
}

func (UserCommand) ID

func (UserCommand) MarshalJSON

func (c UserCommand) MarshalJSON() ([]byte, error)

func (UserCommand) Name

func (c UserCommand) Name() string

func (UserCommand) Type

type UserCommandCreate

type UserCommandCreate struct {
	CommandName       string `json:"name"`
	DefaultPermission bool   `json:"default_permission"`
}

func (UserCommandCreate) MarshalJSON

func (c UserCommandCreate) MarshalJSON() ([]byte, error)

func (UserCommandCreate) Name

func (c UserCommandCreate) Name() string

func (UserCommandCreate) Type

type UserCommandInteractionData

type UserCommandInteractionData struct {
	CommandID   snowflake.Snowflake `json:"id"`
	CommandName string              `json:"name"`
	Resolved    UserCommandResolved `json:"resolved"`
	TargetID    snowflake.Snowflake `json:"target_id"`
}

func (UserCommandInteractionData) ID added in v0.7.1

func (UserCommandInteractionData) Name added in v0.7.1

func (UserCommandInteractionData) Type added in v0.6.9

type UserCommandResolved

type UserCommandResolved struct {
	Users   map[snowflake.Snowflake]User   `json:"users,omitempty"`
	Members map[snowflake.Snowflake]Member `json:"members,omitempty"`
}

type UserCommandUpdate

type UserCommandUpdate struct {
	Name              *string `json:"name"`
	DefaultPermission *bool   `json:"default_permission,omitempty"`
}

func (UserCommandUpdate) MarshalJSON

func (c UserCommandUpdate) MarshalJSON() ([]byte, error)

func (UserCommandUpdate) Type

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
	UserFlagNone UserFlags = 0
)

All UserFlags

type UserVoiceStateUpdate

type UserVoiceStateUpdate struct {
	ChannelID               snowflake.Snowflake `json:"channel_id"`
	Suppress                *bool               `json:"suppress,omitempty"`
	RequestToSpeakTimestamp *NullTime           `json:"request_to_speak_timestamp,omitempty"`
}

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 VisibilityType

type VisibilityType int
const (
	VisibilityTypeNone VisibilityType = iota
	VisibilityTypeEveryone
)

type VoiceCloseEventCode

type VoiceCloseEventCode int
const (
	VoiceCloseEventCodeUnknownOpcode VoiceCloseEventCode = iota + 4001
	VoiceCloseEventCodeDecodeError
	VoiceCloseEventCodeNotAuthenticated
	VoiceCloseEventCodeAuthenticationFailed
	VoiceCloseEventCodeAlreadyAuthenticated
	VoiceCloseEventCodeSessionNoLongerValid

	VoiceCloseEventCodeSessionTimedOut

	VoiceCloseEventCodeServerNotFound
	VoiceCloseEventCodeUnknownProtocol

	VoiceCloseEventCodeDisconnected
	VoiceCloseEventCodeVoiceServerCrashed
	VoiceCloseEventCodeUnknownEncryptionMode
)

type VoiceOpcode

type VoiceOpcode int
const (
	VoiceOpcodeIdentify VoiceOpcode = iota
	VoiceOpcodeSelectProtocol
	VoiceOpcodeReady
	VoiceOpcodeHeartbeat
	VoiceOpcodeSessionDescription
	VoiceOpcodeSpeaking
	VoiceOpcodeHeartbeatACK
	VoiceOpcodeResume
	VoiceOpcodeHello
	VoiceOpcodeResumed

	VoiceOpcodeClientDisconnect
)

type VoiceRegion

type VoiceRegion struct {
	ID         snowflake.Snowflake `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 VoiceServerUpdate

type VoiceServerUpdate struct {
	Token    string              `json:"token"`
	GuildID  snowflake.Snowflake `json:"guild_id"`
	Endpoint *string             `json:"endpoint"`
}

type VoiceState

type VoiceState struct {
	GuildID                 snowflake.Snowflake  `json:"guild_id,omitempty"`
	ChannelID               *snowflake.Snowflake `json:"channel_id"`
	UserID                  snowflake.Snowflake  `json:"user_id"`
	Member                  *Member              `json:"member,omitempty"`
	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                `json:"request_to_speak_timestamp"`
}

VoiceState from Discord

type Webhook

type Webhook interface {
	json.Marshaler
	Type() WebhookType
	ID() snowflake.Snowflake
	// 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

type WebhookCreate struct {
	Name   string `json:"name"`
	Avatar *Icon  `json:"avatar,omitempty"`
}

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"`
	Files           []*File              `json:"-"`
	AllowedMentions *AllowedMentions     `json:"allowed_mentions,omitempty"`
}

func (WebhookMessageCreate) ToBody

func (m WebhookMessageCreate) ToBody() (interface{}, 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

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

AddEmbeds adds multiple embeds to the Message

func (*WebhookMessageCreateBuilder) AddFile

AddFile adds a discord.File to the discord.MessageCreate

func (*WebhookMessageCreateBuilder) AddFiles

AddFiles adds the discord.File(s) to the discord.MessageCreate

func (*WebhookMessageCreateBuilder) Build

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

ClearEmbeds removes all the embeds from the Message

func (*WebhookMessageCreateBuilder) ClearFiles

ClearFiles removes all discord.File(s) of this discord.MessageCreate

func (*WebhookMessageCreateBuilder) RemoveContainerComponent

func (b *WebhookMessageCreateBuilder) RemoveContainerComponent(i int) *WebhookMessageCreateBuilder

RemoveContainerComponent removes a discord.ActionRowComponent from the Message

func (*WebhookMessageCreateBuilder) RemoveEmbed

RemoveEmbed removes an embed from the Message

func (*WebhookMessageCreateBuilder) RemoveFile

RemoveFile removes the discord.File at this index

func (*WebhookMessageCreateBuilder) SetAllowedMentions

func (b *WebhookMessageCreateBuilder) SetAllowedMentions(allowedMentions *AllowedMentions) *WebhookMessageCreateBuilder

SetAllowedMentions sets the AllowedMentions of the Message

func (*WebhookMessageCreateBuilder) SetAvatarURL

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

SetContent sets content of the Message

func (*WebhookMessageCreateBuilder) SetContentf

func (b *WebhookMessageCreateBuilder) SetContentf(content string, a ...interface{}) *WebhookMessageCreateBuilder

SetContentf sets content of the Message

func (*WebhookMessageCreateBuilder) SetEmbed

SetEmbed sets the provided Embed at the index of the Message

func (*WebhookMessageCreateBuilder) SetEmbeds

SetEmbeds sets the Embed(s) of the Message

func (*WebhookMessageCreateBuilder) SetFile

SetFile sets the discord.File at the index for this discord.MessageCreate

func (*WebhookMessageCreateBuilder) SetFiles

SetFiles sets the File(s) for this MessageCreate

func (*WebhookMessageCreateBuilder) SetTTS

SetTTS sets the text to speech of the Message

func (*WebhookMessageCreateBuilder) SetUsername

type WebhookMessageUpdate

type WebhookMessageUpdate struct {
	Content         *string               `json:"content,omitempty"`
	Embeds          *[]Embed              `json:"embeds,omitempty"`
	Components      *[]ContainerComponent `json:"components,omitempty"`
	Attachments     *[]Attachment         `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() (interface{}, 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

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

AddEmbeds adds multiple embeds to the Message

func (*WebhookMessageUpdateBuilder) AddFile

AddFile adds a new discord.File to the discord.MessageUpdate

func (*WebhookMessageUpdateBuilder) AddFiles

AddFiles adds the new discord.File(s) to the discord.MessageUpdate

func (*WebhookMessageUpdateBuilder) Build

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

ClearContent removes content of the Message

func (*WebhookMessageUpdateBuilder) ClearEmbeds

ClearEmbeds removes all the embeds from the Message

func (*WebhookMessageUpdateBuilder) ClearFiles

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

RemoveEmbed removes an embed from the Message

func (*WebhookMessageUpdateBuilder) RemoveFile

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.Snowflake) *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

SetContent sets content of the Message

func (*WebhookMessageUpdateBuilder) SetContentf

func (b *WebhookMessageUpdateBuilder) SetContentf(content string, a ...interface{}) *WebhookMessageUpdateBuilder

SetContentf sets content of the Message

func (*WebhookMessageUpdateBuilder) SetEmbed

SetEmbed sets the provided Embed at the index of the Message

func (*WebhookMessageUpdateBuilder) SetEmbeds

SetEmbeds sets the Embed(s) of the Message

func (*WebhookMessageUpdateBuilder) SetFile

SetFile sets the new discord.File at the index for this discord.MessageUpdate

func (*WebhookMessageUpdateBuilder) SetFiles

SetFiles sets the new discord.File(s) for this discord.MessageUpdate

type WebhookSourceChannel

type WebhookSourceChannel struct {
	ID   snowflake.Snowflake `json:"id"`
	Name string              `json:"name"`
}

type WebhookSourceGuild

type WebhookSourceGuild struct {
	ID   snowflake.Snowflake `json:"id"`
	Name string              `json:"name"`
	Icon *string             `json:"icon"`
}

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    *NullIcon            `json:"avatar,omitempty"`
	ChannelID *snowflake.Snowflake `json:"channel_id"`
}

WebhookUpdate is used to update a Webhook

type WebhookUpdateWithToken

type WebhookUpdateWithToken struct {
	Name   *string   `json:"name,omitempty"`
	Avatar *NullIcon `json:"avatar,omitempty"`
}

WebhookUpdateWithToken is used to update a Webhook with the token

type WebhooksUpdateGatewayEvent

type WebhooksUpdateGatewayEvent struct {
	GuildID   snowflake.Snowflake `json:"guild_id"`
	ChannelID snowflake.Snowflake `json:"channel_id"`
}

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.Snowflake `json:"id"`
	Name              string              `json:"name"`
	Enabled           bool                `json:"enabled"`
	Syncing           bool                `json:"syncing"`
	RoleID            snowflake.Snowflake `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 (YouTubeIntegration) MarshalJSON

func (i YouTubeIntegration) MarshalJSON() ([]byte, error)

func (YouTubeIntegration) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL