discord

package
v0.0.0-...-d49a382 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconMaxWidth  uint16 = 1024
	IconMaxHeight uint16 = 1024
)
View Source
const (
	// EncodingPrefix is the leader string prepended on image data strings.
	EncodingPrefix = "data:"

	// EncodingInfix is the dividing string between the image format and the image
	// data, informing the consumer of the encoding format.
	EncodingInfix = ";base64,"

	// MinPossibleSize is the minimum possible size of a valid image in bytes.
	//
	// This is based on a 1x1 pixel image with no metadata and the highest
	// possible compression.
	//
	// Sizes reached per valid format:
	//    gif  = 799 bytes
	//    jpeg = 280 bytes
	//    png  = 67  bytes
	MinPossibleSize uint8 = 67

	// MinPossibleB64Size is the minimum possible base64 encoded size of a valid
	// image in bytes.
	//
	// Sizes reached per valid format using the above test images as input:
	//    gif  = 1065 bytes
	//    jpeg = 372  bytes
	//    png  = 88   bytes
	MinPossibleB64Size uint8 = 88

	MinPossibleImageString = uint16(len(EncodingPrefix) +
		len(EncodingInfix) +
		int(MinPossibleB64Size))
)
View Source
const (
	// Discord epoch timestamp in milliseconds.
	EpochMillis uint64 = 1420070400000

	// Max valid value for a raw snowflake timestamp.
	MaxTimestamp uint64 = 0x0000_FFFF_FFFF_FFC0

	// Max valid value for a snowflake worker id.
	MaxWorkerID uint8 = 0x3E

	// Max valid value for a snowflake process id.
	MaxProcessID uint8 = 0x1F

	// Max valid value for a snowflake counter value.
	MaxCounterValue uint16 = 0x0FFF
)

Variables

View Source
var (
	ErrBadImageDataJsonType = errors.New("image data passed to" +
		" UnmarshalJSON was not a string value")
	ErrBadImageDataSize = errors.New("image data string is too short to " +
		"contain a valid image")
	ErrBadImageDataFormat = errors.New("unrecognized or invalid image data" +
		" string format")
	ErrTypeMismatch = errors.New("the type declared in the image data prefix" +
		" does not match the actual image type")
	ErrBadImageFormat = errors.New("unrecognized image format; must be one of" +
		" gif, jpeg, or png")
)
View Source
var (
	ErrNonceNotInt = errors.New("called IntegerValue on a string nonce")
	ErrNonceNotStr = errors.New("called StringValue on an integer nonce")
)
View Source
var (
	ErrEmptySnowflake      = errors.New("empty snowflake value")
	ErrNoSnowflakeTime     = errors.New("snowflake missing timestamp value")
	ErrNoSnowflakeWorkerID = errors.New("snowflake missing internal worker id")
	ErrNoSnowflakeProcID   = errors.New("snowflake missing internal process id")
	ErrNoSnowflakeCounter  = errors.New("snowflake missing counter value")
	ErrSnowflakeBitLoss    = errors.New("value is greater than the max allowed value for this field")
)
View Source
var (
	// Thrown if attempting to serialize a User instance that has no `id` value
	// set.
	//
	// This will only be thrown if the User instance has validation enabled.
	ErrNoId = errors.New("id field missing on User instance")

	// Thrown if attempting to serialize a User instance that has no `username`
	// value set.
	//
	// This will only be thrown if the User instance has validation enabled.
	ErrNoUsername = errors.New("username field missing for User instance")

	// Thrown if attempting to serialize a User instance that has no
	// `discriminator` value set.
	//
	// This will only be thrown if the User instance has validation enabled.
	ErrNoDiscriminator = errors.New("discriminator field missing for User instance")

	ErrSetNilUser = errors.New("cannot call OptionalUser.Set with a nil value")
)

Errors thrown by methods in this file.

View Source
var (
	ErrBadUsernameLength   = errors.New("usernames must be 2-32 characters in length")
	ErrBadUsernameContents = errors.New(`usernames cannot contain "@", ":", or "` + "```" + `"`)
	ErrBadUsernameValue    = errors.New(`usernames cannot be "discordtag", "everyone", "here"`)
)
View Source
var (
	ErrBadActivityFlag = errors.New("unrecognized activity flag value")
)
View Source
var (
	ErrBadActivityType = errors.New("unrecognized activity type value")
)
View Source
var (
	ErrBadAllowedMentionType = errors.New("unrecognized allowed mention type value")
)
View Source
var (
	ErrBadBitrate = errors.New("bitrates must be between 8000 to 96000 (128000 for VIP servers) inclusive")
)
View Source
var (
	ErrBadChannelNameLength = errors.New("channel names must be 2-100" +
		" characters in length")
)
View Source
var (
	ErrBadChannelType = errors.New("unrecognized channel type value")
)
View Source
var (
	ErrBadConnVisibility = errors.New("unrecognized connection visibility value")
)
View Source
var (
	ErrBadContentLength = errors.New("content length must not exceed 2000 characters")
)
View Source
var (
	ErrBadEmbedType = errors.New("unrecognized embed type value")
)
View Source
var (
	ErrBadExpConFilterLvl = errors.New("unrecognized explicit content filter level value")
)
View Source
var (
	ErrBadFeature = errors.New("unrecognized guild feature value")
)
View Source
var (
	ErrBadGuildNameLength = errors.New("guild names must be 2-100 characters" +
		" in length excluding leading/trailing whitespace")
)
View Source
var (
	ErrBadIconSize = errors.New("given image is too large to use as a guild" +
		" icon; images must be no larger than 1024x1024")
)
View Source
var (
	ErrBadMFALevel = errors.New("unrecognized MFA level value")
)
View Source
var (
	ErrBadMsgFlag = errors.New("unrecognized message flag value")
)
View Source
var (
	ErrBadMsgNoteLevel = errors.New("unrecognized message notification level value")
)
View Source
var (
	ErrBadMsgType = errors.New("unrecognized message type value")
)
View Source
var (
	ErrBadNickLength = errors.New("nickname lengths must be 1-32 characters in length")
)
View Source
var (
	ErrBadOverwriteType = errors.New("unrecognized overwrite type value")
)
View Source
var (
	ErrBadPermission = errors.New("unrecognized permission flag(s)")
)
View Source
var (
	ErrBadPremiumTier = errors.New("unrecognized premium_tier value")
)
View Source
var (
	ErrBadPremiumType = errors.New("unrecognized premium type value")
)
View Source
var (
	ErrBadPresenceStatus = errors.New("unrecognized presence status value")
)
View Source
var (
	ErrBadSystemChannelFlag = errors.New("unrecognized system_channel_flags value")
)
View Source
var (
	ErrBadTargetUserType = errors.New("unrecognized target user type value")
)
View Source
var (
	ErrBadTopicLength = errors.New("channel topics cannot be longer than 1024 characters")
)
View Source
var (
	ErrBadUserLimit = errors.New("invalid user limit value, user limits must be 0-99")
)
View Source
var (
	ErrBadUserRateLimit = errors.New("per_user_rate_limit values cannot be " +
		"greater than 21600")
)
View Source
var (
	ErrBadVerificationLevel = errors.New("unrecognized verification level value")
)
View Source
var (
	ErrBadWebhookType = errors.New("unrecognized webhook type value")
)
View Source
var (
	ErrCurrentIsGtMax = errors.New("activity party's current_size is greater than its max size")
)
View Source
var (
	ErrDiscriminatorLength = errors.New("discriminator values must be " +
		"exactly 4 digits in length")
)
View Source
var (
	ErrInvalidFlag = errors.New("unrecognized user flag value(s)")
)
View Source
var (
	ErrNilColor = errors.New("called SetColor with a nil value")
)
View Source
var (
	ErrNilUser = errors.New("called SetUser with a nil value")
)

Functions

This section is empty.

Types

type Activity

type Activity interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the activity's name.
	Name() string

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) Activity

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the activity type.
	Type() ActivityType

	// SetType overwrites the current value of this record's `type` field.
	SetType(ActivityType) Activity

	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the stream url, is validated when type is 1.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use URLIsReadable to check if the field is
	// present and non-null before use.
	URL() string

	// URLIsNull returns whether this record's `url` field is currently null.
	URLIsNull() bool

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// URLIsReadable returns whether this record's `url` field is currently set
	// and non-null.
	URLIsReadable() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) Activity

	// SetNullURL overwrites the current value of this record's `url` field
	// with `null`.
	SetNullURL() Activity

	// UnsetURL removes this record's `url` field.
	UnsetURL() Activity

	// CreatedAt returns the current value of this record's `created_at` field.
	//
	// The `created_at` field contains the unix timestamp of when the activity was
	// added to the user's session.
	CreatedAt() time.Time

	// SetCreatedAt overwrites the current value of this record's `created_at` field.
	SetCreatedAt(time.Time) Activity

	// Timestamps returns the current value of this record's `timestamps` field.
	//
	// The `timestamps` field contains the unix timestamps for start and/or end of
	// the game.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TimestampsIsSet to check if the field is present before use.
	Timestamps() ActivityTimestamps

	// TimestampsIsSet returns whether this record's `timestamps` field is currently present.
	TimestampsIsSet() bool

	// SetTimestamps overwrites the current value of this record's `timestamps` field.
	SetTimestamps(ActivityTimestamps) Activity

	// UnsetTimestamps removes this record's `timestamps` field.
	UnsetTimestamps() Activity

	// ApplicationID returns the current value of this record's `application_id` field.
	//
	// The `application_id` field contains the application id for the game.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApplicationIDIsSet to check if the field is present before use.
	ApplicationID() Snowflake

	// ApplicationIDIsSet returns whether this record's `application_id` field is currently present.
	ApplicationIDIsSet() bool

	// SetApplicationID overwrites the current value of this record's `application_id` field.
	SetApplicationID(Snowflake) Activity

	// UnsetApplicationID removes this record's `application_id` field.
	UnsetApplicationID() Activity

	// Details returns the current value of this record's `details` field.
	//
	// The `details` field contains what the player is currently doing.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use DetailsIsReadable to check if the field is
	// present and non-null before use.
	Details() string

	// DetailsIsNull returns whether this record's `details` field is currently null.
	DetailsIsNull() bool

	// DetailsIsSet returns whether this record's `details` field is currently present.
	DetailsIsSet() bool

	// DetailsIsReadable returns whether this record's `details` field is currently set
	// and non-null.
	DetailsIsReadable() bool

	// SetDetails overwrites the current value of this record's `details` field.
	SetDetails(string) Activity

	// SetNullDetails overwrites the current value of this record's `details` field
	// with `null`.
	SetNullDetails() Activity

	// UnsetDetails removes this record's `details` field.
	UnsetDetails() Activity

	// State returns the current value of this record's `state` field.
	//
	// The `state` field contains the user's current party status.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use StateIsReadable to check if the field is
	// present and non-null before use.
	State() string

	// StateIsNull returns whether this record's `state` field is currently null.
	StateIsNull() bool

	// StateIsSet returns whether this record's `state` field is currently present.
	StateIsSet() bool

	// StateIsReadable returns whether this record's `state` field is currently set
	// and non-null.
	StateIsReadable() bool

	// SetState overwrites the current value of this record's `state` field.
	SetState(string) Activity

	// SetNullState overwrites the current value of this record's `state` field
	// with `null`.
	SetNullState() Activity

	// UnsetState removes this record's `state` field.
	UnsetState() Activity

	// Emoji returns the current value of this record's `emoji` field.
	//
	// The `emoji` field contains the emoji used for a custom status.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use EmojiIsReadable to check if the field is
	// present and non-null before use.
	Emoji() ActivityEmoji

	// EmojiIsNull returns whether this record's `emoji` field is currently null.
	EmojiIsNull() bool

	// EmojiIsSet returns whether this record's `emoji` field is currently present.
	EmojiIsSet() bool

	// EmojiIsReadable returns whether this record's `emoji` field is currently set
	// and non-null.
	EmojiIsReadable() bool

	// SetEmoji overwrites the current value of this record's `emoji` field.
	SetEmoji(ActivityEmoji) Activity

	// SetNullEmoji overwrites the current value of this record's `emoji` field
	// with `null`.
	SetNullEmoji() Activity

	// UnsetEmoji removes this record's `emoji` field.
	UnsetEmoji() Activity

	// Party returns the current value of this record's `party` field.
	//
	// The `party` field contains information for the current party of the player.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PartyIsSet to check if the field is present before use.
	Party() ActivityParty

	// PartyIsSet returns whether this record's `party` field is currently present.
	PartyIsSet() bool

	// SetParty overwrites the current value of this record's `party` field.
	SetParty(ActivityParty) Activity

	// UnsetParty removes this record's `party` field.
	UnsetParty() Activity

	// Assets returns the current value of this record's `assets` field.
	//
	// The `assets` field contains images for the presence and their hover texts.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use AssetsIsSet to check if the field is present before use.
	Assets() ActivityAssets

	// AssetsIsSet returns whether this record's `assets` field is currently present.
	AssetsIsSet() bool

	// SetAssets overwrites the current value of this record's `assets` field.
	SetAssets(ActivityAssets) Activity

	// UnsetAssets removes this record's `assets` field.
	UnsetAssets() Activity

	// Secrets returns the current value of this record's `secrets` field.
	//
	// The `secrets` field contains secrets for Rich Presence joining and
	// spectating.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use SecretsIsSet to check if the field is present before use.
	Secrets() ActivitySecrets

	// SecretsIsSet returns whether this record's `secrets` field is currently present.
	SecretsIsSet() bool

	// SetSecrets overwrites the current value of this record's `secrets` field.
	SetSecrets(ActivitySecrets) Activity

	// UnsetSecrets removes this record's `secrets` field.
	UnsetSecrets() Activity

	// Instanced returns the current value of this record's `instanced` field.
	//
	// The `instanced` field indicates whether or not the activity is an instanced
	// game session.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use InstancedIsSet to check if the field is present before use.
	Instance() bool

	// InstancedIsSet returns whether this record's `instanced` field is currently present.
	InstanceIsSet() bool

	// SetInstanced overwrites the current value of this record's `instanced` field.
	SetInstance(bool) Activity

	// UnsetInstanced removes this record's `instanced` field.
	UnsetInstance() Activity

	// Flags returns the current value of this record's `flags` field.
	//
	// The `flags` field contains activity flags ORd together, describes what the
	// payload includes.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use FlagsIsSet to check if the field is present before use.
	Flags() ActivityFlag

	// FlagsIsSet returns whether this record's `flags` field is currently present.
	FlagsIsSet() bool

	// SetFlags overwrites the current value of this record's `flags` field.
	SetFlags(ActivityFlag) Activity

	// UnsetFlags removes this record's `flags` field.
	UnsetFlags() Activity
}

Activity

TODO: document me

Bots are only able to send name, type, and optionally url.

type ActivityAssets

type ActivityAssets interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	// LargeImage returns the current value of this record's `large_image` field.
	//
	// The `large_image` field contains the id for a large asset of the activity,
	// usually a snowflake
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use LargeImageIsSet to check if the field is present before use.
	LargeImage() string

	// LargeImageIsSet returns whether this record's `large_image` field is
	// currently present.
	LargeImageIsSet() bool

	// SetLargeImage overwrites the current value of this record's `large_image`
	// field.
	SetLargeImage(string) ActivityAssets

	// UnsetLargeImage removes this record's `large_image` field.
	UnsetLargeImage() ActivityAssets

	// LargeText returns the current value of this record's `large_text` field.
	//
	// The `large_text` field contains the text displayed when hovering over the
	// large image of the activity.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use LargeTextIsSet to check if the field is present before use.
	LargeText() string

	// LargeTextIsSet returns whether this record's `large_text` field is
	// currently present.
	LargeTextIsSet() bool

	// SetLargeText overwrites the current value of this record's `large_text`
	// field.
	SetLargeText(string) ActivityAssets

	// UnsetLargeText removes this record's `large_text` field.
	UnsetLargeText() ActivityAssets

	// SmallImage returns the current value of this record's `small_image` field.
	//
	// The `small_image` field contains the id for a small asset of the activity,
	// usually a snowflake
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use SmallImageIsSet to check if the field is present before use.
	SmallImage() string

	// SmallImageIsSet returns whether this record's `small_image` field is
	// currently present.
	SmallImageIsSet() bool

	// SetSmallImage overwrites the current value of this record's `small_image`
	// field.
	SetSmallImage(string) ActivityAssets

	// UnsetSmallImage removes this record's `small_image` field.
	UnsetSmallImage() ActivityAssets

	// SmallText returns the current value of this record's `small_text` field.
	//
	// The `small_text` field contains the text displayed when hovering over the
	// small image of the activity.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use SmallTextIsSet to check if the field is present before use.
	SmallText() string

	// SmallTextIsSet returns whether this record's `small_text` field is
	// currently present.
	SmallTextIsSet() bool

	// SetSmallText overwrites the current value of this record's `small_text`
	// field.
	SetSmallText(string) ActivityAssets

	// UnsetSmallText removes this record's `small_text` field.
	UnsetSmallText() ActivityAssets
}

type ActivityEmoji

type ActivityEmoji interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the emoji.
	Name() string

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) ActivityEmoji

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of the emoji.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use IDIsSet to check if the field is present before use.
	ID() Snowflake

	// IDIsSet returns whether this record's `id` field is currently present.
	IDIsSet() bool

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) ActivityEmoji

	// UnsetID removes this record's `id` field.
	UnsetID() ActivityEmoji

	// Animated returns the current value of this record's `animated` field.
	//
	// The `animated` field indicates whether this emoji is animated.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use AnimatedIsSet to check if the field is present before use.
	Animated() bool

	// AnimatedIsSet returns whether this record's `animated` field is currently present.
	AnimatedIsSet() bool

	// SetAnimated overwrites the current value of this record's `animated` field.
	SetAnimated(bool) ActivityEmoji

	// UnsetAnimated removes this record's `animated` field.
	UnsetAnimated() ActivityEmoji
}

type ActivityFlag

type ActivityFlag uint8
const (
	FlagInstance ActivityFlag = 1 << iota
	FlagJoin
	FlagSpectate
	FlagJoinRequest
	FlagSync
	FlagPlay
)

func (ActivityFlag) IsValid

func (f ActivityFlag) IsValid() bool

func (ActivityFlag) Validate

func (f ActivityFlag) Validate() error

type ActivityParty

type ActivityParty interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use IDIsSet to check if the field is present before use.
	ID() string

	// IDIsSet returns whether this record's `id` field is currently present.
	IDIsSet() bool

	// SetID overwrites the current value of this record's `id` field.
	SetID(string) ActivityParty

	// UnsetID removes this record's `id` field.
	UnsetID() ActivityParty

	// CurrentSize returns the current first value of this record's `size` field.
	//
	// The `size` field contains the party's current and maximum size.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use CurrentSizeIsSet to check if the field is present before use.
	CurrentSize() uint16

	// MaxSize returns the current second value of this record's `size` field.
	//
	// The `size` field contains the party's current and maximum size.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MaxSizeIsSet to check if the field is present before use.
	MaxSize() uint16

	// SizesAreSet returns whether this record's `size` field is currently
	// present.
	SizesAreSet() bool

	// SetCurrentSize overwrites the current first value of this record's `size`
	// field.
	SetSizes(current, max uint16) ActivityParty

	// UnsetCurrentSize removes this record's `size` field.
	UnsetSizes() ActivityParty
}

type ActivitySecrets

type ActivitySecrets interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	// Join returns the current value of this record's `join` field.
	//
	// The `join` field contains the secret for joining a party.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use JoinIsSet to check if the field is present before use.
	Join() string

	// JoinIsSet returns whether this record's `join` field is currently present.
	JoinIsSet() bool

	// SetJoin overwrites the current value of this record's `join` field.
	SetJoin(string) ActivitySecrets

	// UnsetJoin removes this record's `join` field.
	UnsetJoin() ActivitySecrets

	// Spectate returns the current value of this record's `spectate` field.
	//
	// The `spectate` field contains the secret for spectating a game.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use SpectateIsSet to check if the field is present before use.
	Spectate() string

	// SpectateIsSet returns whether this record's `spectate` field is currently present.
	SpectateIsSet() bool

	// SetSpectate overwrites the current value of this record's `spectate` field.
	SetSpectate(string) ActivitySecrets

	// UnsetSpectate removes this record's `spectate` field.
	UnsetSpectate() ActivitySecrets

	// Match returns the current value of this record's `match` field.
	//
	// The `match` field contains the secret for a specific instanced match.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MatchIsSet to check if the field is present before use.
	Match() string

	// MatchIsSet returns whether this record's `match` field is currently present.
	MatchIsSet() bool

	// SetMatch overwrites the current value of this record's `match` field.
	SetMatch(string) ActivitySecrets

	// UnsetMatch removes this record's `match` field.
	UnsetMatch() ActivitySecrets
}

type ActivityTimestamps

type ActivityTimestamps interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Start returns the current value of this record's `start` field.
	//
	// The `start` field contains the unix time (in milliseconds) of when the
	// activity started.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use StartIsSet to check if the field is present before use.
	Start() time.Time

	// StartIsSet returns whether this record's `start` field is currently present.
	StartIsSet() bool

	// SetStart overwrites the current value of this record's `start` field.
	SetStart(time.Time) ActivityTimestamps

	// UnsetStart removes this record's `start` field.
	UnsetStart() ActivityTimestamps

	// End returns the current value of this record's `end` field.
	//
	// The `end` field contains the unix time (in milliseconds) of when the
	// activity ends.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use EndIsSet to check if the field is present before use.
	End() time.Time

	// EndIsSet returns whether this record's `end` field is currently present.
	EndIsSet() bool

	// SetEnd overwrites the current value of this record's `end` field.
	SetEnd(time.Time) ActivityTimestamps

	// UnsetEnd removes this record's `end` field.
	UnsetEnd() ActivityTimestamps
}

type ActivityType

type ActivityType uint8
const (
	// Format: Playing {name}
	// Example: "Playing Rocket League"
	ActivityTypeGame ActivityType = iota

	// Format: Streaming {details}
	// Example: "Streaming Rocket League"
	//
	// Note: The streaming type currently only supports Twitch and YouTube. Only
	// https://twitch.tv/ and https://youtube.com/ urls will work.
	ActivityTypeStreaming

	// Format: Listening to {name}
	// Example: "Listening to Spotify"
	ActivityTypeListening

	// Format: {emoji} {name}
	// Example: ":smiley: I am cool"
	ActivityTypeCustom ActivityType = 1 + iota

	// Format: Competing in {name}
	// Example: "Competing in Arena World Champions"
	ActivityTypeCompeting
)

func (ActivityType) IsValid

func (a ActivityType) IsValid() bool

func (ActivityType) Validate

func (a ActivityType) Validate() error

type AllowedMentionType

type AllowedMentionType string
const (
	// Controls role mentions.
	AllowedMentionTypeRoles AllowedMentionType = "roles"

	// Controls user mentions.
	AllowedMentionTypeUsers AllowedMentionType = "users"

	// Controls @everyone and @here mentions.
	AllowedMentionTypeEveryone AllowedMentionType = "everyone"
)

func (AllowedMentionType) IsValid

func (a AllowedMentionType) IsValid() bool

func (AllowedMentionType) Validate

func (a AllowedMentionType) Validate() error

type AllowedMentions

type AllowedMentions interface {
	// Parse returns the current value of this record's `parse` field.
	//
	// The `parse` field contains an array of allowed mention types to parse from
	// the content.
	Parse() []AllowedMentionType

	// SetParse overwrites the current value of this record's `parse` field.
	SetParse([]AllowedMentionType) AllowedMentions

	// Roles returns the current value of this record's `roles` field.
	//
	// The `roles` field contains an array of role_ids to mention (Max size of
	// 100).
	Roles() []Snowflake

	// SetRoles overwrites the current value of this record's `roles` field.
	SetRoles([]Snowflake) AllowedMentions

	// Users returns the current value of this record's `users` field.
	//
	// The `users` field contains an array of user_ids to mention (Max size of
	// 100).
	Users() []Snowflake

	// SetUsers overwrites the current value of this record's `users` field.
	SetUsers([]Snowflake) AllowedMentions
}

type Ban

type Ban interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// the reason for the ban
	Reason() string
	ReasonIsNull() bool
	SetReason(string) Ban
	SetNullReason() Ban

	// the banned user
	User() User
	SetUser(User) Ban
}

type Bitrate

type Bitrate uint32

func DecodeBitrate

func DecodeBitrate(dec *gojay.Decoder) (*Bitrate, error)

func (Bitrate) IsValid

func (b Bitrate) IsValid() bool

func (Bitrate) Validate

func (b Bitrate) Validate() error

type Channel

type Channel interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of this channel.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	//
	// Passing a nil value here will cause this method to panic.
	SetID(Snowflake) Channel

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of the channel.
	Type() ChannelType

	// SetType overwrites the current value of this record's `type` field.
	SetType(ChannelType) Channel

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the id of the guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIDIsSet to check if the field is present before use.
	GuildID() Snowflake

	// GuildIDIsSet returns whether this record's `guild_id` field is currently
	// present.
	GuildIDIsSet() bool

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	//
	// Passing a nil value here will cause this method to panic.
	SetGuildID(Snowflake) Channel

	// UnsetGuildID removes this record's `guild_id` field.
	UnsetGuildID() Channel

	// Position returns the current value of this record's `position` field.
	//
	// The `position` field contains the sorting position of the channel.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PositionIsSet to check if the field is present before use.
	Position() uint16

	// PositionIsSet returns whether this record's `position` field is currently
	// present.
	PositionIsSet() bool

	// SetPosition overwrites the current value of this record's `position` field.
	SetPosition(uint16) Channel

	// UnsetPosition removes this record's `position` field.
	UnsetPosition() Channel

	// PermissionOverwrites returns the current value of this record's
	// `permission_overwrites` field.
	//
	// The `permission_overwrites` field contains an array of explicit permission
	// overwrites for members and roles.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PermissionOverwritesIsSet to check if the field is present before use.
	PermissionOverwrites() []PermissionOverwrite

	// PermissionOverwritesIsSet returns whether this record's
	// `permission_overwrites` field is currently present.
	PermissionOverwritesIsSet() bool

	// SetPermissionOverwrites overwrites the current value of this record's
	// `permission_overwrites` field.
	//
	// Passing a nil value here will not unset the field, it will instead be set
	// to an empty array due to Go's handling of nil slices.
	SetPermissionOverwrites([]PermissionOverwrite) Channel

	// UnsetPermissionOverwrites removes this record's `permission_overwrites`
	// field.
	UnsetPermissionOverwrites() Channel

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the channel (2-100 characters).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use NameIsSet to check if the field is present before use.
	Name() ChannelName

	// NameIsSet returns whether this record's `name` field is currently present.
	NameIsSet() bool

	// SetName overwrites the current value of this record's `name` field.
	SetName(ChannelName) Channel

	// UnsetName removes this record's `name` field.
	UnsetName() Channel

	// Topic returns the current value of this record's `topic` field.
	//
	// The `topic` field contains the channel topic (0-1024 characters).
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use TopicIsReadable to check if the field is
	// present and non-null before use.
	Topic() ChannelTopic

	// TopicIsNull returns whether this record's `topic` field is currently null.
	TopicIsNull() bool

	// TopicIsSet returns whether this record's `topic` field is currently
	// present.
	TopicIsSet() bool

	// TopicIsReadable returns whether this record's `topic` field is currently
	// set and non-null.
	TopicIsReadable() bool

	// SetTopic overwrites the current value of this record's `topic` field.
	SetTopic(ChannelTopic) Channel

	// SetNullTopic overwrites the current value of this record's `topic` field
	// with `null`.
	SetNullTopic() Channel

	// UnsetTopic removes this record's `topic` field.
	UnsetTopic() Channel

	// NSFW returns the current value of this record's `nsfw` field.
	//
	// The `nsfw` field indicates whether the channel is nsfw.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use NSFWIsSet to check if the field is present before use.
	NSFW() bool

	// NSFWIsSet returns whether this record's `nsfw` field is currently present.
	NSFWIsSet() bool

	// SetNSFW overwrites the current value of this record's `nsfw` field.
	SetNSFW(bool) Channel

	// UnsetNSFW removes this record's `nsfw` field.
	UnsetNSFW() Channel

	// LastMessageID returns the current value of this record's `last_message_id`
	// field.
	//
	// The `last_message_id` field contains the id of the last message sent in
	// this channel (may not point to an existing or valid message).
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use LastMessageIDIsReadable to check if the field
	// is present and non-null before use.
	LastMessageID() Snowflake

	// LastMessageIDIsNull returns whether this record's `last_message_id` field
	// is currently null.
	LastMessageIDIsNull() bool

	// LastMessageIDIsSet returns whether this record's `last_message_id` field is
	// currently present.
	LastMessageIDIsSet() bool

	// LastMessageIDIsReadable returns whether this record's `last_message_id`
	// field is currently set and non-null.
	LastMessageIDIsReadable() bool

	// SetLastMessageID overwrites the current value of this record's
	// `last_message_id` field.
	//
	// Passing a nil value here will cause this method to panic.
	SetLastMessageID(Snowflake) Channel

	// SetNullLastMessageID overwrites the current value of this record's
	// `last_message_id` field with `null`.
	SetNullLastMessageID() Channel

	// UnsetLastMessageID removes this record's `last_message_id` field.
	UnsetLastMessageID() Channel

	// Bitrate returns the current value of this record's `bitrate` field.
	//
	// The `bitrate` field contains the bitrate (in bits) of the voice channel.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use BitrateIsSet to check if the field is present before use.
	Bitrate() Bitrate

	// BitrateIsSet returns whether this record's `bitrate` field is currently
	// present.
	BitrateIsSet() bool

	// SetBitrate overwrites the current value of this record's `bitrate` field.
	SetBitrate(Bitrate) Channel

	// UnsetBitrate removes this record's `bitrate` field.
	UnsetBitrate() Channel

	// UserLimit returns the current value of this record's `user_limit` field.
	//
	// The `user_limit` field contains the user limit of the voice channel.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use UserLimitIsSet to check if the field is present before use.
	UserLimit() UserLimit

	// UserLimitIsSet returns whether this record's `user_limit` field is
	// currently present.
	UserLimitIsSet() bool

	// SetUserLimit overwrites the current value of this record's `user_limit`
	// field.
	SetUserLimit(UserLimit) Channel

	// UnsetUserLimit removes this record's `user_limit` field.
	UnsetUserLimit() Channel

	// RateLimitPerUser returns the current value of this record's
	// `rate_limit_per_user` field.
	//
	// The `rate_limit_per_user` field contains the amount of seconds a user has
	// to wait before sending another message (0-21600); bots, as well as users
	// with the permission manage_messages or manage_channel, are unaffected.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use RateLimitPerUserIsSet to check if the field is present before use.
	RateLimitPerUser() PerUserRateLimit

	// RateLimitPerUserIsSet returns whether this record's `rate_limit_per_user`
	// field is currently present.
	RateLimitPerUserIsSet() bool

	// SetRateLimitPerUser overwrites the current value of this record's
	// `rate_limit_per_user` field.
	SetRateLimitPerUser(PerUserRateLimit) Channel

	// UnsetRateLimitPerUser removes this record's `rate_limit_per_user` field.
	UnsetRateLimitPerUser() Channel

	// Recipients returns the current value of this record's `recipients` field.
	//
	// The `recipients` field contains the recipients of the DM.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use RecipientsIsSet to check if the field is present before use.
	Recipients() []User

	// RecipientsIsSet returns whether this record's `recipients` field is
	// currently present.
	RecipientsIsSet() bool

	// SetRecipients overwrites the current value of this record's `recipients`
	// field.
	//
	// Passing a nil value here will not unset the field, it will instead be set
	// to an empty array due to Go's handling of nil slices.
	SetRecipients([]User) Channel

	// UnsetRecipients removes this record's `recipients` field.
	UnsetRecipients() Channel

	// Icon returns the current value of this record's `icon` field.
	//
	// The `icon` field contains the icon hash.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use IconIsReadable to check if the field is
	// present and non-null before use.
	Icon() ImageHash

	// IconIsNull returns whether this record's `icon` field is currently null.
	IconIsNull() bool

	// IconIsSet returns whether this record's `icon` field is currently present.
	IconIsSet() bool

	// IconIsReadable returns whether this record's `icon` field is currently set
	// and non-null.
	IconIsReadable() bool

	// SetIcon overwrites the current value of this record's `icon` field.
	SetIcon(ImageHash) Channel

	// SetNullIcon overwrites the current value of this record's `icon` field
	// with `null`.
	SetNullIcon() Channel

	// UnsetIcon removes this record's `icon` field.
	UnsetIcon() Channel

	// OwnerID returns the current value of this record's `owner_id` field.
	//
	// The `owner_id` field contains the id of the DM creator.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use OwnerIDIsSet to check if the field is present before use.
	OwnerID() Snowflake

	// OwnerIDIsSet returns whether this record's `owner_id` field is currently
	// present.
	OwnerIDIsSet() bool

	// SetOwnerID overwrites the current value of this record's `owner_id` field.
	//
	// Passing a nil value here will cause this method to panic.
	SetOwnerID(Snowflake) Channel

	// UnsetOwnerID removes this record's `owner_id` field.
	UnsetOwnerID() Channel

	// ApplicationID returns the current value of this record's `application_id`
	// field.
	//
	// The `application_id` field contains the application id of the group DM
	// creator if it is bot-created.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApplicationIDIsSet to check if the field is present before use.
	ApplicationID() Snowflake

	// ApplicationIDIsSet returns whether this record's `application_id` field is
	// currently present.
	ApplicationIDIsSet() bool

	// SetApplicationID overwrites the current value of this record's
	// `application_id` field.
	//
	// Passing a nil value here will cause this method to panic.
	SetApplicationID(Snowflake) Channel

	// UnsetApplicationID removes this record's `application_id` field.
	UnsetApplicationID() Channel

	// ParentID returns the current value of this record's `parent_id` field.
	//
	// The `parent_id` field contains the id of the parent category for a channel
	// (each parent category can contain up to 50 channels).
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use ParentIDIsReadable to check if the field is
	// present and non-null before use.
	ParentID() Snowflake

	// ParentIDIsNull returns whether this record's `parent_id` field is currently
	// null.
	ParentIDIsNull() bool

	// ParentIDIsSet returns whether this record's `parent_id` field is currently
	// present.
	ParentIDIsSet() bool

	// ParentIDIsReadable returns whether this record's `parent_id` field is
	// currently set and non-null.
	ParentIDIsReadable() bool

	// SetParentID overwrites the current value of this record's `parent_id`
	// field.
	//
	// Passing a nil value here will cause this method to panic.
	SetParentID(Snowflake) Channel

	// SetNullParentID overwrites the current value of this record's `parent_id`
	// field with `null`.
	SetNullParentID() Channel

	// UnsetParentID removes this record's `parent_id` field.
	UnsetParentID() Channel

	// LastPinTimestamp returns the current value of this record's
	// `last_pin_timestamp` field.
	//
	// The `last_pin_timestamp` field contains the timestamp of when the last
	// pinned message was pinned. This may be null in events such as GUILD_CREATE
	// when a message is not pinned.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use LastPinTimestampIsReadable to check if the
	// field is present and non-null before use.
	LastPinTimestamp() time.Time

	// LastPinTimestampIsNull returns whether this record's `last_pin_timestamp`
	// field is currently null.
	LastPinTimestampIsNull() bool

	// LastPinTimestampIsSet returns whether this record's `last_pin_timestamp`
	// field is currently present.
	LastPinTimestampIsSet() bool

	// LastPinTimestampIsReadable returns whether this record's
	// `last_pin_timestamp` field is currently set and non-null.
	LastPinTimestampIsReadable() bool

	// SetLastPinTimestamp overwrites the current value of this record's
	// `last_pin_timestamp` field.
	SetLastPinTimestamp(time.Time) Channel

	// SetNullLastPinTimestamp overwrites the current value of this record's
	// `last_pin_timestamp` field with `null`.
	SetNullLastPinTimestamp() Channel

	// UnsetLastPinTimestamp removes this record's `last_pin_timestamp` field.
	UnsetLastPinTimestamp() Channel
}

type ChannelMention

type ChannelMention interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Sized
	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of the channel.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) ChannelMention

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the id of the guild containing the channel.
	GuildID() Snowflake

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) ChannelMention

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of the channel.
	Type() ChannelType

	// SetType overwrites the current value of this record's `type` field.
	SetType(ChannelType) ChannelMention

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the channel.
	Name() ChannelName

	// SetName overwrites the current value of this record's `name` field.
	SetName(name ChannelName) ChannelMention
}

type ChannelName

type ChannelName string

func DecodeChannelName

func DecodeChannelName(dec *gojay.Decoder) (*ChannelName, error)

func (*ChannelName) AppendJSONBytes

func (n *ChannelName) AppendJSONBytes(writer io.Writer) error

func (*ChannelName) IsNil

func (n *ChannelName) IsNil() bool

func (ChannelName) IsValid

func (n ChannelName) IsValid() bool

func (ChannelName) JSONSize

func (n ChannelName) JSONSize() uint32

func (ChannelName) MarshalJSON

func (n ChannelName) MarshalJSON() ([]byte, error)

func (ChannelName) ToJSONBytes

func (n ChannelName) ToJSONBytes() []byte

func (*ChannelName) UnmarshalJSON

func (n *ChannelName) UnmarshalJSON(bytes []byte) error

func (ChannelName) Validate

func (n ChannelName) Validate() error

type ChannelTopic

type ChannelTopic string

func DecodeChannelTopic

func DecodeChannelTopic(dec *gojay.Decoder) (*ChannelTopic, error)

func (ChannelTopic) IsValid

func (t ChannelTopic) IsValid() bool

func (ChannelTopic) Validate

func (t ChannelTopic) Validate() error

type ChannelType

type ChannelType uint8
const (
	// A text channel within a server
	ChannelTypeGuildText ChannelType = iota

	// A direct message between users
	ChannelTypeDM

	// A voice channel within a server
	ChannelTypeGuildVoice

	// A direct message between multiple users
	ChannelTypeGroupDM

	// An organizational category that contains up to 50 channels
	ChannelTypeGuildCategory

	// A channel that users can follow and crosspost into their own server
	ChannelTypeGuildNews

	// A channel in which game developers can sell their game on Discord
	ChannelTypeGuildStore
)

func DecodeChannelType

func DecodeChannelType(dec *gojay.Decoder) (ChannelType, error)

func (ChannelType) AppendJSONBytes

func (t ChannelType) AppendJSONBytes(writer io.Writer) error

func (*ChannelType) IsNil

func (t *ChannelType) IsNil() bool

func (ChannelType) IsValid

func (t ChannelType) IsValid() bool

func (ChannelType) JSONSize

func (t ChannelType) JSONSize() uint32

func (ChannelType) MarshalJSON

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

func (ChannelType) ToJSONBytes

func (t ChannelType) ToJSONBytes() []byte

func (*ChannelType) UnmarshalJSON

func (t *ChannelType) UnmarshalJSON(bytes []byte) error

func (ChannelType) Validate

func (t ChannelType) Validate() error

type ConnectionVisibility

type ConnectionVisibility uint8
const (
	ConnVisibilityNone ConnectionVisibility = iota
	ConnVisibilityEveryone
)

func (ConnectionVisibility) IsValid

func (c ConnectionVisibility) IsValid() bool

func (ConnectionVisibility) Validate

func (c ConnectionVisibility) Validate() error

type Discriminator

type Discriminator uint16

func (*Discriminator) AppendJSONBytes

func (d *Discriminator) AppendJSONBytes(writer io.Writer) error

func (*Discriminator) IsNil

func (d *Discriminator) IsNil() bool

func (Discriminator) IsValid

func (d Discriminator) IsValid() bool

func (Discriminator) JSONSize

func (d Discriminator) JSONSize() uint32

func (Discriminator) MarshalJSON

func (d Discriminator) MarshalJSON() ([]byte, error)

func (Discriminator) String

func (d Discriminator) String() string

func (*Discriminator) ToJSONBytes

func (d *Discriminator) ToJSONBytes() []byte

func (*Discriminator) UnmarshalJSON

func (d *Discriminator) UnmarshalJSON(bytes []byte) error

func (Discriminator) Validate

func (d Discriminator) Validate() error

type EmbedAuthor

type EmbedAuthor interface {
	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the author.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use NameIsSet to check if the field is present before use.
	Name() string

	// NameIsSet returns whether this record's `name` field is currently present.
	NameIsSet() bool

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) EmbedAuthor

	// UnsetName removes this record's `name` field.
	UnsetName() EmbedAuthor

	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the url of the author.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) EmbedAuthor

	// UnsetURL removes this record's `url` field.
	UnsetURL() EmbedAuthor

	// IconURL returns the current value of this record's `icon_url` field.
	//
	// The `icon_url` field contains the url of the author icon (only supports
	// http(s) and attachments).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use IconURLIsSet to check if the field is present before use.
	IconURL() string

	// IconURLIsSet returns whether this record's `icon_url` field is currently
	// present.
	IconURLIsSet() bool

	// SetIconURL overwrites the current value of this record's `icon_url` field.
	SetIconURL(string) EmbedAuthor

	// UnsetIconURL removes this record's `icon_url` field.
	UnsetIconURL() EmbedAuthor

	// ProxyIconURL returns the current value of this record's `proxy_icon_url`
	// field.
	//
	// The `proxy_icon_url` field contains a proxied url of the author icon.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ProxyIconURLIsSet to check if the field is present before use.
	ProxyIconURL() string

	// ProxyIconURLIsSet returns whether this record's `proxy_icon_url` field is
	// currently present.
	ProxyIconURLIsSet() bool

	// SetProxyIconURL overwrites the current value of this record's
	// `proxy_icon_url` field.
	SetProxyIconURL(string) EmbedAuthor

	// UnsetProxyIconURL removes this record's `proxy_icon_url` field.
	UnsetProxyIconURL() EmbedAuthor
}

type EmbedField

type EmbedField interface {
	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the field.
	Name() string

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) EmbedField

	// Value returns the current value of this record's `value` field.
	//
	// The `value` field contains the value of the field.
	Value() string

	// SetValue overwrites the current value of this record's `value` field.
	SetValue(string) EmbedField

	// Inline returns the current value of this record's `inline` field.
	//
	// The `inline` field indicates whether or not this field should display
	// inline.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use InlineIsSet to check if the field is present before use.
	Inline() bool

	// InlineIsSet returns whether this record's `inline` field is currently
	// present.
	InlineIsSet() bool

	// SetInline overwrites the current value of this record's `inline` field.
	SetInline(bool) EmbedField

	// UnsetInline removes this record's `inline` field.
	UnsetInline() EmbedField
}

type EmbedFooter

type EmbedFooter interface {
	// Text returns the current value of this record's `text` field.
	//
	// The `text` field contains the footer text.
	Text() string

	// SetText overwrites the current value of this record's `text` field.
	SetText(string) EmbedFooter

	// IconURL returns the current value of this record's `icon_url` field.
	//
	// The `icon_url` field contains the url of the footer icon (only supports
	// http(s) and attachments).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use IconURLIsSet to check if the field is present before use.
	IconURL() string

	// IconURLIsSet returns whether this record's `icon_url` field is currently
	// present.
	IconURLIsSet() bool

	// SetIconURL overwrites the current value of this record's `icon_url` field.
	SetIconURL(string) EmbedFooter

	// UnsetIconURL removes this record's `icon_url` field.
	UnsetIconURL() EmbedFooter

	// ProxyIconURL returns the current value of this record's `proxy_icon_url`
	// field.
	//
	// The `proxy_icon_url` field contains the a proxied url of the footer icon.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ProxyIconURLIsSet to check if the field is present before use.
	ProxyIconURL() string

	// ProxyIconURLIsSet returns whether this record's `proxy_icon_url` field is
	// currently present.
	ProxyIconURLIsSet() bool

	// SetProxyIconURL overwrites the current value of this record's
	// `proxy_icon_url` field.
	SetProxyIconURL(string) EmbedFooter

	// UnsetProxyIconURL removes this record's `proxy_icon_url` field.
	UnsetProxyIconURL() EmbedFooter
}

type EmbedImage

type EmbedImage interface {
	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the source url of the image (only supports http(s)
	// and attachments).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) EmbedImage

	// UnsetURL removes this record's `url` field.
	UnsetURL() EmbedImage

	// ProxyURL returns the current value of this record's `proxy_url` field.
	//
	// The `proxy_url` field contains a proxied url of the image.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ProxyURLIsSet to check if the field is present before use.
	ProxyURL() string

	// ProxyURLIsSet returns whether this record's `proxy_url` field is currently
	// present.
	ProxyURLIsSet() bool

	// SetProxyURL overwrites the current value of this record's `proxy_url`
	// field.
	SetProxyURL(string) EmbedImage

	// UnsetProxyURL removes this record's `proxy_url` field.
	UnsetProxyURL() EmbedImage

	// Height returns the current value of this record's `height` field.
	//
	// The `height` field contains the height of the image.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use HeightIsSet to check if the field is present before use.
	Height() uint16

	// HeightIsSet returns whether this record's `height` field is currently
	// present.
	HeightIsSet() bool

	// SetHeight overwrites the current value of this record's `height` field.
	SetHeight(uint16) EmbedImage

	// UnsetHeight removes this record's `height` field.
	UnsetHeight() EmbedImage

	// Width returns the current value of this record's `width` field.
	//
	// The `width` field contains the width of the image.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use WidthIsSet to check if the field is present before use.
	Width() uint16

	// WidthIsSet returns whether this record's `width` field is currently
	// present.
	WidthIsSet() bool

	// SetWidth overwrites the current value of this record's `width` field.
	SetWidth(uint16) EmbedImage

	// UnsetWidth removes this record's `width` field.
	UnsetWidth() EmbedImage
}

EmbedImage TODO: Document me

type EmbedProvider

type EmbedProvider interface {
	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the provider.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use NameIsSet to check if the field is present before use.
	Name() string

	// NameIsSet returns whether this record's `name` field is currently present.
	NameIsSet() bool

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) EmbedProvider

	// UnsetName removes this record's `name` field.
	UnsetName() EmbedProvider

	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the url of the provider.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) EmbedProvider

	// UnsetURL removes this record's `url` field.
	UnsetURL() EmbedProvider
}

type EmbedThumbnail

type EmbedThumbnail interface {
	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the source url of thumbnail (only supports http(s)
	// and attachments).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) EmbedThumbnail

	// UnsetURL removes this record's `url` field.
	UnsetURL() EmbedThumbnail

	// ProxyUrl returns the current value of this record's `proxy_url` field.
	//
	// The `proxy_url` field contains a proxied url of the thumbnail.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ProxyUrlIsSet to check if the field is present before use.
	ProxyUrl() string

	// ProxyUrlIsSet returns whether this record's `proxy_url` field is currently
	// present.
	ProxyUrlIsSet() bool

	// SetProxyUrl overwrites the current value of this record's `proxy_url`
	// field.
	SetProxyUrl(string) EmbedThumbnail

	// UnsetProxyUrl removes this record's `proxy_url` field.
	UnsetProxyUrl() EmbedThumbnail

	// Height returns the current value of this record's `height` field.
	//
	// The `height` field contains the height of the thumbnail.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use HeightIsSet to check if the field is present before use.
	Height() uint16

	// HeightIsSet returns whether this record's `height` field is currently
	// present.
	HeightIsSet() bool

	// SetHeight overwrites the current value of this record's `height` field.
	SetHeight(uint16) EmbedThumbnail

	// UnsetHeight removes this record's `height` field.
	UnsetHeight() EmbedThumbnail

	// Width returns the current value of this record's `width` field.
	//
	// The `width` field contains the width of the thumbnail.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use WidthIsSet to check if the field is present before use.
	Width() uint16

	// WidthIsSet returns whether this record's `width` field is currently
	// present.
	WidthIsSet() bool

	// SetWidth overwrites the current value of this record's `width` field.
	SetWidth(uint16) EmbedThumbnail

	// UnsetWidth removes this record's `width` field.
	UnsetWidth() EmbedThumbnail
}

EmbedThumbnail TODO: Document me

type EmbedType

type EmbedType string

EmbedType TODO: Document me

Embed types are "loosely defined" and, for the most part, are not used by our clients for rendering. Embed attributes power what is rendered. Embed types should be considered deprecated and might be removed in a future API version.

const (
	// Generic embed rendered from embed attributes.
	EmbedTypeRich EmbedType = "rich"

	// Image embed.
	EmbedTypeImage EmbedType = "image"

	// Video embed.
	EmbedTypeVideo EmbedType = "video"

	// Animated gif image embed rendered as a video embed.
	EmbedTypeGifV EmbedType = "gifv"

	// Article embed.
	EmbedTypeArticle EmbedType = "article"

	// Link embed.
	EmbedTypeLink EmbedType = "link"
)

func (EmbedType) IsValid

func (e EmbedType) IsValid() bool

func (EmbedType) Validate

func (e EmbedType) Validate() error

type EmbedVideo

type EmbedVideo interface {
	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the source url of the video.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) EmbedVideo

	// UnsetURL removes this record's `url` field.
	UnsetURL() EmbedVideo

	// Height returns the current value of this record's `height` field.
	//
	// The `height` field contains the height of the video.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use HeightIsSet to check if the field is present before use.
	Height() uint16

	// HeightIsSet returns whether this record's `height` field is currently
	// present.
	HeightIsSet() bool

	// SetHeight overwrites the current value of this record's `height` field.
	SetHeight(uint16) EmbedVideo

	// UnsetHeight removes this record's `height` field.
	UnsetHeight() EmbedVideo

	// Width returns the current value of this record's `width` field.
	//
	// The `width` field contains width of the video.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use WidthIsSet to check if the field is present before use.
	Width() uint16

	// WidthIsSet returns whether this record's `width` field is currently
	// present.
	WidthIsSet() bool

	// SetWidth overwrites the current value of this record's `width` field.
	SetWidth(uint16) EmbedVideo

	// UnsetWidth removes this record's `width` field.
	UnsetWidth() EmbedVideo
}

EmbedVideo TODO: Document me

type Emoji

type Emoji interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	lib.Sized
	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the emoji id.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use IDIsNull to check if the field is null before use.
	ID() Snowflake

	// IDIsNull returns whether this record's `id` field is currently null.
	IDIsNull() bool

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) Emoji

	// SetNullID overwrites the current value of this record's `id` field
	// with `null`.
	SetNullID() Emoji

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the emoji name.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use NameIsNull to check if the field is null before use.
	Name() string

	// NameIsNull returns whether this record's `name` field is currently null.
	NameIsNull() bool

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) Emoji

	// SetNullName overwrites the current value of this record's `name` field
	// with `null`.
	SetNullName() Emoji

	// Roles returns the current value of this record's `roles` field.
	//
	// The `roles` field contains the roles this emoji is whitelisted to.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use RolesIsSet to check if the field is present before use.
	Roles() []Role

	// RolesIsSet returns whether this record's `roles` field is currently
	// present.
	RolesIsSet() bool

	// SetRoles overwrites the current value of this record's `roles` field.
	SetRoles([]Role) Emoji

	// UnsetRoles removes this record's `roles` field.
	UnsetRoles() Emoji

	// User returns the current value of this record's `user` field.
	//
	// The `user` field contains the user that created this emoji.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use UserIsSet to check if the field is present before use.
	User() User

	// UserIsSet returns whether this record's `user` field is currently present.
	UserIsSet() bool

	// SetUser overwrites the current value of this record's `user` field.
	SetUser(User) Emoji

	// UnsetUser removes this record's `user` field.
	UnsetUser() Emoji

	// RequireColons returns the current value of this record's `require_colons`
	// field.
	//
	// The `require_colons` field indicates whether this emoji must be wrapped in
	// colons.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use RequireColonsIsSet to check if the field is present before use.
	RequireColons() bool

	// RequireColonsIsSet returns whether this record's `require_colons` field is
	// currently present.
	RequireColonsIsSet() bool

	// SetRequireColons overwrites the current value of this record's
	// `require_colons` field.
	SetRequireColons(bool) Emoji

	// UnsetRequireColons removes this record's `require_colons` field.
	UnsetRequireColons() Emoji

	// Managed returns the current value of this record's `managed` field.
	//
	// The `managed` field indicates whether this emoji is managed.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ManagedIsSet to check if the field is present before use.
	Managed() bool

	// ManagedIsSet returns whether this record's `managed` field is currently present.
	ManagedIsSet() bool

	// SetManaged overwrites the current value of this record's `managed` field.
	SetManaged(bool) Emoji

	// UnsetManaged removes this record's `managed` field.
	UnsetManaged() Emoji

	// Animated returns the current value of this record's `animated` field.
	//
	// The `animated` field indicates whether this emoji is animated.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use AnimatedIsSet to check if the field is present before use.
	Animated() bool

	// AnimatedIsSet returns whether this record's `animated` field is currently
	// present.
	AnimatedIsSet() bool

	// SetAnimated overwrites the current value of this record's `animated` field.
	SetAnimated(bool) Emoji

	// UnsetAnimated removes this record's `animated` field.
	UnsetAnimated() Emoji

	// Available returns the current value of this record's `available` field.
	//
	// The `available` field indicates whether this emoji can be used, may be
	// false due to loss of Server Boosts.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use AvailableIsSet to check if the field is present before use.
	Available() bool

	// AvailableIsSet returns whether this record's `available` field is currently
	// present.
	AvailableIsSet() bool

	// SetAvailable overwrites the current value of this record's `available`
	// field.
	SetAvailable(bool) Emoji

	// UnsetAvailable removes this record's `available` field.
	UnsetAvailable() Emoji
}

type ExplicitContentFilterLevel

type ExplicitContentFilterLevel uint8
const (
	ExpConFilterLvlDisabled ExplicitContentFilterLevel = iota
	ExpConFilterLvlMembersWithoutRoles
	ExpConFilterLvlAllMembers
)

func (ExplicitContentFilterLevel) IsValid

func (e ExplicitContentFilterLevel) IsValid() bool

func (ExplicitContentFilterLevel) Validate

func (e ExplicitContentFilterLevel) Validate() error

type FollowedChannel

type FollowedChannel interface {
	// ChannelID returns the current value of this record's `channel_id` field.
	//
	// The `channel_id` field contains the current record's source channel id.
	ChannelID() Snowflake

	// SetChannelID overwrites the current value of this record's `channel_id`
	// field.
	SetChannelID(Snowflake) FollowedChannel

	// WebhookID returns the current value of this record's `webhook_id` field.
	//
	// The `webhook_id` field contains the current record's created target webhook
	// id.
	WebhookID() Snowflake

	// SetWebhookID overwrites the current value of this record's `webhook_id`
	// field.
	SetWebhookID(Snowflake) FollowedChannel
}

FollowedChannel TODO: Document me

type Guild

type Guild interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	lib.Sized
	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the guild id.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) Guild

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the guild name (2-100 characters, excluding
	// trailing and leading whitespace).
	Name() GuildName

	// SetName overwrites the current value of this record's `name` field.
	SetName(GuildName) Guild

	// Icon returns the current value of this record's `icon` field.
	//
	// The `icon` field contains the icon hash.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use IconIsNull to check if the field is null before use.
	Icon() ImageHash

	// IconIsNull returns whether this record's `icon` field is currently null.
	IconIsNull() bool

	// SetIcon overwrites the current value of this record's `icon` field.
	SetIcon(ImageHash) Guild

	// SetNullIcon overwrites the current value of this record's `icon` field
	// with `null`.
	SetNullIcon() Guild

	// IconHash returns the current value of this record's `icon_hash` field.
	//
	// The `icon_hash` field contains the
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use IconHashIsReadable to check if the field is
	// present and non-null before use.
	IconHash() ImageHash

	// IconHashIsNull returns whether this record's `icon_hash` field is currently null.
	IconHashIsNull() bool

	// IconHashIsSet returns whether this record's `icon_hash` field is currently present.
	IconHashIsSet() bool

	// IconHashIsReadable returns whether this record's `icon_hash` field is currently set
	// and non-null.
	IconHashIsReadable() bool

	// SetIconHash overwrites the current value of this record's `icon_hash` field.
	SetIconHash(ImageHash) Guild

	// SetNullIconHash overwrites the current value of this record's `icon_hash` field
	// with `null`.
	SetNullIconHash() Guild

	// UnsetIconHash removes this record's `icon_hash` field.
	UnsetIconHash() Guild

	// Splash returns the current value of this record's `splash` field.
	//
	// The `splash` field contains the splash hash.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use SplashIsNull to check if the field is null before use.
	Splash() ImageHash

	// SplashIsNull returns whether this record's `splash` field is currently
	// null.
	SplashIsNull() bool

	// SetSplash overwrites the current value of this record's `splash` field.
	SetSplash(ImageHash) Guild

	// SetNullSplash overwrites the current value of this record's `splash` field
	// with `null`.
	SetNullSplash() Guild

	// DiscoverySplash returns the current value of this record's
	// `discovery_splash` field.
	//
	// The `discovery_splash` field contains the discovery splash hash; only
	// present for guilds with the "DISCOVERABLE" feature.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use DiscoverySplashIsNull to check if the field is null before use.
	DiscoverySplash() ImageHash

	// DiscoverySplashIsNull returns whether this record's `discovery_splash`
	// field is currently null.
	DiscoverySplashIsNull() bool

	// SetDiscoverySplash overwrites the current value of this record's
	// `discovery_splash` field.
	SetDiscoverySplash(ImageHash) Guild

	// SetNullDiscoverySplash overwrites the current value of this record's
	// `discovery_splash` field with `null`.
	SetNullDiscoverySplash() Guild

	// Owner returns the current value of this record's `owner` field.
	//
	// The `owner` field indicates whether the user is the owner of the guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use OwnerIsSet to check if the field is present before use.
	Owner() bool

	// OwnerIsSet returns whether this record's `owner` field is currently
	// present.
	OwnerIsSet() bool

	// SetOwner overwrites the current value of this record's `owner` field.
	SetOwner(bool) Guild

	// UnsetOwner removes this record's `owner` field.
	UnsetOwner() Guild

	// OwnerID returns the current value of this record's `owner_id` field.
	//
	// The `owner_id` field contains the id of the owner.
	OwnerID() Snowflake

	// SetOwnerID overwrites the current value of this record's `owner_id` field.
	SetOwnerID(Snowflake) Guild

	// Permissions returns the current value of this record's `permissions` field.
	//
	// The `permissions` field contains the total permissions for the user in the
	// guild (excludes overrides).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PermissionsIsSet to check if the field is present before use.
	Permissions() Permission

	// PermissionsIsSet returns whether this record's `permissions` field is
	// currently present.
	PermissionsIsSet() bool

	// SetPermissions overwrites the current value of this record's `permissions`
	// field.
	SetPermissions(Permission) Guild

	// UnsetPermissions removes this record's `permissions` field.
	UnsetPermissions() Guild

	// Region returns the current value of this record's `region` field.
	//
	// The `region` field contains the voice region id for the guild.
	Region() string

	// SetRegion overwrites the current value of this record's `region` field.
	SetRegion(string) Guild

	// AFKChannelID returns the current value of this record's `afk_channel_id`
	// field.
	//
	// The `afk_channel_id` field contains the id of afk the channel.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use AFKChannelIDIsNull to check if the field is null before use.
	AFKChannelID() Snowflake

	// AFKChannelIDIsNull returns whether this record's `afk_channel_id` field is
	// currently null.
	AFKChannelIDIsNull() bool

	// SetAFKChannelID overwrites the current value of this record's
	// `afk_channel_id` field.
	SetAFKChannelID(Snowflake) Guild

	// SetNullAFKChannelID overwrites the current value of this record's
	// `afk_channel_id` field with `null`.
	SetNullAFKChannelID() Guild

	// AFKTimeout returns the current value of this record's `afk_timeout` field.
	//
	// The `afk_timeout` field contains the afk timeout in seconds.
	AFKTimeout() uint64

	// SetAFKTimeout overwrites the current value of this record's `afk_timeout`
	// field.
	SetAFKTimeout(uint64) Guild

	// WidgetEnabled returns the current value of this record's `widget_enabled`
	// field.
	//
	// The `widget_enabled` field indicates true if the server widget is enabled.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use WidgetEnabledIsSet to check if the field is present before use.
	WidgetEnabled() bool

	// WidgetEnabledIsSet returns whether this record's `widget_enabled` field is
	// currently present.
	WidgetEnabledIsSet() bool

	// SetWidgetEnabled overwrites the current value of this record's
	// `widget_enabled` field.
	SetWidgetEnabled(bool) Guild

	// UnsetWidgetEnabled removes this record's `widget_enabled` field.
	UnsetWidgetEnabled() Guild

	// WidgetChannelID returns the current value of this record's
	// `widget_channel_id` field.
	//
	// The `widget_channel_id` field contains the the channel id that the widget
	// will generate an invite to, or null if set to no invite.
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use WidgetChannelIDIsReadable to check if the
	// field is present and non-null before use.
	WidgetChannelID() Snowflake

	// WidgetChannelIDIsNull returns whether this record's `widget_channel_id`
	// field is currently null.
	WidgetChannelIDIsNull() bool

	// WidgetChannelIDIsSet returns whether this record's `widget_channel_id`
	// field is currently present.
	WidgetChannelIDIsSet() bool

	// WidgetChannelIDIsReadable returns whether this record's `widget_channel_id`
	// field is currently set and non-null.
	WidgetChannelIDIsReadable() bool

	// SetWidgetChannelID overwrites the current value of this record's
	// `widget_channel_id` field.
	SetWidgetChannelID(Snowflake) Guild

	// SetNullWidgetChannelID overwrites the current value of this record's
	// `widget_channel_id` field with `null`.
	SetNullWidgetChannelID() Guild

	// UnsetWidgetChannelID removes this record's `widget_channel_id` field.
	UnsetWidgetChannelID() Guild

	// VerificationLevel returns the current value of this record's
	// `verification_level` field.
	//
	// The `verification_level` field contains the verification level required for
	// the guild.
	VerificationLevel() VerificationLevel

	// SetVerificationLevel overwrites the current value of this record's
	// `verification_level` field.
	SetVerificationLevel(VerificationLevel) Guild

	// DefaultMessageNotifications returns the current value of this record's
	// `default_message_notifications` field.
	//
	// The `default_message_notifications` field contains the default message
	// notifications level.
	DefaultMessageNotifications() MessageNotificationLevel

	// SetDefaultMessageNotifications overwrites the current value of this
	// record's `default_message_notifications` field.
	SetDefaultMessageNotifications(MessageNotificationLevel) Guild

	// ExplicitContentFilter returns the current value of this record's
	// `explicit_content_filter` field.
	//
	// The `explicit_content_filter` field contains the explicit content filter
	// level.
	ExplicitContentFilter() ExplicitContentFilterLevel

	// SetExplicitContentFilter overwrites the current value of this record's
	// `explicit_content_filter` field.
	SetExplicitContentFilter(ExplicitContentFilterLevel) Guild

	// Roles returns the current value of this record's `roles` field.
	//
	// The `roles` field contains the roles in the guild.
	Roles() []Role

	// SetRoles overwrites the current value of this record's `roles` field.
	SetRoles([]Role) Guild

	// Emojis returns the current value of this record's `emojis` field.
	//
	// The `emojis` field contains the custom guild emojis.
	Emojis() []Emoji

	// SetEmojis overwrites the current value of this record's `emojis` field.
	SetEmojis([]Emoji) Guild

	// Features returns the current value of this record's `features` field.
	//
	// The `features` field contains the enabled guild features.
	Features() []GuildFeature

	// SetFeatures overwrites the current value of this record's `features` field.
	SetFeatures([]GuildFeature) Guild

	// MFALevel returns the current value of this record's `mfa_level` field.
	//
	// The `mfa_level` field contains the required MFA level for the guild.
	MFALevel() MFALevel

	// SetMFALevel overwrites the current value of this record's `mfa_level`
	// field.
	SetMFALevel(MFALevel) Guild

	// ApplicationID returns the current value of this record's `application_id`
	// field.
	//
	// The `application_id` field contains the application id of the guild creator
	// if it is bot-created.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use ApplicationIDIsNull to check if the field is null before use.
	ApplicationID() Snowflake

	// ApplicationIDIsNull returns whether this record's `application_id` field is
	// currently null.
	ApplicationIDIsNull() bool

	// SetApplicationID overwrites the current value of this record's
	// `application_id` field.
	SetApplicationID(Snowflake) Guild

	// SetNullApplicationID overwrites the current value of this record's
	// `application_id` field with `null`.
	SetNullApplicationID() Guild

	// SystemChannelID returns the current value of this record's
	// `system_channel_id` field.
	//
	// The `system_channel_id` field contains the the id of the channel where
	// guild notices such as welcome messages and boost events are posted.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use SystemChannelIDIsNull to check if the field is null before use.
	SystemChannelID() Snowflake

	// SystemChannelIDIsNull returns whether this record's `system_channel_id`
	// field is currently null.
	SystemChannelIDIsNull() bool

	// SetSystemChannelID overwrites the current value of this record's
	// `system_channel_id` field.
	SetSystemChannelID(Snowflake) Guild

	// SetNullSystemChannelID overwrites the current value of this record's
	// `system_channel_id` field with `null`.
	SetNullSystemChannelID() Guild

	// SystemChannelFlags returns the current value of this record's
	// `system_channel_flags` field.
	//
	// The `system_channel_flags` field contains the system channel flags.
	SystemChannelFlags() SystemChannelFlag

	// SetSystemChannelFlags overwrites the current value of this record's
	// `system_channel_flags` field.
	SetSystemChannelFlags(SystemChannelFlag) Guild

	// AddSystemChannelFlag adds the given flag to this record's current
	// `system_channel_flags` value.
	AddSystemChannelFlag(SystemChannelFlag) Guild

	// RemoveSystemChannelFlag removes the given flag to this record's current
	// `system_channel_flags` value.
	RemoveSystemChannelFlag(SystemChannelFlag) Guild

	// SystemChannelFlagsContains returns whether the given flag is already in
	// this record's `system_channel_flags` value.
	SystemChannelFlagsContains(SystemChannelFlag) bool

	// RulesChannelID returns the current value of this record's
	// `rules_channel_id` field.
	//
	// The `rules_channel_id` field contains the the id of the channel where
	// Community guilds can display rules and/or guidelines.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use RulesChannelIDIsNull to check if the field is null before use.
	RulesChannelID() Snowflake

	// RulesChannelIDIsNull returns whether this record's `rules_channel_id` field
	// is currently null.
	RulesChannelIDIsNull() bool

	// SetRulesChannelID overwrites the current value of this record's
	// `rules_channel_id` field.
	SetRulesChannelID(Snowflake) Guild

	// SetNullRulesChannelID overwrites the current value of this record's
	// `rules_channel_id` field with `null`.
	SetNullRulesChannelID() Guild

	// JoinedAt returns the current value of this record's `joined_at` field.
	//
	// The `joined_at` field contains when this guild was joined at.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use JoinedAtIsSet to check if the field is present before use.
	JoinedAt() time.Time

	// JoinedAtIsSet returns whether this record's `joined_at` field is currently
	// present.
	JoinedAtIsSet() bool

	// SetJoinedAt overwrites the current value of this record's `joined_at`
	// field.
	SetJoinedAt(time.Time) Guild

	// UnsetJoinedAt removes this record's `joined_at` field.
	UnsetJoinedAt() Guild

	// Large returns the current value of this record's `large` field.
	//
	// The `large` field indicates if this is considered a large guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use LargeIsSet to check if the field is present before use.
	Large() bool

	// LargeIsSet returns whether this record's `large` field is currently
	// present.
	LargeIsSet() bool

	// SetLarge overwrites the current value of this record's `large` field.
	SetLarge(bool) Guild

	// UnsetLarge removes this record's `large` field.
	UnsetLarge() Guild

	// Unavailable returns the current value of this record's `unavailable` field.
	//
	// The `unavailable` field indicates true if this guild is unavailable due to
	// an outage.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use UnavailableIsSet to check if the field is present before use.
	Unavailable() bool

	// UnavailableIsSet returns whether this record's `unavailable` field is
	// currently present.
	UnavailableIsSet() bool

	// SetUnavailable overwrites the current value of this record's `unavailable`
	// field.
	SetUnavailable(bool) Guild

	// UnsetUnavailable removes this record's `unavailable` field.
	UnsetUnavailable() Guild

	// MemberCount returns the current value of this record's `member_count`
	// field.
	//
	// The `member_count` field contains the total number of members in this
	// guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MemberCountIsSet to check if the field is present before use.
	MemberCount() uint32

	// MemberCountIsSet returns whether this record's `member_count` field is
	// currently present.
	MemberCountIsSet() bool

	// SetMemberCount overwrites the current value of this record's `member_count`
	// field.
	SetMemberCount(uint32) Guild

	// UnsetMemberCount removes this record's `member_count` field.
	UnsetMemberCount() Guild

	// VoiceStates returns the current value of this record's `voice_states`
	// field.
	//
	// The `voice_states` field contains the states of members currently in voice
	// channels; lacks the guild_id key.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use VoiceStatesIsSet to check if the field is present before use.
	VoiceStates() []VoiceState

	// VoiceStatesIsSet returns whether this record's `voice_states` field is
	// currently present.
	VoiceStatesIsSet() bool

	// SetVoiceStates overwrites the current value of this record's `voice_states`
	// field.
	SetVoiceStates([]VoiceState) Guild

	// UnsetVoiceStates removes this record's `voice_states` field.
	UnsetVoiceStates() Guild

	// Members returns the current value of this record's `members` field.
	//
	// The `members` field contains the users in the guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MembersIsSet to check if the field is present before use.
	Members() GuildMember

	// MembersIsSet returns whether this record's `members` field is currently
	// present.
	MembersIsSet() bool

	// SetMembers overwrites the current value of this record's `members` field.
	SetMembers(GuildMember) Guild

	// UnsetMembers removes this record's `members` field.
	UnsetMembers() Guild

	// Channels returns the current value of this record's `channels` field.
	//
	// The `channels` field contains the channels in the guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ChannelsIsSet to check if the field is present before use.
	Channels() []Channel

	// ChannelsIsSet returns whether this record's `channels` field is currently
	// present.
	ChannelsIsSet() bool

	// SetChannels overwrites the current value of this record's `channels` field.
	SetChannels([]Channel) Guild

	// UnsetChannels removes this record's `channels` field.
	UnsetChannels() Guild

	// Presences returns the current value of this record's `presences` field.
	//
	// The `presences` field contains the presences of the members in the guild,
	// will only include non-offline members if the size is greater than large
	// threshold.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PresencesIsSet to check if the field is present before use.
	Presences() []PresenceUpdate

	// PresencesIsSet returns whether this record's `presences` field is currently
	// present.
	PresencesIsSet() bool

	// SetPresences overwrites the current value of this record's `presences`
	// field.
	SetPresences([]PresenceUpdate) Guild

	// UnsetPresences removes this record's `presences` field.
	UnsetPresences() Guild

	// MaxPresences returns the current value of this record's `max_presences`
	// field.
	//
	// The `max_presences` field contains the maximum number of presences for the
	// guild (the default value, currently 25000, is in effect when null is
	// returned).
	//
	// If this method is called on a field that is unset or contains a null value,
	// this method will panic.  Use MaxPresencesIsReadable to check if the field
	// is present and non-null before use.
	MaxPresences() uint32

	// MaxPresencesIsNull returns whether this record's `max_presences` field is
	// currently null.
	MaxPresencesIsNull() bool

	// MaxPresencesIsSet returns whether this record's `max_presences` field is
	// currently present.
	MaxPresencesIsSet() bool

	// MaxPresencesIsReadable returns whether this record's `max_presences` field
	// is currently set
	// and non-null.
	MaxPresencesIsReadable() bool

	// SetMaxPresences overwrites the current value of this record's
	// `max_presences` field.
	SetMaxPresences(uint32) Guild

	// SetNullMaxPresences overwrites the current value of this record's
	// `max_presences` field with `null`.
	SetNullMaxPresences() Guild

	// UnsetMaxPresences removes this record's `max_presences` field.
	UnsetMaxPresences() Guild

	// MaxMembers returns the current value of this record's `max_members` field.
	//
	// The `max_members` field contains the the maximum number of members for the
	// guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MaxMembersIsSet to check if the field is present before use.
	MaxMembers() uint32

	// MaxMembersIsSet returns whether this record's `max_members` field is
	// currently present.
	MaxMembersIsSet() bool

	// SetMaxMembers overwrites the current value of this record's `max_members`
	// field.
	SetMaxMembers(uint32) Guild

	// UnsetMaxMembers removes this record's `max_members` field.
	UnsetMaxMembers() Guild

	// VanityURLCode returns the current value of this record's `vanity_url_code`
	// field.
	//
	// The `vanity_url_code` field contains the the vanity url code for the guild.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use VanityURLCodeIsNull to check if the field is null before use.
	VanityURLCode() string

	// VanityURLCodeIsNull returns whether this record's `vanity_url_code` field
	// is currently null.
	VanityURLCodeIsNull() bool

	// SetVanityURLCode overwrites the current value of this record's
	// `vanity_url_code` field.
	SetVanityURLCode(string) Guild

	// SetNullVanityURLCode overwrites the current value of this record's
	// `vanity_url_code` field with `null`.
	SetNullVanityURLCode() Guild

	// Description returns the current value of this record's `description` field.
	//
	// The `description` field contains the the description for the guild, if the
	// guild is discoverable.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use DescriptionIsNull to check if the field is null before use.
	Description() string

	// DescriptionIsNull returns whether this record's `description` field is
	// currently null.
	DescriptionIsNull() bool

	// SetDescription overwrites the current value of this record's `description`
	// field.
	SetDescription(string) Guild

	// SetNullDescription overwrites the current value of this record's
	// `description` field with `null`.
	SetNullDescription() Guild

	// Banner returns the current value of this record's `banner` field.
	//
	// The `banner` field contains the banner hash.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use BannerIsNull to check if the field is null before use.
	Banner() ImageHash

	// BannerIsNull returns whether this record's `banner` field is currently
	// null.
	BannerIsNull() bool

	// SetBanner overwrites the current value of this record's `banner` field.
	SetBanner(ImageHash) Guild

	// SetNullBanner overwrites the current value of this record's `banner` field
	// with `null`.
	SetNullBanner() Guild

	// PremiumTier returns the current value of this record's `premium_tier`
	// field.
	//
	// The `premium_tier` field contains the premium tier (Server Boost level).
	PremiumTier() PremiumTier

	// SetPremiumTier overwrites the current value of this record's `premium_tier`
	// field.
	SetPremiumTier(PremiumTier) Guild

	// PremiumSubscriptionCount returns the current value of this record's
	// `premium_subscription_count` field.
	//
	// The `premium_subscription_count` field contains the the number of boosts
	// this guild currently has.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PremiumSubscriptionCountIsSet to check if the field is present before
	// use.
	PremiumSubscriptionCount() uint16

	// PremiumSubscriptionCountIsSet returns whether this record's
	// `premium_subscription_count` field is currently present.
	PremiumSubscriptionCountIsSet() bool

	// SetPremiumSubscriptionCount overwrites the current value of this record's
	// `premium_subscription_count` field.
	SetPremiumSubscriptionCount(uint16) Guild

	// UnsetPremiumSubscriptionCount removes this record's
	// `premium_subscription_count` field.
	UnsetPremiumSubscriptionCount() Guild

	// PreferredLocale returns the current value of this record's
	// `preferred_locale` field.
	//
	// The `preferred_locale` field contains the the preferred locale of a
	// Community guild; used in server discovery and notices from Discord;
	// defaults to "en-US".
	PreferredLocale() string

	// SetPreferredLocale overwrites the current value of this record's
	// `preferred_locale` field.
	SetPreferredLocale(string) Guild

	// PublicUpdatesChannelID returns the current value of this record's
	// `public_updates_channel_id` field.
	//
	// The `public_updates_channel_id` field contains the id of the channel
	// where admins and moderators of Community guilds receive notices from
	// Discord.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use PublicUpdatesChannelIDIsNull to check if the field is null
	// before use.
	PublicUpdatesChannelID() Snowflake

	// PublicUpdatesChannelIDIsNull returns whether this record's
	// `public_updates_channel_id` field is currently null.
	PublicUpdatesChannelIDIsNull() bool

	// SetPublicUpdatesChannelID overwrites the current value of this record's
	// `public_updates_channel_id` field.
	SetPublicUpdatesChannelID(Snowflake) Guild

	// SetNullPublicUpdatesChannelID overwrites the current value of this record's
	// `public_updates_channel_id` field with `null`.
	SetNullPublicUpdatesChannelID() Guild

	// MaxVideoChannelUsers returns the current value of this record's
	// `max_video_channel_users` field.
	//
	// The `max_video_channel_users` field contains the maximum amount of
	// users in a video channel.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MaxVideoChannelUsersIsSet to check if the field is present before use.
	MaxVideoChannelUsers() uint16

	// MaxVideoChannelUsersIsSet returns whether this record's
	// `max_video_channel_users` field is currently present.
	MaxVideoChannelUsersIsSet() bool

	// SetMaxVideoChannelUsers overwrites the current value of this record's
	// `max_video_channel_users` field.
	SetMaxVideoChannelUsers(uint16) Guild

	// UnsetMaxVideoChannelUsers removes this record's `max_video_channel_users`
	// field.
	UnsetMaxVideoChannelUsers() Guild

	// ApproximateMemberCount returns the current value of this record's
	// `approximate_member_count` field.
	//
	// The `approximate_member_count` field contains the approximate number of
	// members in this guild, returned from the GET /guild/<id> endpoint when
	// with_counts is true.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApproximateMemberCountIsSet to check if the field is present before
	// use.
	ApproximateMemberCount() uint32

	// ApproximateMemberCountIsSet returns whether this record's
	// `approximate_member_count` field is currently present.
	ApproximateMemberCountIsSet() bool

	// SetApproximateMemberCount overwrites the current value of this record's
	// `approximate_member_count` field.
	SetApproximateMemberCount(uint32) Guild

	// UnsetApproximateMemberCount removes this record's
	// `approximate_member_count` field.
	UnsetApproximateMemberCount() Guild

	// ApproximatePresenceCount returns the current value of this record's
	// `approximate_presence_count` field.
	//
	// The `approximate_presence_count` field contains the approximate number of
	// non-offline members in this guild, returned from the GET /guild/<id>
	// endpoint when with_counts is true.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApproximatePresenceCountIsSet to check if the field is present before
	// use.
	ApproximatePresenceCount() uint32

	// ApproximatePresenceCountIsSet returns whether this record's
	// `approximate_presence_count` field is currently present.
	ApproximatePresenceCountIsSet() bool

	// SetApproximatePresenceCount overwrites the current value of this record's
	// `approximate_presence_count` field.
	SetApproximatePresenceCount(uint32) Guild

	// UnsetApproximatePresenceCount removes this record's
	// `approximate_presence_count` field.
	UnsetApproximatePresenceCount() Guild
}

type GuildFeature

type GuildFeature string
const (
	// Guild has access to set an invite splash background
	GuildFeatureInviteSplash GuildFeature = "INVITE_SPLASH"

	// Guild has access to set 384kbps bitrate in voice (previously VIP voice servers)
	GuildFeatureVIPRegions GuildFeature = "VIP_REGIONS"

	// Guild has access to set a vanity URL
	GuildFeatureVanityURL GuildFeature = "VANITY_URL"

	// Guild is verified
	GuildFeatureVerified GuildFeature = "VERIFIED"

	// Guild is partnered
	GuildFeaturePartnered GuildFeature = "PARTNERED"

	// Guild can enable welcome screen and discovery, and receives community updates
	GuildFeatureCommunity GuildFeature = "COMMUNITY"

	// Guild has access to use commerce features (i.e. create store channels)
	GuildFeatureCommerce GuildFeature = "COMMERCE"

	// Guild has access to create news channels
	GuildFeatureNews GuildFeature = "NEWS"

	// Guild is lurkable and able to be discovered in the directory
	GuildFeatureDiscoverable GuildFeature = "DISCOVERABLE"

	// Guild is able to be featured in the directory
	GuildFeatureFeaturable GuildFeature = "FEATURABLE"

	// Guild has access to set an animated guild icon
	GuildFeatureAnimatedIcon GuildFeature = "ANIMATED_ICON"

	// Guild has access to set a guild banner image
	GuildFeatureBanner GuildFeature = "BANNER"

	// Guild has enabled the welcome screen)
	GuildFeatureWelcomeScreenEnabled GuildFeature = "WELCOME_SCREEN_ENABLED"
)

func (GuildFeature) IsValid

func (f GuildFeature) IsValid() bool

func (GuildFeature) JSONSize

func (f GuildFeature) JSONSize() int

func (GuildFeature) Validate

func (f GuildFeature) Validate() error

type GuildIcon

type GuildIcon interface {
	dmeta.Validatable
	ImageData
}

type GuildMember

type GuildMember interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// the user this guild member represents
	// The field user won't be included in the member object attached to MESSAGE_CREATE and MESSAGE_UPDATE gateway events.
	User() User
	UserIsSet() bool
	SetUser(User) GuildMember
	UnsetUser() GuildMember

	// this users guild nickname
	Nick() UserNickname
	NickIsNull() bool
	SetNick(UserNickname) GuildMember
	SetNullNick() GuildMember

	// array of role object ids
	Roles() []Snowflake
	SetRoles(roleIds []Snowflake) GuildMember

	// when the user joined the guild
	JoinedAt() time.Time
	SetJoinedAt(time.Time) GuildMember

	// when the user started boosting the guild
	PremiumSince() time.Time
	PremiumSinceIsSet() bool
	PremiumSinceIsNull() bool
	SetPremiumSince(time.Time) GuildMember
	SetNullPremiumSince() GuildMember
	UnsetPremiumSince() GuildMember

	// whether the user is deafened in voice channels
	Deaf() bool
	SetDeaf(bool) GuildMember

	// whether the user is muted in voice channels
	Mute() bool
	SetMute(bool) GuildMember
}

func NewGuildMember

func NewGuildMember(validate bool) GuildMember

type GuildName

type GuildName string

func (GuildName) IsValid

func (n GuildName) IsValid() bool

func (GuildName) Validate

func (n GuildName) Validate() error

type GuildPreview

type GuildPreview interface {
	// guild id
	ID() Snowflake
	SetID(id Snowflake) GuildPreview

	// guild name (2-100 characters)
	Name() GuildName
	SetName(name GuildName) GuildPreview

	// icon hash
	Icon() ImageHash
	IconIsNull() bool
	SetIcon(hash ImageHash) GuildPreview
	SetNullIcon() GuildPreview

	// splash hash
	Splash() ImageHash
	SplashIsNull() bool
	SetSplash(hash ImageHash) GuildPreview
	SetNullSplash() GuildPreview

	// splash hash
	DiscoverySplash() ImageHash
	DiscoverySplashIsNull() bool
	SetDiscoverySplash(hash ImageHash) GuildPreview
	SetNullDiscoverySplash() GuildPreview

	// custom guild emojis
	Emojis() []Emoji
	SetEmojis([]Emoji) GuildPreview

	// enabled guild features
	Features() []GuildFeature
	SetFeatures([]GuildFeature) GuildPreview

	// approximate number of members in this guild
	ApproximateMemberCount() uint32
	SetApproximateMemberCount(count uint32) GuildPreview

	// approximate number of online members in this guild
	ApproximatePresenceCount() uint32
	SetApproximatePresenceCount(count uint32) GuildPreview

	// the description for the guild
	Description() string
	DescriptionIsNull() bool
	SetDescription(desc string) GuildPreview
	SetNullDescription() GuildPreview
}

type ImageData

type ImageData interface {
	json.Marshaler
	json.Unmarshaler

	// String renders the image data as a base64 encoded image data string.
	String() (string, error)

	// Format returns the current image format.
	Format() ImageFormat

	// Width returns the width of the current image.
	Width() uint16

	// Height returns the height of the current image.
	Height() uint16

	// AspectRatio returns the aspect ration of the current image.
	AspectRatio() lib.AspectRatio

	// Close attempts to close the underlying data source (if it is closable).
	//
	// If the underlying data source is not closable then this method does
	// nothing.
	Close() error
}

type ImageFormat

type ImageFormat string
const (
	ImageFormatGIF ImageFormat = "image/gif"
	ImageFormatJPG ImageFormat = "image/jpeg"
	ImageFormatPNG ImageFormat = "image/png"
)

func (ImageFormat) Is

func (f ImageFormat) Is(tp string) bool

Is returns whether the given string is a valid representation of the current format.

For example, an input string of "jpg", "jpeg", or "image/jpeg" would return true for the value ImageFormatJPG

func (ImageFormat) IsValid

func (f ImageFormat) IsValid() bool

func (ImageFormat) Validate

func (f ImageFormat) Validate() error

type ImageHash

type ImageHash string

func DecodeImageHash

func DecodeImageHash(dec *gojay.Decoder) (*ImageHash, error)

func (*ImageHash) AppendJSONBytes

func (i *ImageHash) AppendJSONBytes(writer io.Writer) (err error)

func (*ImageHash) IsNil

func (i *ImageHash) IsNil() bool

func (*ImageHash) JSONSize

func (i *ImageHash) JSONSize() uint32

func (ImageHash) MarshalJSON

func (i ImageHash) MarshalJSON() (buf []byte, err error)

func (*ImageHash) ToJSONBytes

func (i *ImageHash) ToJSONBytes() (buf []byte)

func (*ImageHash) UnmarshalJSON

func (i *ImageHash) UnmarshalJSON(bytes []byte) error

type Integration

type Integration interface {
	// integration id
	ID() Snowflake
	SetID(id Snowflake)

	// integration name
	Name() string
	SetName(name string) Integration

	// integration type (twitch, youtube, or discord)
	Type() string
	SetType(val string) Integration

	// is this integration enabled
	Enabled() bool
	SetEnabled(bool) Integration

	// is this integration syncing
	Syncing() bool
	SetSyncing(bool) Integration

	// id that this integration uses for "subscribers", or the guild id for discord integrations
	RoleID() Snowflake
	SetRoleID(id Snowflake) Integration

	// whether emoticons should be synced for this integration (twitch only currently)
	EnableEmoticons() bool
	EnableEmoticonsIsSet() bool
	SetEnableEmoticons(bool) Integration
	UnsetEnableEmoticons() Integration

	// the behavior of expiring subscribers
	ExpireBehavior() integration.ExpireBehavior
	SetExpireBehavior(integration.ExpireBehavior) Integration

	// the grace period (in days) before expiring subscribers
	ExpireGracePeriod() uint32
	SetExpireGracePeriod(days uint32) Integration

	// user for this integration
	User() User
	UserIsSet() bool
	SetUser(User) Integration
	UnsetUser() Integration

	// integration account information
	Account() integration.Account
	SetAccount(integration.Account) Integration

	// when this integration was last synced
	SyncedAt() time.Time
	SetSyncedAt(time.Time) Integration

	// how many subscribers this integration has (0 for discord integrations)
	SubscriberCount() uint32
	SetSubscriberCount(count uint32) Integration

	// has this integration been revoked
	Revoked() bool
	SetRevoked(bool) Integration

	// The bot/OAuth2 application for discord integrations
	Application() UserApplication
	ApplicationIsSet() bool
	SetApplication(UserApplication) Integration
	UnsetApplication() Integration
}

Integration TODO: Document me

type Invite

type Invite interface {
	// Code returns the current value of this record's `code` field.
	//
	// The `code` field contains the invite code (unique ID).
	Code() string

	// SetCode overwrites the current value of this record's `code` field.
	SetCode(string) Invite

	// Guild returns the current value of this record's `guild` field.
	//
	// The `guild` field contains the guild this invite is for.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIsSet to check if the field is present before use.
	Guild() Guild

	// GuildIsSet returns whether this record's `guild` field is currently
	// present.
	GuildIsSet() bool

	// SetGuild overwrites the current value of this record's `guild` field.
	SetGuild(Guild) Invite

	// UnsetGuild removes this record's `guild` field.
	UnsetGuild() Invite

	// Channel returns the current value of this record's `channel` field.
	//
	// The `channel` field contains the channel this invite is for.
	Channel() Channel

	// SetChannel overwrites the current value of this record's `channel` field.
	SetChannel(Channel) Invite

	// Inviter returns the current value of this record's `inviter` field.
	//
	// The `inviter` field contains the user who created the invite.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use InviterIsSet to check if the field is present before use.
	Inviter() User

	// InviterIsSet returns whether this record's `inviter` field is currently
	// present.
	InviterIsSet() bool

	// SetInviter overwrites the current value of this record's `inviter` field.
	SetInviter(User) Invite

	// UnsetInviter removes this record's `inviter` field.
	UnsetInviter() Invite

	// TargetUser returns the current value of this record's `target_user` field.
	//
	// The `target_user` field contains the target user for this invite.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TargetUserIsSet to check if the field is present before use.
	TargetUser() User

	// TargetUserIsSet returns whether this record's `target_user` field is
	// currently present.
	TargetUserIsSet() bool

	// SetTargetUser overwrites the current value of this record's `target_user`
	// field.
	SetTargetUser(User) Invite

	// UnsetTargetUser removes this record's `target_user` field.
	UnsetTargetUser() Invite

	// TargetUserType returns the current value of this record's
	// `target_user_type` field.
	//
	// The `target_user_type` field contains the type of user target for this
	// invite.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TargetUserTypeIsSet to check if the field is present before use.
	TargetUserType() InviteTargetUserType

	// TargetUserTypeIsSet returns whether this record's `target_user_type` field
	// is currently present.
	TargetUserTypeIsSet() bool

	// SetTargetUserType overwrites the current value of this record's
	// `target_user_type` field.
	SetTargetUserType(InviteTargetUserType) Invite

	// UnsetTargetUserType removes this record's `target_user_type` field.
	UnsetTargetUserType() Invite

	// ApproximatePresenceCount returns the current value of this record's
	// `approximate_presence_count` field.
	//
	// The `approximate_presence_count` field contains the approximate count of
	// online members (only present when target_user is set).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApproximatePresenceCountIsSet to check if the field is present before
	// use.
	ApproximatePresenceCount() uint32

	// ApproximatePresenceCountIsSet returns whether this record's
	// `approximate_presence_count` field is currently present.
	ApproximatePresenceCountIsSet() bool

	// SetApproximatePresenceCount overwrites the current value of this record's
	// `approximate_presence_count` field.
	SetApproximatePresenceCount(uint32) Invite

	// UnsetApproximatePresenceCount removes this record's
	// `approximate_presence_count` field.
	UnsetApproximatePresenceCount() Invite

	// ApproximateMemberCount returns the current value of this record's
	// `approximate_member_count` field.
	//
	// The `approximate_member_count` field contains the approximate count of
	// total members.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApproximateMemberCountIsSet to check if the field is present before
	// use.
	ApproximateMemberCount() uint32

	// ApproximateMemberCountIsSet returns whether this record's
	// `approximate_member_count` field is currently present.
	ApproximateMemberCountIsSet() bool

	// SetApproximateMemberCount overwrites the current value of this record's
	// `approximate_member_count` field.
	SetApproximateMemberCount(uint32) Invite

	// UnsetApproximateMemberCount removes this record's
	// `approximate_member_count` field.
	UnsetApproximateMemberCount() Invite
}

type InviteTargetUserType

type InviteTargetUserType uint8
const (
	TargetUserTypeStream InviteTargetUserType = 1
)

func (InviteTargetUserType) IsValid

func (t InviteTargetUserType) IsValid() bool

func (InviteTargetUserType) Validate

func (t InviteTargetUserType) Validate() error

type MFALevel

type MFALevel uint8
const (
	MFALevelNone MFALevel = iota
	MFALevelElevated
)

func (MFALevel) IsValid

func (m MFALevel) IsValid() bool

func (MFALevel) Validate

func (m MFALevel) Validate() error

type Message

type Message interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	lib.Sized
	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of the message.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) Message

	// ChannelID returns the current value of this record's `channel_id` field.
	//
	// The `channel_id` field contains the id of the channel the message was sent
	// in.
	ChannelID() Snowflake

	// SetChannelID overwrites the current value of this record's `channel_id`
	// field.
	SetChannelID(Snowflake) Message

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the id of the guild the message was sent in.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIDIsSet to check if the field is present before use.
	GuildID() Snowflake

	// GuildIDIsSet returns whether this record's `guild_id` field is currently
	// present.
	GuildIDIsSet() bool

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) Message

	// UnsetGuildID removes this record's `guild_id` field.
	UnsetGuildID() Message

	// Author returns the current value of this record's `author` field.
	//
	// The `author` field contains the author of this message (not guaranteed to
	// be a valid user).
	//
	// The author object follows the structure of the user object, but is only a
	// valid user in the case where the message is generated by a user or bot
	// user. If the message is generated by a webhook, the author object
	// corresponds to the webhook's id, username, and avatar.
	//
	// You can tell if a message is generated by a webhook by checking for the
	// webhook_id on the message object.
	Author() User

	// SetAuthor overwrites the current value of this record's `author` field.
	SetAuthor(User) Message

	// Member returns the current value of this record's `member` field.
	//
	// The `member` field contains the member properties for this message's
	// author.
	//
	// The member object exists in MESSAGE_CREATE and MESSAGE_UPDATE events from
	// text-based guild channels. This allows bots to obtain real-time member data
	// without requiring bots to store member state in memory.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MemberIsSet to check if the field is present before use.
	Member() GuildMember

	// MemberIsSet returns whether this record's `member` field is currently
	// present.
	MemberIsSet() bool

	// SetMember overwrites the current value of this record's `member` field.
	SetMember(GuildMember) Message

	// UnsetMember removes this record's `member` field.
	UnsetMember() Message

	// Content returns the current value of this record's `content` field.
	//
	// The `content` field contains the contents of the message.
	Content() MessageContent

	// SetContent overwrites the current value of this record's `content` field.
	SetContent(MessageContent) Message

	// Timestamp returns the current value of this record's `timestamp` field.
	//
	// The `timestamp` field contains the when this message was sent.
	Timestamp() time.Time

	// SetTimestamp overwrites the current value of this record's `timestamp`
	// field.
	SetTimestamp(time.Time) Message

	// EditedTimestamp returns the current value of this record's
	// `edited_timestamp` field.
	//
	// The `edited_timestamp` field contains the when this message was edited (or
	// null if never).
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use EditedTimestampIsNull to check if the field is null before use.
	EditedTimestamp() time.Time

	// EditedTimestampIsNull returns whether this record's `edited_timestamp`
	// field is currently null.
	EditedTimestampIsNull() bool

	// SetEditedTimestamp overwrites the current value of this record's
	// `edited_timestamp` field.
	SetEditedTimestamp(time.Time) Message

	// SetNullEditedTimestamp overwrites the current value of this record's
	// `edited_timestamp` field with `null`.
	SetNullEditedTimestamp() Message

	// TTS returns the current value of this record's `tts` field.
	//
	// The `tts` field indicates whether this was a TTS message.
	TTS() bool

	// SetTTS overwrites the current value of this record's `tts` field.
	SetTTS(bool) Message

	// MentionEveryone returns the current value of this record's
	// `mention_everyone` field.
	//
	// The `mention_everyone` field indicates whether this message mentions
	// everyone.
	MentionEveryone() bool

	// SetMentionEveryone overwrites the current value of this record's
	// `mention_everyone` field.
	SetMentionEveryone(bool) Message

	// Mentions returns the current value of this record's `mentions` field.
	//
	// The `mentions` field contains the users specifically mentioned in the
	// message.
	//
	// The user objects in the mentions array will only have the partial member
	// field present in MESSAGE_CREATE and MESSAGE_UPDATE events from text-based
	// guild channels.
	Mentions() []User

	// SetMentions overwrites the current value of this record's `mentions` field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetMentions([]User) Message

	// MentionRoles returns the current value of this record's `mention_roles`
	// field.
	//
	// The `mention_roles` field contains the roles specifically mentioned in this
	// message.
	MentionRoles() []Snowflake

	// SetMentionRoles overwrites the current value of this record's
	// `mention_roles` field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetMentionRoles([]Snowflake) Message

	// MentionChannels returns the current value of this record's
	// `mention_channels` field.
	//
	// The `mention_channels` field contains the channels specifically mentioned
	// in this message.
	//
	// Not all channel mentions in a message will appear in mention_channels.
	// Only textual channels that are visible to everyone in a lurkable guild will
	// ever be included. Only crossposted messages (via Channel Following)
	// currently include mention_channels at all.
	//
	// If no mentions in the message meet these requirements, this field will not
	// be sent.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MentionChannelsIsSet to check if the field is present before use.
	MentionChannels() []ChannelMention

	// MentionChannelsIsSet returns whether this record's `mention_channels` field
	// is currently present.
	MentionChannelsIsSet() bool

	// SetMentionChannels overwrites the current value of this record's
	// `mention_channels` field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetMentionChannels([]ChannelMention) Message

	// UnsetMentionChannels removes this record's `mention_channels` field.
	UnsetMentionChannels() Message

	// Attachments returns the current value of this record's `attachments` field.
	//
	// The `attachments` field contains any attached files.
	Attachments() []MessageAttachment

	// SetAttachments overwrites the current value of this record's `attachments`
	// field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetAttachments([]MessageAttachment) Message

	// Embeds returns the current value of this record's `embeds` field.
	//
	// The `embeds` field contains any embedded content.
	Embeds() []MessageEmbed

	// SetEmbeds overwrites the current value of this record's `embeds` field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetEmbeds([]MessageEmbed) Message

	// Reactions returns the current value of this record's `reactions` field.
	//
	// The `reactions` field contains any reactions to the message.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ReactionsIsSet to check if the field is present before use.
	Reactions() []MessageReaction

	// ReactionsIsSet returns whether this record's `reactions` field is currently
	// present.
	ReactionsIsSet() bool

	// SetReactions overwrites the current value of this record's `reactions`
	// field.
	//
	// Note: Do to Go's handling of nil slices, passing this method a nil value
	// will result in the json form of this type having an empty slice.
	SetReactions([]MessageReaction) Message

	// UnsetReactions removes this record's `reactions` field.
	UnsetReactions() Message

	// Nonce returns the current value of this record's `nonce` field.
	//
	// The `nonce` field is used for validating a message was sent.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use NonceIsSet to check if the field is present before use.
	Nonce() Nonce

	// NonceIsSet returns whether this record's `nonce` field is currently present.
	NonceIsSet() bool

	// SetNonce overwrites the current value of this record's `nonce` field.
	SetNonce(Nonce) Message

	// UnsetNonce removes this record's `nonce` field.
	UnsetNonce() Message

	// Pinned returns the current value of this record's `pinned` field.
	//
	// The `pinned` field indicates whether this message is pinned.
	Pinned() bool

	// SetPinned overwrites the current value of this record's `pinned` field.
	SetPinned(bool) Message

	// WebhookID returns the current value of this record's `webhook_id` field.
	//
	// The `webhook_id` field contains the webhook's id if the message is
	// generated by a webhook.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use WebhookIDIsSet to check if the field is present before use.
	WebhookID() Snowflake

	// WebhookIDIsSet returns whether this record's `webhook_id` field is
	// currently present.
	WebhookIDIsSet() bool

	// SetWebhookID overwrites the current value of this record's `webhook_id`
	// field.
	SetWebhookID(Snowflake) Message

	// UnsetWebhookID removes this record's `webhook_id` field.
	UnsetWebhookID() Message

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of message.
	Type() MessageType

	// SetType overwrites the current value of this record's `type` field.
	SetType(MessageType) Message

	// Activity returns the current value of this record's `activity` field.
	//
	// The `activity` field is sent with Rich Presence-related chat embeds.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ActivityIsSet to check if the field is present before use.
	Activity() MessageActivity

	// ActivityIsSet returns whether this record's `activity` field is currently
	// present.
	ActivityIsSet() bool

	// SetActivity overwrites the current value of this record's `activity` field.
	SetActivity(MessageActivity) Message

	// UnsetActivity removes this record's `activity` field.
	UnsetActivity() Message

	// Application returns the current value of this record's `application` field.
	//
	// The `application` field is sent with Rich Presence-related chat embeds.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ApplicationIsSet to check if the field is present before use.
	Application() MessageApplication

	// ApplicationIsSet returns whether this record's `application` field is
	// currently present.
	ApplicationIsSet() bool

	// SetApplication overwrites the current value of this record's `application`
	// field.
	SetApplication(MessageApplication) Message

	// UnsetApplication removes this record's `application` field.
	UnsetApplication() Message

	// MessageReference returns the current value of this record's
	// `message_reference` field.
	//
	// The `message_reference` field contains the reference data sent with
	// crossposted messages.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MessageReferenceIsSet to check if the field is present before use.
	MessageReference() MessageRef

	// MessageReferenceIsSet returns whether this record's `message_reference`
	// field is currently present.
	MessageReferenceIsSet() bool

	// SetMessageReference overwrites the current value of this record's
	// `message_reference` field.
	SetMessageReference(MessageRef) Message

	// UnsetMessageReference removes this record's `message_reference` field.
	UnsetMessageReference() Message

	// Flags returns the current value of this record's `flags` field.
	//
	// The `flags` field contains the message flags combined as a bitfield.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use FlagsIsSet to check if the field is present before use.
	Flags() MessageFlag

	// FlagsIsSet returns whether this record's `flags` field is currently
	// present.
	FlagsIsSet() bool

	// SetFlags overwrites the current value of this record's `flags` field.
	SetFlags(MessageFlag) Message

	// UnsetFlags removes this record's `flags` field.
	UnsetFlags() Message

	AddFlag(MessageFlag) Message

	RemoveFlag(MessageFlag) Message

	FlagsContains(MessageFlag) bool
}

Message represents a message sent in a channel within Discord.

type MessageActivity

type MessageActivity interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of message activity.
	Type() MessageActivityType

	// SetType overwrites the current value of this record's `type` field.
	SetType(MessageActivityType) MessageActivity

	// PartyID returns the current value of this record's `party_id` field.
	//
	// The `party_id` field contains the party_id from a Rich Presence event.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use PartyIDIsSet to check if the field is present before use.
	PartyID() string

	// PartyIDIsSet returns whether this record's `party_id` field is currently present.
	PartyIDIsSet() bool

	// SetPartyID overwrites the current value of this record's `party_id` field.
	SetPartyID(string) MessageActivity

	// UnsetPartyID removes this record's `party_id` field.
	UnsetPartyID() MessageActivity
}

MessageActivity TODO: Document me

type MessageActivityType

type MessageActivityType uint8

ActivityType TODO: Document me

const (
	MsgActivityTypeJoin        MessageActivityType = 1
	MsgActivityTypeSpectate    MessageActivityType = 2
	MsgActivityTypeListen      MessageActivityType = 3
	MsgActivityTypeJoinRequest MessageActivityType = 5
)

func (MessageActivityType) IsValid

func (a MessageActivityType) IsValid() bool

func (MessageActivityType) Validate

func (a MessageActivityType) Validate() error

type MessageApplication

type MessageApplication interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of the application.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) MessageApplication

	// CoverImage returns the current value of this record's `cover_image` field.
	//
	// The `cover_image` field contains the id of the embed's image asset.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use CoverImageIsSet to check if the field is present before use.
	CoverImage() string

	// CoverImageIsSet returns whether this record's `cover_image` field is
	// currently present.
	CoverImageIsSet() bool

	// SetCoverImage overwrites the current value of this record's `cover_image`
	// field.
	SetCoverImage(string) MessageApplication

	// UnsetCoverImage removes this record's `cover_image` field.
	UnsetCoverImage() MessageApplication

	// Description returns the current value of this record's `description` field.
	//
	// The `description` field contains the application's description.
	Description() string

	// SetDescription overwrites the current value of this record's `description`
	// field.
	SetDescription(string) MessageApplication

	// Icon returns the current value of this record's `icon` field.
	//
	// The `icon` field contains the id of the application's icon.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use IconIsNull to check if the field is null before use.
	Icon() string

	// IconIsNull returns whether this record's `icon` field is currently null.
	IconIsNull() bool

	// SetIcon overwrites the current value of this record's `icon` field.
	SetIcon(string) MessageApplication

	// SetNullIcon overwrites the current value of this record's `icon` field
	// with `null`.
	SetNullIcon() MessageApplication

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the name of the application.
	Name() string

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) MessageApplication
}

type MessageAttachment

type MessageAttachment interface {
	dmeta.ObjectField

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the attachment's id.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) MessageAttachment

	// Filename returns the current value of this record's `filename` field.
	//
	// The `filename` field contains the name of the file attached.
	Filename() string

	// SetFilename overwrites the current value of this record's `filename` field.
	SetFilename(string) MessageAttachment

	// Size returns the current value of this record's `size` field.
	//
	// The `size` field contains the size of the file in bytes.
	Size() uint32

	// SetSize overwrites the current value of this record's `size` field.
	SetSize(uint64) MessageAttachment

	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the source url of the file.
	URL() string

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) MessageAttachment

	// ProxyURL returns the current value of this record's `proxy_url` field.
	//
	// The `proxy_url` field contains a proxied url of the file.
	ProxyURL() string

	// SetProxyURL overwrites the current value of this record's `proxy_url`
	// field.
	SetProxyURL(string) MessageAttachment

	// Height returns the current value of this record's `height` field.
	//
	// The `height` field contains the height of the file (if image).
	Height() uint16

	// SetHeight overwrites the current value of this record's `height` field.
	SetHeight(uint16) MessageAttachment

	// Width returns the current value of this record's `width` field.
	//
	// The `width` field contains the width of the file (if image).
	Width() uint16

	// SetWidth overwrites the current value of this record's `width` field.
	SetWidth(uint16) MessageAttachment
}

type MessageContent

type MessageContent string

func (*MessageContent) AppendJSONBytes

func (c *MessageContent) AppendJSONBytes(writer io.Writer) (err error)

func (*MessageContent) IsNil

func (c *MessageContent) IsNil() bool

func (MessageContent) IsValid

func (c MessageContent) IsValid() bool

func (MessageContent) JSONSize

func (c MessageContent) JSONSize() uint32

func (MessageContent) MarshalJSON

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

func (MessageContent) ToJSONBytes

func (c MessageContent) ToJSONBytes() (buf []byte)

func (*MessageContent) UnmarshalJSON

func (c *MessageContent) UnmarshalJSON(bytes []byte) error

func (MessageContent) Validate

func (c MessageContent) Validate() error

type MessageEmbed

type MessageEmbed interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Title returns the current value of this record's `title` field.
	//
	// The `title` field contains the title of this embed.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TitleIsSet to check if the field is present before use.
	Title() string

	// TitleIsSet returns whether this record's `title` field is currently
	// present.
	TitleIsSet() bool

	// SetTitle overwrites the current value of this record's `title` field.
	SetTitle(string) MessageEmbed

	// UnsetTitle removes this record's `title` field.
	UnsetTitle() MessageEmbed

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of this embed (always "rich" for webhook
	// embeds).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TypeIsSet to check if the field is present before use.
	Type() EmbedType

	// TypeIsSet returns whether this record's `type` field is currently present.
	TypeIsSet() bool

	// SetType overwrites the current value of this record's `type` field.
	SetType(EmbedType) MessageEmbed

	// UnsetType removes this record's `type` field.
	UnsetType() MessageEmbed

	// Description returns the current value of this record's `description` field.
	//
	// The `description` field contains the description of this embed.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use DescriptionIsSet to check if the field is present before use.
	Description() string

	// DescriptionIsSet returns whether this record's `description` field is
	// currently present.
	DescriptionIsSet() bool

	// SetDescription overwrites the current value of this record's `description`
	// field.
	SetDescription(string) MessageEmbed

	// UnsetDescription removes this record's `description` field.
	UnsetDescription() MessageEmbed

	// URL returns the current value of this record's `url` field.
	//
	// The `url` field contains the url of this embed.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use URLIsSet to check if the field is present before use.
	URL() string

	// URLIsSet returns whether this record's `url` field is currently present.
	URLIsSet() bool

	// SetURL overwrites the current value of this record's `url` field.
	SetURL(string) MessageEmbed

	// UnsetURL removes this record's `url` field.
	UnsetURL() MessageEmbed

	// Timestamp returns the current value of this record's `timestamp` field.
	//
	// The `timestamp` field contains the timestamp of this embed's content.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TimestampIsSet to check if the field is present before use.
	Timestamp() time.Time

	// TimestampIsSet returns whether this record's `timestamp` field is currently
	// present.
	TimestampIsSet() bool

	// SetTimestamp overwrites the current value of this record's `timestamp`
	// field.
	SetTimestamp(time.Time) MessageEmbed

	// UnsetTimestamp removes this record's `timestamp` field.
	UnsetTimestamp() MessageEmbed

	// Color returns the current value of this record's `color` field.
	//
	// The `color` field contains the color code of this embed.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ColorIsSet to check if the field is present before use.
	Color() lib.Color

	// ColorIsSet returns whether this record's `color` field is currently
	// present.
	ColorIsSet() bool

	// SetColor overwrites the current value of this record's `color` field.
	SetColor(lib.Color) MessageEmbed

	// UnsetColor removes this record's `color` field.
	UnsetColor() MessageEmbed

	// Footer returns the current value of this record's `footer` field.
	//
	// The `footer` field contains this embed's footer information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use FooterIsSet to check if the field is present before use.
	Footer() EmbedFooter

	// FooterIsSet returns whether this record's `footer` field is currently
	// present.
	FooterIsSet() bool

	// SetFooter overwrites the current value of this record's `footer` field.
	SetFooter(EmbedFooter) MessageEmbed

	// UnsetFooter removes this record's `footer` field.
	UnsetFooter() MessageEmbed

	// Image returns the current value of this record's `image` field.
	//
	// The `image` field contains this embed's image information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ImageIsSet to check if the field is present before use.
	Image() EmbedImage

	// ImageIsSet returns whether this record's `image` field is currently
	// present.
	ImageIsSet() bool

	// SetImage overwrites the current value of this record's `image` field.
	SetImage(EmbedImage) MessageEmbed

	// UnsetImage removes this record's `image` field.
	UnsetImage() MessageEmbed

	// Thumbnail returns the current value of this record's `thumbnail` field.
	//
	// The `thumbnail` field contains this embed's thumbnail information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ThumbnailIsSet to check if the field is present before use.
	Thumbnail() EmbedThumbnail

	// ThumbnailIsSet returns whether this record's `thumbnail` field is currently
	// present.
	ThumbnailIsSet() bool

	// SetThumbnail overwrites the current value of this record's `thumbnail`
	// field.
	SetThumbnail(EmbedThumbnail) MessageEmbed

	// UnsetThumbnail removes this record's `thumbnail` field.
	UnsetThumbnail() MessageEmbed

	// Video returns the current value of this record's `video` field.
	//
	// The `video` field contains this embed's video information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use VideoIsSet to check if the field is present before use.
	Video() EmbedVideo

	// VideoIsSet returns whether this record's `video` field is currently
	// present.
	VideoIsSet() bool

	// SetVideo overwrites the current value of this record's `video` field.
	SetVideo(EmbedVideo) MessageEmbed

	// UnsetVideo removes this record's `video` field.
	UnsetVideo() MessageEmbed

	// Provider returns the current value of this record's `provider` field.
	//
	// The `provider` field contains this embed's provider information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use ProviderIsSet to check if the field is present before use.
	Provider() EmbedProvider

	// ProviderIsSet returns whether this record's `provider` field is currently
	// present.
	ProviderIsSet() bool

	// SetProvider overwrites the current value of this record's `provider` field.
	SetProvider(EmbedProvider) MessageEmbed

	// UnsetProvider removes this record's `provider` field.
	UnsetProvider() MessageEmbed

	// Author returns the current value of this record's `author` field.
	//
	// The `author` field contains this embed's author information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use AuthorIsSet to check if the field is present before use.
	Author() EmbedAuthor

	// AuthorIsSet returns whether this record's `author` field is currently
	// present.
	AuthorIsSet() bool

	// SetAuthor overwrites the current value of this record's `author` field.
	SetAuthor(EmbedAuthor) MessageEmbed

	// UnsetAuthor removes this record's `author` field.
	UnsetAuthor() MessageEmbed

	// Fields returns the current value of this record's `fields` field.
	//
	// The `fields` field contains this embed's fields information.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use FieldsIsSet to check if the field is present before use.
	Fields() []EmbedField

	// FieldsIsSet returns whether this record's `fields` field is currently
	// present.
	FieldsIsSet() bool

	// SetFields overwrites the current value of this record's `fields` field.
	SetFields([]EmbedField) MessageEmbed

	// UnsetFields removes this record's `fields` field.
	UnsetFields() MessageEmbed
}

MessageEmbed TODO: document me

type MessageFlag

type MessageFlag uint8
const (
	MsgFlagCrossposted MessageFlag = 1 << iota
	MsgFlagIsCrossposted
	MsgFlagSuppressEmbeds
	MsgFlagSourceMessageDeleted
	MsgFlagUrgent
)

func (MessageFlag) Add

func (f MessageFlag) Add(flag MessageFlag) MessageFlag

func (MessageFlag) IsValid

func (f MessageFlag) IsValid() bool

func (MessageFlag) Mask

func (f MessageFlag) Mask(flag MessageFlag) MessageFlag

func (MessageFlag) Remove

func (f MessageFlag) Remove(flag MessageFlag) MessageFlag

func (MessageFlag) Validate

func (f MessageFlag) Validate() error

type MessageNotificationLevel

type MessageNotificationLevel uint8
const (
	MsgNoteLvlAllMessages MessageNotificationLevel = iota
	MsgNoteLvlOnlyMentions
)

func (MessageNotificationLevel) IsValid

func (m MessageNotificationLevel) IsValid() bool

func (MessageNotificationLevel) Validate

func (m MessageNotificationLevel) Validate() error

type MessageReaction

type MessageReaction interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// Count returns the current value of this record's `count` field.
	//
	// The `count` field contains the times this emoji has been used to react.
	Count() uint16

	// SetCount overwrites the current value of this record's `count` field.
	SetCount(uint16) MessageReaction

	// Me returns the current value of this record's `me` field.
	//
	// The `me` field indicates whether the current user reacted using this emoji.
	Me() bool

	// SetMe overwrites the current value of this record's `me` field.
	SetMe(bool) MessageReaction

	// Emoji returns the current value of this record's `emoji` field.
	//
	// The `emoji` field contains emoji information.
	Emoji() Emoji

	// SetEmoji overwrites the current value of this record's `emoji` field.
	SetEmoji(Emoji) MessageReaction
}

MessageReaction TODO: document me

type MessageRef

type MessageRef interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// MessageID returns the current value of this record's `message_id` field.
	//
	// The `message_id` field contains the id of the originating message.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MessageIDIsSet to check if the field is present before use.
	MessageID() Snowflake

	// MessageIDIsSet returns whether this record's `message_id` field is
	// currently present.
	MessageIDIsSet() bool

	// SetMessageID overwrites the current value of this record's `message_id`
	// field.
	SetMessageID(Snowflake) MessageRef

	// UnsetMessageID removes this record's `message_id` field.
	UnsetMessageID() MessageRef

	// ChannelID returns the current value of this record's `channel_id` field.
	//
	// The `channel_id` field contains the id of the originating message's
	// channel.
	ChannelID() Snowflake

	// SetChannelID overwrites the current value of this record's `channel_id`
	// field.
	SetChannelID(Snowflake) MessageRef

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the id of the originating message's guild.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIDIsSet to check if the field is present before use.
	GuildID() Snowflake

	// GuildIDIsSet returns whether this record's `guild_id` field is currently
	// present.
	GuildIDIsSet() bool

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) MessageRef

	// UnsetGuildID removes this record's `guild_id` field.
	UnsetGuildID() MessageRef
}

type MessageType

type MessageType uint8

MessageType TODO: Document me

const (
	MsgTypeDefault MessageType = iota
	MsgTypeRecipientAdd
	MsgTypeRecipientRemove
	MsgTypeCall
	MsgTypeChannelNameChange
	MsgTypeChannelIconChange
	MsgTypeChannelPinnedMessage
	MsgTypeGuildMemberJoin
	MsgTypeUserPremiumGuildSubscription
	MsgTypeUserPremiumGuildSubscriptionTier1
	MsgTypeUserPremiumGuildSubscriptionTier2
	MsgTypeUserPremiumGuildSubscriptionTier3
	MsgTypeChannelFollowAdd
	MsgTypeGuildDiscoveryDisqualified MessageType = 1 + iota
	MsgTypeGuildDiscoveryRequalified
)

func (MessageType) IsValid

func (m MessageType) IsValid() bool

func (MessageType) Validate

func (m MessageType) Validate() error

type Nonce

type Nonce interface {
	json.Marshaler
	json.Unmarshaler

	// IsString returns whether the nonce value is a string.
	IsString() bool

	// IsInteger returns whether the nonce value is an integer.
	IsInteger() bool

	// StringValue returns the value of this nonce if it is a string.
	//
	// If the nonce value is not a string, this method will panic.
	StringValue() string

	// IntegerValue returns the value of this nonce if it is an integer.
	//
	// If the nonce value is not an integer, this method will panic.
	IntegerValue() int64

	// SetString sets the nonce value to the given string and the nonce type to
	// string.
	SetString(val string) Nonce

	// SetInteger sets the nonce value to the given integer and the nonce type to
	// integer.
	SetInteger(val int64) Nonce
}

type OverwriteType

type OverwriteType uint8
const (
	OverwriteTypeRole OverwriteType = iota
	OverwriteTypeMember
)

func (*OverwriteType) AppendJSONBytes

func (o *OverwriteType) AppendJSONBytes(writer io.Writer) (err error)

func (*OverwriteType) IsNil

func (o *OverwriteType) IsNil() bool

func (OverwriteType) IsValid

func (o OverwriteType) IsValid() bool

func (*OverwriteType) JSONSize

func (o *OverwriteType) JSONSize() uint32

func (*OverwriteType) MarshalJSON

func (o *OverwriteType) MarshalJSON() ([]byte, error)

func (*OverwriteType) ToJSONBytes

func (o *OverwriteType) ToJSONBytes() []byte

func (*OverwriteType) UnmarshalJSON

func (o *OverwriteType) UnmarshalJSON(in []byte) error

func (OverwriteType) Validate

func (o OverwriteType) Validate() error

type PerUserRateLimit

type PerUserRateLimit uint16

func DecodeUserRateLimit

func DecodeUserRateLimit(dec *gojay.Decoder) (*PerUserRateLimit, error)

func (PerUserRateLimit) IsValid

func (p PerUserRateLimit) IsValid() bool

func (PerUserRateLimit) Validate

func (p PerUserRateLimit) Validate() error

type Permission

type Permission uint32

TODO: Document this

const (
	// Allows creation of instant invites
	//
	// Channel Type(s): T, V
	PermissionCreateInstantInvite Permission = 1 << iota

	// Allows kicking members
	//
	// Requires 2FA
	PermissionKickMembers

	// Allows banning members
	//
	// Requires 2FA
	PermissionBanMembers

	// Allows all permissions and bypasses channel permission overwrites
	//
	// Requires 2FA
	PermissionAdministrator

	// Allows management and editing of channels
	//
	// Channel Type(s): T, V
	// Requires 2FA
	PermissionManageChannels

	// Allows management and editing of the guild
	//
	// Requires 2FA
	PermissionManageGuild

	// Allows for the addition of reactions to messages
	//
	// Channel Type(s): T
	PermissionAddReactions

	// Allows for viewing of audit logs
	//
	// Channel Type(s):
	PermissionViewAuditLog

	// Allows for using priority speaker in a voice channel
	//
	// Channel Type(s): V
	PermissionPrioritySpeaker

	// Allows the user to go live
	//
	// Channel Type(s): V
	PermissionStream

	// Allows guild members to view a channel, which includes reading messages in text channels
	//
	// Channel Type(s): T, V
	PermissionViewChannel

	// Allows for sending messages in a channel
	//
	// Channel Type(s): T
	PermissionSendMessages

	// Allows for sending of /tts messages
	//
	// Channel Type(s): T
	PermissionSendTTSMessages

	// Allows for deletion of other users messages
	//
	// Channel Type(s): T
	// Requires 2FA
	PermissionManageMessages
	// Links sent by users with this permission will be auto-embedded
	//
	// Channel Type(s): T
	PermissionEmbedLinks

	// Allows for uploading images and files
	//
	// Channel Type(s): T
	PermissionAttachFiles

	// Allows for reading of message history
	//
	// Channel Type(s): T
	PermissionReadMessageHistory

	// Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel
	//
	// Channel Type(s): T
	PermissionMentionEveryone

	// Allows the usage of custom emojis from other servers
	//
	// Channel Type(s): T
	PermissionUseExternalEmojis

	// Allows for viewing guild insights
	//
	// Channel Type(s):
	PermissionViewGuildInsights

	// Allows for joining of a voice channel
	//
	// Channel Type(s): V
	PermissionConnect

	// Allows for speaking in a voice channel
	//
	// Channel Type(s): V
	PermissionSpeak

	// Allows for muting members in a voice channel
	//
	// Channel Type(s): V
	PermissionMuteMembers

	// Allows for deafening of members in a voice channel
	//
	// Channel Type(s): V
	PermissionDeafenMembers

	// Allows for moving of members between voice channels
	//
	// Channel Type(s): V
	PermissionMoveMembers

	// Allows for using voice-activity-detection in a voice channel
	//
	// Channel Type(s): V
	PermissionUseVAD

	// Allows for modification of own nickname
	//
	// Channel Type(s):
	PermissionChangeNickname

	// Allows for modification of other users nicknames
	//
	// Channel Type(s):
	PermissionManageNicknames

	// Allows management and editing of roles
	//
	// Channel Type(s): T, V
	// Requires 2FA
	PermissionManageRoles

	// Allows management and editing of webhooks
	//
	// Channel Type(s): T, V
	// Requires 2FA
	PermissionManageWebhooks

	// Allows management and editing of emojis
	//
	// Requires 2FA
	PermissionManageEmojis
)

func (*Permission) IsNil

func (p *Permission) IsNil() bool

func (Permission) IsValid

func (p Permission) IsValid() bool

func (*Permission) JSONSize

func (p *Permission) JSONSize() int

func (Permission) MarshalJSON

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

func (Permission) String

func (p Permission) String() string

func (*Permission) ToBytes

func (p *Permission) ToBytes() []byte

func (*Permission) UnmarshalJSON

func (p *Permission) UnmarshalJSON(b []byte) error

func (Permission) Validate

func (p Permission) Validate() error

type PermissionOverwrite

type PermissionOverwrite interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Sized
	dmeta.Validatable

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) PermissionOverwrite

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field
	Type() OverwriteType

	// SetType overwrites the current value of this record's `type` field.
	SetType(OverwriteType) PermissionOverwrite

	// Allow returns the current value of this record's `allow` field.
	//
	// The `allow` field
	Allow() Permission

	// SetAllow overwrites the current value of this record's `allow` field.
	SetAllow(Permission) PermissionOverwrite

	// Deny returns the current value of this record's `deny` field.
	//
	// The `deny` field
	Deny() Permission

	// SetDeny overwrites the current value of this record's `deny` field.
	SetDeny(Permission) PermissionOverwrite
}

PermissionOverwrite TODO: document me

type PremiumTier

type PremiumTier uint8
const (
	PremiumTierNone PremiumTier = iota
	PremiumTier1
	PremiumTier2
	PremiumTier3
)

func (PremiumTier) IsValid

func (p PremiumTier) IsValid() bool

func (PremiumTier) Validate

func (p PremiumTier) Validate() error

type PresenceStatus

type PresenceStatus string
const (
	PresenceStatusIdle         PresenceStatus = "idle"
	PresenceStatusDoNotDisturb PresenceStatus = "dnd"
	PresenceStatusOnline       PresenceStatus = "online"
	PresenceStatusOffline      PresenceStatus = "offline"
)

func (PresenceStatus) IsValid

func (p PresenceStatus) IsValid() bool

func (PresenceStatus) Validate

func (p PresenceStatus) Validate() error

type PresenceUpdate

type PresenceUpdate interface {
	// User returns the current value of this record's `user` field.
	//
	// The `user` field contains the
	//
	// TODO: This should probably be it's own type since the API may return
	//       incompatible values.
	User() User

	// SetUser overwrites the current value of this record's `user` field.
	SetUser(User) PresenceUpdate

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the
	GuildID() Snowflake

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) PresenceUpdate

	// Status returns the current value of this record's `status` field.
	//
	// The `status` field contains the
	Status() PresenceStatus

	// SetStatus overwrites the current value of this record's `status` field.
	SetStatus(PresenceStatus) PresenceUpdate

	// Activities returns the current value of this record's `activities` field.
	//
	// The `activities` field contains the
	Activities() []Activity

	// SetActivities overwrites the current value of this record's `activities` field.
	SetActivities([]Activity) PresenceUpdate
}

A user's presence is their current state on a guild. This event is sent when a user's presence or info, such as name or avatar, is updated.

If you are using Gateway Intents, you must specify the GUILD_PRESENCES intent in order to receive Presence Update events

The user object within this event can be partial, the only field which must be sent is the id field, everything else is optional. Along with this limitation, no fields are required, and the types of the fields are not validated. Your client should expect any combination of fields and types within this event.

type Role

type Role interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Validatable

	// role id
	ID() Snowflake
	SetID(id Snowflake) Role

	// role name
	Name() string
	SetName(name string) Role

	// integer representation of hexadecimal color code
	Color() lib.Color
	SetColor(color lib.Color) Role
	SetRawColor(val uint32) Role

	// if this role is pinned in the user listing
	Hoist() bool
	SetHoist(bool) Role

	// position of this role
	Position() uint16
	SetPosition(pos uint16) Role

	// permission bit set
	Permissions() Permission
	SetPermissions(perm Permission) Role
	AddPermission(perm Permission) Role
	RemovePermission(perm Permission) Role
	PermissionsContains(perm Permission) bool

	// whether this role is managed by an integration
	Managed() bool
	SetManaged(bool) Role

	// whether this role is mentionable
	Mentionable() bool
	SetMentionable(bool) Role
}

Role TODO: document me

type Snowflake

type Snowflake interface {
	dmeta.Field
	fmt.Stringer

	dmeta.Validatable

	// RawValue returns the raw uint64 value backing this Snowflake.
	RawValue() uint64

	// SetRawValue overwrites this Snowflakes value with the given uint64 value.
	SetRawValue(raw uint64) Snowflake

	// Timestamp returns the timestamp for when this Snowflake was issued with
	// millisecond precision.
	Timestamp() time.Time

	// SetTimestamp overwrites this Snowflake's creation timestamp with the given
	// time.
	//
	// Note: Snowflake timestamps use millisecond precision.  The input value will
	// be truncated to milliseconds if needed.
	//
	// This method will panic if given a date greater than
	// Tue Aug 02 10889 05:31:50
	SetTimestamp(time.Time) Snowflake

	// InternalWorkerID returns the Discord worker ID for the node that generated
	// this Snowflake.
	InternalWorkerID() uint8

	// SetInternalWorkerID overwrites this Snowflake's internal worker ID with the
	// given value.
	//
	// Note: This method will panic if given a value greater than MaxWorkerID.
	SetInternalWorkerID(uint8) Snowflake

	// InternalProcessID returns the Discord process ID that generated this
	// Snowflake.
	InternalProcessID() uint8

	// SetInternalProcessID overwrites this Snowflake's internal process ID with
	// the given value.
	//
	// Note: This method will panic if given a value greater than MaxProcessID.
	SetInternalProcessID(uint8) Snowflake

	// CounterValue returns the counter value of this Snowflake.
	//
	// The counter value is an incrementing value assigned to each ID generated
	// by a specific process.
	CounterValue() uint16

	// SetCounterValue overwrites this Snowflake's counter value with the given
	// input value.
	//
	// Note: This method will panic if given a value that is greater than
	// MaxCounterValue.
	SetCounterValue(uint16) Snowflake

	// UnmarshalString attempts to parse the given string as a stringified
	// Snowflake value.
	UnmarshalString(string) error
}

type SystemChannelFlag

type SystemChannelFlag uint8
const (
	// Suppress member join notifications
	SystemChannelFlagSuppressJoinNotifications SystemChannelFlag = 1 << iota

	// Suppress server boost notifications
	SystemChannelFlagSuppressPremiumSubscriptions
)

func (SystemChannelFlag) IsValid

func (s SystemChannelFlag) IsValid() bool

func (SystemChannelFlag) Validate

func (s SystemChannelFlag) Validate() error

type User

type User interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	dmeta.Field
	dmeta.Validatable

	// ID returns the value of the `id` field currently set on this user record.
	//
	// The `id` field contains the the user's Snowflake id.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	ID() Snowflake

	// SetID overwrites the current value of this user record's `id` field with
	// the given param value.
	SetID(snowflake Snowflake) User

	// Username returns the value of the `username` field currently set on this
	// user record.
	//
	// The `username` field contains the the user's username (not unique across
	// the platform).
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	Username() string

	// SetUsername overwrites the current value of this user record's `username`
	// field with the given param value.
	SetUsername(name Username) User

	// Discriminator returns the value of the `discriminator` field currently set
	// on this user record.
	//
	// The `discriminator` field contains the user's 4-digit discord tag.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	Discriminator() Discriminator

	// SetDiscriminator overwrites the current value of this user record's
	// `discriminator` field with the given param value.
	SetDiscriminator(code Discriminator) User

	// AvatarHash returns the value of the `avatar_hash` field currently set on
	// this user record.
	//
	// The `avatar_hash` field contains the user's the user's avatar hash
	// (https://discord.com/developers/docs/reference#image-formatting).
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `avatar_hash` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// AvatarHashIsSet method.
	AvatarHash() ImageHash
	AvatarHashIsNull() bool
	SetAvatarHash(ImageHash) User
	SetNullAvatarHash() User

	// BotFlag returns the value of the `bot` field currently set on this user
	// record.
	//
	// The `bot` flag indicates whether the user belongs to an OAuth2 application.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `bot` field is unset when this method is called, this
	// method will panic.  Check for the field's existence with the BotFlagIsSet
	// method.
	BotFlag() bool
	BotFlagIsSet() bool
	SetBotFlag(bool) User
	UnsetBotFlag() User

	// SystemFlag returns the value of the `system` field currently set on this
	// user record.
	//
	// The `system` flag indicates whether the user is an Official Discord System
	// user (part of the urgent message system).
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `system` field is unset when this method is called,
	// this method will panic.  Check for the field's existence with the
	// SystemFlagIsSet method.
	SystemFlag() bool
	SystemFlagIsSet() bool
	SetSystemFlag(bool) User
	UnsetSystemFlag() User

	// MFAEnabled returns the value of the `mfa_enabled` field currently set on
	// this user record.
	//
	// The `mfa_enabled` flag indicates whether the user has two factor
	// authentication enabled on their account.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `mfa_enabled` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// MFAEnabledIsSet method.
	MFAEnabled() bool
	MFAEnabledIsSet() bool
	SetMFAEnabled(bool) User
	UnsetMFAEnabled() User

	// Locale returns the value of the `locale` field currently set on this user
	// record.
	//
	// The `locale` field contains the user's chosen language option.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `locale` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// LocaleIsSet method.
	Locale() string
	LocaleIsSet() bool
	SetLocale(string) User
	UnsetLocale() User

	// VerifiedFlag returns the value of the `verified` field currently set on
	// this user record.
	//
	// The `verified` flag indicates whether the email on this account has been
	// verified.
	//
	// Getting this field from the Discord API requires the `email` OAuth2 scope.
	//
	// If the user record's `verified` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// VerifiedFlagIsSet method.
	VerifiedFlag() bool
	VerifiedFlagIsSet() bool
	SetVerifiedFlag(bool) User
	UnsetVerifiedFlag() User

	// Email returns the value of the `email` field currently set on this user
	// record.
	//
	// The `email` field contains the user's email address.
	//
	// Getting this field from the Discord API requires the `email` OAuth2 scope.
	//
	// If the user record's `email` field is unset or null when this method is
	// called, this method will panic.  Check for the field's existence and null
	// state with the EmailIsSet and EmailIsNull methods.
	Email() string
	EmailIsSet() bool
	EmailIsNull() bool
	SetEmail(string) User
	UnsetEmail() User
	SetNullEmail() User

	// Flags returns the value of the `flags` field currently set on this user
	// record.
	//
	// The `flags` field contains the flags set on a user's account.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `flags` field is unset when this method is called,
	// this method will panic.  Check for the field's existence with the
	// FlagsIsSet method.
	Flags() UserFlag

	// FlagsIsSet returns whether the current user record's flags field exists.
	FlagsIsSet() bool

	// SetFlags overwrites the current user record's flag(s) with the given value.
	SetFlags(UserFlag) User

	// UnsetFlags removes this user record's flags field.
	UnsetFlags() User

	// AddFlag appends the given user flag to this User record's current flag
	// value(s).
	//
	// If the field is unset when this method is called this method, the given
	// parameter value will become the new field value.
	AddFlag(UserFlag) User

	// RemoveFlag removes the given user flag from this User record's current flag
	// value(s).
	//
	// If the field is unset when this method is called, this method does nothing.
	// become the new field value.
	RemoveFlag(UserFlag) User

	// FlagsContains returns whether or not the public flag value(s) currently set
	// on this user record contain or equal the given value.
	FlagsContains(UserFlag) bool

	// PremiumType returns the value of the `premium_type` field currently set on
	// this user record.
	//
	// The `premium_type` field contains the the flags set on a user's account.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `premium_type` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// PremiumTypeIsSet method.
	PremiumType() UserPremiumType
	PremiumTypeIsSet() bool
	SetPremiumType(UserPremiumType) User
	UnsetPremiumType() User

	// PublicFlags returns the value of the `public_flags` field currently set on
	// this user record.
	//
	// The `public_flags` field contains the the public flags on a user's account.
	//
	// Getting this field from the Discord API requires the `identify` OAuth2
	// scope.
	//
	// If the user record's `public_flags` field is unset when this method is
	// called, this method will panic.  Check for the field's existence with the
	// PublicFlagsIsSet method.
	PublicFlags() UserFlag

	// PublicFlagsIsSet returns whether the current user record's public flags
	// field exists.
	PublicFlagsIsSet() bool

	// SetPublicFlags overwrites the current user record's public flag(s) with the
	// given value.
	SetPublicFlags(UserFlag) User

	// UnsetPublicFlags removes this user record's flags field.
	UnsetPublicFlags() User

	// AddPublicFlag appends the given user flag to this User record's current
	// public flag value(s).
	//
	// If the field is unset when this method is called this method, the given
	// parameter value will become the new field value.
	AddPublicFlag(UserFlag) User

	// RemovePublicFlag removes the given user flag from this User record's
	// current public flag value(s).
	//
	// If the field is unset when this method is called, this method does nothing.
	// become the new field value.
	RemovePublicFlag(UserFlag) User

	// PublicFlagsContains returns whether or not the public flag value(s)
	// currently set on this user record contain or equal the given value.
	PublicFlagsContains(UserFlag) bool
}

User TODO: Document me

type UserApplication

type UserApplication interface {
	// the id of the app
	ID() Snowflake
	SetID(id Snowflake) UserApplication

	// the name of the app
	Name() string
	SetName(name string) UserApplication

	// the icon hash of the app
	Icon() ImageHash
	IconIsNull() bool
	SetIcon(hash ImageHash) UserApplication
	SetNullIcon() UserApplication

	// the description of the app
	Description() string
	SetDescription(desc string) UserApplication

	// the description of the app
	Summary() string
	SetSummary(sum string) UserApplication

	// the bot associated with this application
	Bot() User
	BotIsSet() bool
	SetBot(user User) UserApplication
	UnsetBot() UserApplication
}

type UserConnection

type UserConnection interface {
	// id of the connection account
	Id() string
	SetId(string) UserConnection

	// the username of the connection account
	Name() string
	SetName(string) UserConnection

	// the service of the connection (twitch, youtube)
	Type() string
	SetType(string) UserConnection

	// whether the connection is revoked
	Revoked() bool
	RevokedIsSet() bool
	SetRevoked(bool) UserConnection
	UnsetRevoked() UserConnection

	// an array of partial server integrations
	Integrations() []Integration
	IntegrationsIsSet() bool
	SetIntegrations([]Integration) UserConnection
	UnsetIntegrations() UserConnection

	// whether the connection is verified
	Verified() bool
	SetVerified(bool) UserConnection

	// whether friend sync is enabled for this connection
	FriendSync() bool
	SetFriendSync(bool) UserConnection

	// whether activities related to this connection will be shown in presence updates
	ShowActivity() bool
	SetShowActivity(bool) UserConnection

	// visibility of this connection
	Visibility() ConnectionVisibility
	SetVisibility(ConnectionVisibility) UserConnection
}

type UserFlag

type UserFlag uint32
const (
	UserFlagDiscordEmployee UserFlag = 1 << iota
	UserFlagPartneredServerOwner
	UserFlagHypeSquadEvents
	UserFlagBugHunterLevel1
)
const (
	UserFlagHouseBravery UserFlag = 1 << (6 + iota)
	UserFlagHouseBrilliance
	UserFlagHouseBalance
	UserFlagEarlySupporter
	UserFlagTeamUser
)
const (
	UserFlagSystem                    UserFlag = 1 << 12
	UserFlagBugHunterLevel2           UserFlag = 1 << 14
	UserFlagVerifiedBot               UserFlag = 1 << 16
	UserFlagEarlyVerifiedBotDeveloper UserFlag = 1 << 17
)
const FlagNone UserFlag = 0

func (*UserFlag) AppendJSONBytes

func (f *UserFlag) AppendJSONBytes(writer io.Writer) (err error)

func (*UserFlag) IsNil

func (f *UserFlag) IsNil() bool

func (UserFlag) IsValid

func (f UserFlag) IsValid() bool

IsValid returns whether the current UserFlag consists exclusively of valid values.

This method will work on single flags as well as combination values (Flags that combined via bitwise OR)

func (*UserFlag) JSONSize

func (f *UserFlag) JSONSize() uint32

func (UserFlag) MarshalJSON

func (f UserFlag) MarshalJSON() ([]byte, error)

func (UserFlag) ToJSONBytes

func (f UserFlag) ToJSONBytes() []byte

func (*UserFlag) UnmarshalJSON

func (f *UserFlag) UnmarshalJSON(bytes []byte) error

func (UserFlag) Validate

func (f UserFlag) Validate() error

Validate checks that the current UserFlag consists exclusively of valid values.

This method will work on single flags as well as combination values (Flags that combined via bitwise OR)

type UserLimit

type UserLimit uint8

func DecodeUserLimit

func DecodeUserLimit(dec *gojay.Decoder) (*UserLimit, error)

func (UserLimit) IsValid

func (u UserLimit) IsValid() bool

func (UserLimit) Validate

func (u UserLimit) Validate() error

type UserNickname

type UserNickname string

func (UserNickname) IsValid

func (n UserNickname) IsValid() bool

func (UserNickname) Validate

func (n UserNickname) Validate() error

type UserPremiumType

type UserPremiumType uint8
const (
	PremiumTypeNone UserPremiumType = iota
	PremiumTypeNitroClassic
	PremiumTypeNitro
)

func (*UserPremiumType) AppendJSONBytes

func (p *UserPremiumType) AppendJSONBytes(writer io.Writer) (err error)

func (*UserPremiumType) IsNil

func (p *UserPremiumType) IsNil() bool

func (UserPremiumType) IsValid

func (p UserPremiumType) IsValid() bool

func (*UserPremiumType) JSONSize

func (p *UserPremiumType) JSONSize() uint32

func (UserPremiumType) MarshalJSON

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

func (UserPremiumType) ToJSONBytes

func (p UserPremiumType) ToJSONBytes() []byte

func (*UserPremiumType) UnmarshalJSON

func (p *UserPremiumType) UnmarshalJSON(bytes []byte) error

func (UserPremiumType) Validate

func (p UserPremiumType) Validate() error

type Username

type Username string

func (*Username) AppendJSONBytes

func (u *Username) AppendJSONBytes(writer io.Writer) error

func (*Username) IsNil

func (u *Username) IsNil() bool

func (Username) IsValid

func (u Username) IsValid() bool

func (Username) JSONSize

func (u Username) JSONSize() uint32

func (Username) MarshalJSON

func (u Username) MarshalJSON() ([]byte, error)

func (*Username) ToJSONBytes

func (u *Username) ToJSONBytes() []byte

func (*Username) UnmarshalJSON

func (u *Username) UnmarshalJSON(bytes []byte) error

func (Username) Validate

func (u Username) Validate() error

type VerificationLevel

type VerificationLevel uint8
const (
	// unrestricted
	VerificationLevelNone VerificationLevel = iota

	// must have verified email on account
	VerificationLevelLow

	// must be registered on Discord for longer than 5 minutes
	VerificationLevelMedium

	// must be a member of the server for longer than 10 minutes
	VerificationLevelHigh

	// must have a verified phone number
	VerificationLevelVeryHigh
)

func (VerificationLevel) IsValid

func (v VerificationLevel) IsValid() bool

func (VerificationLevel) Validate

func (v VerificationLevel) Validate() error

type VoiceRegion

type VoiceRegion interface {
	json.Marshaler
	json.Unmarshaler

	// ID returns the value of the `id` field currently set on this voice region.
	//
	// The `id` field contains the unique ID for the region.
	ID() string

	// SetID overwrites the current value of this voice region record's `id`
	// field with the given param value.
	SetID(id string) VoiceRegion

	// Name returns the value of the `name` field currently set on this voice
	// region.
	//
	// The `name` field contains the name of the region
	Name() string

	// SetName overwrites the current value of this voice region record's `name`
	// field with the given param value.
	SetName(name string) VoiceRegion

	// VIP returns the value of the `vip` field currently set on this voice
	// region.
	//
	// The `vip` flag indicates if this is a vip-only server.
	VIP() bool

	// SetVIP overwrites the current value of this voice region record's `vip`
	// field with the given param value.
	SetVIP(vip bool) VoiceRegion

	// Optimal returns the value of the `optimal` field currently set on this
	// voice region.
	//
	// The `optimal` flag indicates if this single server is closest to the
	// current user's client.
	Optimal() bool

	// SetOptimal overwrites the current value of this voice region record's
	// `optimal` field with the given param value.
	SetOptimal(opt bool) VoiceRegion

	// Deprecated returns the value of the `deprecated` field currently set on
	// this voice region.
	//
	// The `deprecated` flag indicates whether this is a deprecated voice region
	// (avoid switching to these).
	Deprecated() bool

	// SetDeprecated overwrites the current value of this voice region record's
	// `deprecated` field with the given param value.
	SetDeprecated(dep bool) VoiceRegion

	// Custom returns the value of the `custom` field currently set on this voice
	// region.
	//
	// The `custom` flag indicates whether this is a custom voice region
	// (used for events/etc).
	Custom() bool

	// SetCustom overwrites the current value of this voice region record's
	// `custom` field with the given param value.
	SetCustom(cus bool) VoiceRegion
}

VoiceRegion TODO: Documentation

type VoiceState

type VoiceState interface {
	json.Marshaler
	json.Unmarshaler

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the guild id this voice state is for.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIDIsSet to check if the field is present before use.
	GuildID() Snowflake

	// GuildIDIsSet returns whether this record's `guild_id` field is currently
	// present.
	GuildIDIsSet() bool

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) VoiceState

	// UnsetGuildID removes this record's `guild_id` field.
	UnsetGuildID() VoiceState

	// ChannelID returns the current value of this record's `channel_id` field.
	//
	// The `channel_id` field contains the channel id this user is connected to.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use ChannelIDIsNull to check if the field is null before use.
	ChannelID() Snowflake

	// ChannelIDIsNull returns whether this record's `channel_id` field is
	// currently null.
	ChannelIDIsNull() bool

	// SetChannelID overwrites the current value of this record's `channel_id`
	// field.
	SetChannelID(Snowflake) VoiceState

	// SetNullChannelID overwrites the current value of this record's `channel_id`
	// field with `null`.
	SetNullChannelID() VoiceState

	// UserID returns the current value of this record's `user_id` field.
	//
	// The `user_id` field contains the user id this voice state is for.
	UserID() Snowflake

	// SetUserID overwrites the current value of this record's `user_id` field.
	SetUserID(Snowflake) VoiceState

	// Member returns the current value of this record's `member` field.
	//
	// The `member` field contains the guild member this voice state is for.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use MemberIsSet to check if the field is present before use.
	Member() GuildMember

	// MemberIsSet returns whether this record's `member` field is currently
	// present.
	MemberIsSet() bool

	// SetMember overwrites the current value of this record's `member` field.
	SetMember(GuildMember) VoiceState

	// UnsetMember removes this record's `member` field.
	UnsetMember() VoiceState

	// SessionID returns the current value of this record's `session_id` field.
	//
	// The `session_id` field contains the session id for this voice state.
	SessionID() string

	// SetSessionID overwrites the current value of this record's `session_id`
	// field.
	SetSessionID(string) VoiceState

	// Deaf returns the current value of this record's `deaf` field.
	//
	// The `deaf` field indicates whether this user is deafened by the server.
	Deaf() bool

	// SetDeaf overwrites the current value of this record's `deaf` field.
	SetDeaf(bool) VoiceState

	// Mute returns the current value of this record's `mute` field.
	//
	// The `mute` field indicates whether this user is muted by the server.
	Mute() bool

	// SetMute overwrites the current value of this record's `mute` field.
	SetMute(bool) VoiceState

	// SelfDeaf returns the current value of this record's `self_deaf` field.
	//
	// The `self_deaf` field indicates whether this user is locally deafened.
	SelfDeaf() bool

	// SetSelfDeaf overwrites the current value of this record's `self_deaf`
	// field.
	SetSelfDeaf(bool) VoiceState

	// SelfMute returns the current value of this record's `self_mute` field.
	//
	// The `self_mute` field indicates whether this user is locally muted.
	SelfMute() bool

	// SetSelfMute overwrites the current value of this record's `self_mute`
	// field.
	SetSelfMute(bool) VoiceState

	// SelfStream returns the current value of this record's `self_stream` field.
	//
	// The `self_stream` field indicates whether this user is streaming using
	// "Go Live".
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use SelfStreamIsSet to check if the field is present before use.
	SelfStream() bool

	// SelfStreamIsSet returns whether this record's `self_stream` field is
	// currently present.
	SelfStreamIsSet() bool

	// SetSelfStream overwrites the current value of this record's `self_stream`
	// field.
	SetSelfStream(bool) VoiceState

	// UnsetSelfStream removes this record's `self_stream` field.
	UnsetSelfStream() VoiceState

	// SelfVideo returns the current value of this record's `self_video` field.
	//
	// The `self_video` field indicates whether this user's camera is enabled.
	SelfVideo() bool

	// SetSelfVideo overwrites the current value of this record's `self_video`
	// field.
	SetSelfVideo(bool) VoiceState

	// Suppress returns the current value of this record's `suppress` field.
	//
	// The `suppress` field indicates whether this user is muted by the current
	// user.
	Suppress() bool

	// SetSuppress overwrites the current value of this record's `suppress` field.
	SetSuppress(bool) VoiceState
}

VoiceState TODO: Document me

type Webhook

type Webhook interface {
	json.Marshaler
	json.Unmarshaler

	// ID returns the current value of this record's `id` field.
	//
	// The `id` field contains the id of the webhook.
	ID() Snowflake

	// SetID overwrites the current value of this record's `id` field.
	SetID(Snowflake) Webhook

	// Type returns the current value of this record's `type` field.
	//
	// The `type` field contains the type of the webhook.
	Type() WebhookType

	// SetType overwrites the current value of this record's `type` field.
	SetType(WebhookType) Webhook

	// GuildID returns the current value of this record's `guild_id` field.
	//
	// The `guild_id` field contains the guild id this webhook is for.
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use GuildIDIsSet to check if the field is present before use.
	GuildID() Snowflake

	// GuildIDIsSet returns whether this record's `guild_id` field is currently
	// present.
	GuildIDIsSet() bool

	// SetGuildID overwrites the current value of this record's `guild_id` field.
	SetGuildID(Snowflake) Webhook

	// UnsetGuildID removes this record's `guild_id` field.
	UnsetGuildID() Webhook

	// ChannelID returns the current value of this record's `channel_id` field.
	//
	// The `channel_id` field contains the channel id this webhook is for.
	ChannelID() Snowflake

	// SetChannelID overwrites the current value of this record's `channel_id`
	// field.
	SetChannelID(Snowflake) Webhook

	// User returns the current value of this record's `user` field.
	//
	// The `user` field contains the user this webhook was created by (not
	// returned when getting a webhook with its token).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use UserIsSet to check if the field is present before use.
	User() User

	// UserIsSet returns whether this record's `user` field is currently present.
	UserIsSet() bool

	// SetUser overwrites the current value of this record's `user` field.
	SetUser(User) Webhook

	// UnsetUser removes this record's `user` field.
	UnsetUser() Webhook

	// Name returns the current value of this record's `name` field.
	//
	// The `name` field contains the default name of the webhook.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use NameIsNull to check if the field is null before use.
	Name() string

	// NameIsNull returns whether this record's `name` field is currently null.
	NameIsNull() bool

	// SetName overwrites the current value of this record's `name` field.
	SetName(string) Webhook

	// SetNullName overwrites the current value of this record's `name` field
	// with `null`.
	SetNullName() Webhook

	// Avatar returns the current value of this record's `avatar` field.
	//
	// The `avatar` field contains the default avatar of the webhook.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use AvatarIsNull to check if the field is null before use.
	Avatar() ImageHash

	// AvatarIsNull returns whether this record's `avatar` field is currently
	// null.
	AvatarIsNull() bool

	// SetAvatar overwrites the current value of this record's `avatar` field.
	SetAvatar(ImageHash) Webhook

	// SetNullAvatar overwrites the current value of this record's `avatar` field
	// with `null`.
	SetNullAvatar() Webhook

	// Token returns the current value of this record's `token` field.
	//
	// The `token` field contains the secure token of the webhook (returned for
	// Incoming Webhooks).
	//
	// If this method is called on a field that is unset, this method will panic.
	// Use TokenIsSet to check if the field is present before use.
	Token() string

	// TokenIsSet returns whether this record's `token` field is currently
	// present.
	TokenIsSet() bool

	// SetToken overwrites the current value of this record's `token` field.
	SetToken(string) Webhook

	// UnsetToken removes this record's `token` field.
	UnsetToken() Webhook

	// ApplicationID returns the current value of this record's `application_id`
	// field.
	//
	// The `application_id` field contains the bot/OAuth2 application that created
	// this webhook.
	//
	// If this method is called on a field with a null value, this method will
	// panic.  Use ApplicationIDIsNull to check if the field is null before use.
	ApplicationID() Snowflake

	// ApplicationIDIsNull returns whether this record's `application_id` field is
	// currently null.
	ApplicationIDIsNull() bool

	// SetApplicationID overwrites the current value of this record's
	// `application_id` field.
	SetApplicationID(Snowflake) Webhook

	// SetNullApplicationID overwrites the current value of this record's
	// `application_id` field with `null`.
	SetNullApplicationID() Webhook
}

type WebhookType

type WebhookType uint8
const (
	WebhookTypeIncoming        WebhookType = 1
	WebhookTypeChannelFollower WebhookType = 2
)

func (WebhookType) IsValid

func (t WebhookType) IsValid() bool

func (WebhookType) Validate

func (t WebhookType) Validate() error

type Widget

type Widget interface {
	json.Marshaler
	json.Unmarshaler

	gojay.MarshalerJSONObject
	gojay.UnmarshalerJSONObject

	lib.Sized
	dmeta.Validatable

	// Enabled returns the value of the `enabled` field currently set on this
	// guild widget.
	//
	// The `enabled` flag indicates whether the current widget is enabled.
	Enabled() bool

	// SetEnabled overwrites the current value of this guild widget's `enabled`
	// field with the given param value.
	SetEnabled(bool) Widget

	// ChannelID returns the value of the `channel_id` field currently set on this
	// guild widget.
	//
	// The `channel_id` field contains the widget channel ID.
	//
	// If the guild widget's `channel_id` field is null when this method is
	// called, this method will panic.  Check the field's null state with the
	// ChannelIDIsNull method.
	ChannelID() Snowflake

	// ChannelIDIsNull returns whether the current value of this guild widget
	// object's `channel_id` field is `null`.
	ChannelIDIsNull() bool

	// SetChannelID overwrites the current value of this guild widget's
	// `channel_id` field with the given param value.
	SetChannelID(id Snowflake) Widget

	// SetNullChannelID sets the current value of this guild widget's `channel_id`
	// field to `null`.
	SetNullChannelID() Widget
}

Directories

Path Synopsis
api
dio

Jump to

Keyboard shortcuts

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