ucdiscord

package
v0.0.0-...-dec900b Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HOUSE_BRAVERY   = 1
	HOUSE_BRILLANCE = 2
	HOUSE_BALANCE   = 3
)
View Source
var (
	PROP_TRACK   = 0
	PROP_SUPER   = 1
	PROP_CONTEXT = 2

	LOCATION_JOIN_GUILD = "Join Guild"
	LOCATION_ADD_FRIEND = "Add Friend"
)
View Source
var (
	VERSION  = 9
	ENDPOINT = fmt.Sprintf("https://discord.com/api/v%d", VERSION)
)
View Source
var (
	FLAG_SPAMMER = 1048576
)

Functions

func AddBase64Padding

func AddBase64Padding(base64String string) string

func CleanPatchUser

func CleanPatchUser(P *PatchPayload) map[string]interface{}

func CleanSetProfil

func CleanSetProfil(P *SetProfilPayload) map[string]interface{}

func CustomMarshalProp

func CustomMarshalProp(props CtxProp) ([]byte, error)

func Snowflake

func Snowflake() int

Thanks to https://github.com/V4NSH4J/discord-mass-DM-GO

Types

type Activity

type Activity struct {
	Name       string     `json:"name"`
	Type       int64      `json:"type"`
	State      string     `json:"state"`
	Timestamps Timestamps `json:"timestamps"`
	Emoji      Emoji      `json:"emoji"`
}

type AddFriendPayload

type AddFriendPayload struct {
	Username      string `json:"username"`
	Discriminator any    `json:"discriminator"`
}

type Auth

type Auth struct {
	AuthenticatorTypes []interface{} `json:"authenticator_types"`
}

type CaptchaSpawnResponse

type CaptchaSpawnResponse struct {
	CaptchaKey     []string `json:"captcha_key"`
	CaptchaSitekey string   `json:"captcha_sitekey"`
	CaptchaService string   `json:"captcha_service"`
	CaptchaRqdata  string   `json:"captcha_rqdata"`
	CaptchaRqtoken string   `json:"captcha_rqtoken"`
}

type Channel

type Channel struct {
	Type                 int64                 `json:"type"`
	Topic                *string               `json:"topic"`
	ThemeColor           interface{}           `json:"theme_color"`
	Status               interface{}           `json:"status"`
	RateLimitPerUser     *int64                `json:"rate_limit_per_user,omitempty"`
	Position             int64                 `json:"position"`
	PermissionOverwrites []PermissionOverwrite `json:"permission_overwrites"`
	ParentID             *string               `json:"parent_id"`
	Nsfw                 *bool                 `json:"nsfw,omitempty"`
	Name                 string                `json:"name"`
	LastMessageID        *string               `json:"last_message_id"`
	ID                   string                `json:"id"`
	IconEmoji            *IconEmoji            `json:"icon_emoji,omitempty"`
	Flags                int64                 `json:"flags"`
	UserLimit            *int64                `json:"user_limit,omitempty"`
	RTCRegion            interface{}           `json:"rtc_region"`
	Bitrate              *int64                `json:"bitrate,omitempty"`
}

type Client

type Client struct {
	Config    *Config
	UserAgent *cleanhttp.UserAgentInfo
	Ws        *ClientWebsocket

	XFingerprint string
}

func NewClient

func NewClient(config *Config) (*Client, error)

func (*Client) AddFriend

func (C *Client) AddFriend(config *Config) (resp *Response, data *CaptchaSpawnResponse, err error)

func (*Client) CaptchaEvent

func (C *Client) CaptchaEvent(siteKey string) (resp *Response, err error)

func (*Client) Do

func (c *Client) Do(config Request) (*Response, error)

func (*Client) GetCookies

func (C *Client) GetCookies() (resp *Response, data *FingerprintResponse, err error)

func (*Client) GetCtxProperties

func (C *Client) GetCtxProperties(GuildID, ChannelID, Location string) (string, error)

func (*Client) GetHeader

func (C *Client) GetHeader(config *HeaderConfig) http.Header

func (*Client) GetProperties

func (C *Client) GetProperties(config *PropInfo) (headerName string, headerValue string, err error)

func (*Client) IsLocked

func (C *Client) IsLocked() (locked bool, status int, err error)

func (*Client) JoinGuild

func (C *Client) JoinGuild(config *Config) (resp *Response, data *JoinServerResponse, err error)

func (*Client) JoinHypesquad

func (C *Client) JoinHypesquad(House int) (resp *Response, err error)

func (*Client) PatchProfil

func (C *Client) PatchProfil(config *Config) (resp *Response, data *SetProfilResponse, err error)

func (*Client) PatchUser

func (C *Client) PatchUser(config *Config) (resp *Response, data *SetBirthResponse, err error)

func (*Client) Register

func (C *Client) Register(config *Config) (resp *Response, data *RegisterResponse, err error)

func (*Client) SendInteraction

func (C *Client) SendInteraction(config *Config) (resp *Response, err error)
{
	"message": "Corps de formulaire non valide",
	"code": 50035,
	"errors": {
		"_errors": [
			{
				"code": "DICT_TYPE_CONVERT",
				"message": "Seuls les dictionnaires peuvent \u00eatre utilis\u00e9s dans un DictType"
			}
		]
	}
}

func (*Client) SendMessage

func (C *Client) SendMessage(message string, tts bool, ChannelID string) (resp *Response, data *SendMessageResponse, err error)

func (*Client) SupressTutorial

func (C *Client) SupressTutorial() (resp *Response, err error)

func (*Client) VerifyEmail

func (C *Client) VerifyEmail(jwt, captcha string) (resp *Response, data *VerifyResponse, err error)

type ClientInfo

type ClientInfo struct {
	Version int64  `json:"version"`
	OS      string `json:"os"`
	Client  string `json:"client"`
}

type ClientState

type ClientState struct {
	GuildVersions            GuildVersions `json:"guild_versions"`
	HighestLastMessageID     string        `json:"highest_last_message_id"`
	ReadStateVersion         int64         `json:"read_state_version"`
	UserGuildSettingsVersion int64         `json:"user_guild_settings_version"`
	UserSettingsVersion      int64         `json:"user_settings_version"`
	PrivateChannelsVersion   string        `json:"private_channels_version"`
	APICodeVersion           int64         `json:"api_code_version"`
}

type ClientWebsocket

type ClientWebsocket struct {
	Open, Ready, LogNonImplemented, Debug, DebugRecvData bool
	Token                                                string
	Conn                                                 *websocket.Conn
	Prop                                                 *XProp
	ReadyData                                            *D
}

func NewWebsocket

func NewWebsocket(Token string, Prop *XProp) (*ClientWebsocket, error)

func (*ClientWebsocket) Close

func (C *ClientWebsocket) Close()

func (*ClientWebsocket) Heartbeat

func (C *ClientWebsocket) Heartbeat(span int)

func (*ClientWebsocket) Listen

func (C *ClientWebsocket) Listen()

func (*ClientWebsocket) Login

func (C *ClientWebsocket) Login() (err error)

func (*ClientWebsocket) UpdateStatus

func (C *ClientWebsocket) UpdateStatus(Status, State string) error

type Config

type Config struct {
	Token             string
	Build, ApiVersion int
	GetCookies        bool

	Http *cleanhttp.CleanHttp
	Ws   *ClientWebsocket

	AvatarFromB64 bool

	// register [username, captchakey, invite]
	Username, CaptchaKey string

	// Join guild [invite, guildid, channelid]
	// Interaction [application_id, guildid, channelid, type, analytics_location, data]
	Invite, GuildID, ChannelD, ApplicationID, AnalyticsLocation string
	Type                                                        int
	Data                                                        string

	// patch @me [date, email, password, displayname, avatar]
	Date, Email, Password, DisplayName, Avatar string

	// Add Friend [username, captchakey, rqdata]
	RqToken string

	// patch profil [accentcolor, bio, pronouns]
	AccentColor   int
	Bio, Pronouns string
}

type Consents

type Consents struct {
	Personalization Personalization `json:"personalization"`
}

type CtxProp

type CtxProp struct {
	Location            string `json:"location"`
	LocationGuildID     string `json:"location_guild_id"`
	LocationChannelID   string `json:"location_channel_id"`
	LocationChannelType int    `json:"location_channel_type"`
}

type D

type D struct {
	// login reply
	V                 int64         `json:"v"`
	Users             []UserElement `json:"users"`
	UserSettingsProto string        `json:"user_settings_proto"`
	UserGuildSettings ReadState     `json:"user_guild_settings"`
	User              PurpleUser    `json:"user"`
	Tutorial          Tutorial      `json:"tutorial"`
	Sessions          []Session     `json:"sessions"`
	SessionType       string        `json:"session_type"`
	SessionID         string        `json:"session_id"`
	ResumeGatewayURL  string        `json:"resume_gateway_url"`
	Relationships     []interface{} `json:"relationships"`
	//ReadState         ReadState        `json:"read_state"`
	PrivateChannels   []interface{}    `json:"private_channels"`
	MergedMembers     [][]MergedMember `json:"merged_members"`
	Guilds            []Guild          `json:"guilds"`
	GuildJoinRequests []interface{}    `json:"guild_join_requests"`
	//GuildExperiments      [][]DGuildExperiment `json:"guild_experiments"`
	GeoOrderedRTCRegions  []string      `json:"geo_ordered_rtc_regions"`
	FriendSuggestionCount int64         `json:"friend_suggestion_count"`
	Experiments           [][]int64     `json:"experiments"`
	CountryCode           string        `json:"country_code"`
	Consents              Consents      `json:"consents"`
	ConnectedAccounts     []interface{} `json:"connected_accounts"`
	AuthSessionIDHash     string        `json:"auth_session_id_hash"`
	Auth                  Auth          `json:"auth"`
	APICodeVersion        int64         `json:"api_code_version"`
	AnalyticsToken        string        `json:"analytics_token"`
	Trace                 []string      `json:"_trace"`

	// login
	Token        *string      `json:"token,omitempty"`
	Capabilities *int         `json:"capabilities,omitempty"`
	Properties   *XProp       `json:"properties,omitempty"`
	Presence     *Presence    `json:"presence,omitempty"`
	Compress     *bool        `json:"compress,omitempty"`
	ClientState  *ClientState `json:"client_state,omitempty"`
	Status       *string      `json:"status,omitempty"`
	Since        *int64       `json:"since,omitempty"`
	Activities   []Activity   `json:"activities,omitempty"`
	Afk          *bool        `json:"afk,omitempty"`
}

type DGuildExperiment

type DGuildExperiment struct {
	Integer    *int64
	String     *string
	UnionArray []TentacledGuildExperiment
}

type Emoji

type Emoji struct {
	Roles         []interface{} `json:"roles"`
	RequireColons bool          `json:"require_colons"`
	Name          string        `json:"name"`
	Managed       bool          `json:"managed"`
	ID            string        `json:"id"`
	Available     bool          `json:"available"`
	Animated      bool          `json:"animated"`
}

type Entry

type Entry struct {
	MentionCount     *int64  `json:"mention_count,omitempty"`
	LastPinTimestamp *string `json:"last_pin_timestamp,omitempty"`
	LastMessageID    *string `json:"last_message_id,omitempty"`
	ID               string  `json:"id"`
	Flags            *int64  `json:"flags,omitempty"`
	ReadStateType    *int64  `json:"read_state_type,omitempty"`
	LastAckedID      *int64  `json:"last_acked_id,omitempty"`
	BadgeCount       *int64  `json:"badge_count,omitempty"`
}

type FingerprintResponse

type FingerprintResponse struct {
	Fingerprint string  `json:"fingerprint"`
	Assignments [][]any `json:"assignments"`
}

type FluffyGuildExperiment

type FluffyGuildExperiment struct {
	K []string `json:"k"`
	B int64    `json:"b"`
}

type FriendScience

type FriendScience struct {
	Token  string    `json:"token"`
	Events []ScEvent `json:"events"`
}

type Game

type Game struct {
	Name string `json:"name"`
	Type int64  `json:"type"`
}

type Guild

type Guild struct {
	Version                  int64            `json:"version"`
	Threads                  []interface{}    `json:"threads"`
	Stickers                 []interface{}    `json:"stickers"`
	StageInstances           []interface{}    `json:"stage_instances"`
	Roles                    []Role           `json:"roles"`
	Properties               Properties       `json:"properties"`
	PremiumSubscriptionCount int64            `json:"premium_subscription_count"`
	MemberCount              int64            `json:"member_count"`
	Lazy                     bool             `json:"lazy"`
	Large                    bool             `json:"large"`
	JoinedAt                 string           `json:"joined_at"`
	ID                       string           `json:"id"`
	GuildScheduledEvents     []interface{}    `json:"guild_scheduled_events"`
	Emojis                   []Emoji          `json:"emojis"`
	DataMode                 string           `json:"data_mode"`
	Channels                 []Channel        `json:"channels"`
	ApplicationCommandCounts map[string]int64 `json:"application_command_counts"`
}

type GuildVersions

type GuildVersions struct {
}

type HeaderConfig

type HeaderConfig struct {
	Info                           *PropInfo
	Join, Friend                   bool
	GuildID, ChannelID             string
	CaptchaKey, CaptchaRqtoken     string
	Referer                        string
	Fingerprint, ContextProperties string
	ContentType                    string
}

type HilariousGuildExperiment

type HilariousGuildExperiment struct {
	Integer     *int64
	String      *string
	StringArray []string
}

type HypesquadPayload

type HypesquadPayload struct {
	House int `json:"house_id"`
}

type IconEmoji

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

type IndecentGuildExperiment

type IndecentGuildExperiment struct {
	Bool                  *bool
	Integer               *int64
	PurpleGuildExperiment *PurpleGuildExperiment
	UnionArray            []HilariousGuildExperiment
}

type IndigoGuildExperiment

type IndigoGuildExperiment struct {
	Integer               *int64
	PurpleGuildExperiment *PurpleGuildExperiment
	UnionArray            []IndecentGuildExperiment
}

type InteractionPayload

type InteractionPayload struct {
	Type              int             `json:"type"`
	ApplicationID     string          `json:"application_id"`
	GuildID           string          `json:"guild_id"`
	ChannelID         string          `json:"channel_id"`
	SessionID         string          `json:"session_id"`
	Data              json.RawMessage `json:"data"`
	Nonce             string          `json:"nonce"`
	AnalyticsLocation string          `json:"analytics_location"`
}

type JoinPayload

type JoinPayload struct {
	SessionID string `json:"session_id"`
}

type JoinServerResponse

type JoinServerResponse struct {
	// in case of error
	Message        string   `json:"message"`
	CaptchaKey     []string `json:"captcha_key"`
	CaptchaSitekey string   `json:"captcha_sitekey"`
	CaptchaService string   `json:"captcha_service"`
	CaptchaRqdata  string   `json:"captcha_rqdata"`
	CaptchaRqtoken string   `json:"captcha_rqtoken"`

	Type      int `json:"type"`
	ExpiresAt any `json:"expires_at"`
	Guild     struct {
		ID                       string   `json:"id"`
		Name                     string   `json:"name"`
		Splash                   string   `json:"splash"`
		Banner                   string   `json:"banner"`
		Description              any      `json:"description"`
		Icon                     string   `json:"icon"`
		Features                 []string `json:"features"`
		VerificationLevel        int      `json:"verification_level"`
		VanityURLCode            string   `json:"vanity_url_code"`
		PremiumSubscriptionCount int      `json:"premium_subscription_count"`
		Nsfw                     bool     `json:"nsfw"`
		NsfwLevel                int      `json:"nsfw_level"`
		WelcomeScreen            struct {
			Description     string `json:"description"`
			WelcomeChannels []struct {
				ChannelID   string `json:"channel_id"`
				Description string `json:"description"`
				EmojiID     string `json:"emoji_id"`
				EmojiName   string `json:"emoji_name"`
			} `json:"welcome_channels"`
		} `json:"welcome_screen"`
	} `json:"guild"`
	Channel struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		Type int    `json:"type"`
	} `json:"channel"`
	NewMember bool `json:"new_member"`
}

type LockedResponse

type LockedResponse struct {
	Message string `json:"message"`
	Code    int    `json:"code"`
}

type MergedMember

type MergedMember struct {
	UserID                     string        `json:"user_id"`
	Roles                      []interface{} `json:"roles"`
	PremiumSince               interface{}   `json:"premium_since"`
	Pending                    bool          `json:"pending"`
	Nick                       interface{}   `json:"nick"`
	Mute                       bool          `json:"mute"`
	JoinedAt                   string        `json:"joined_at"`
	Flags                      int64         `json:"flags"`
	Deaf                       bool          `json:"deaf"`
	CommunicationDisabledUntil interface{}   `json:"communication_disabled_until"`
	Avatar                     interface{}   `json:"avatar"`
}

type OpLoginResponse

type OpLoginResponse struct {
	T  any `json:"t"`
	S  any `json:"s"`
	Op int `json:"op"`
	D  struct {
		HeartbeatInterval int      `json:"heartbeat_interval"`
		Trace             []string `json:"_trace"`
	} `json:"d"`
}

type PatchPayload

type PatchPayload struct {
	Date        string `json:"date_of_birth"`
	Email       string `json:"email"`
	Password    string `json:"password"`
	Avatar      string `json:"avatar"`
	DisplayName string `json:"global_name"`
	Username    string `json:"username"`
}

type PermissionOverwrite

type PermissionOverwrite struct {
	Type  int64  `json:"type"`
	ID    string `json:"id"`
	Deny  string `json:"deny"`
	Allow string `json:"allow"`
}

type Personalization

type Personalization struct {
	Consented bool `json:"consented"`
}

type Presence

type Presence struct {
	Status     string     `json:"status"`
	Since      int64      `json:"since"`
	Game       Game       `json:"game"`
	Activities []Activity `json:"activities"`
	Afk        bool       `json:"afk"`
}

type PropInfo

type PropInfo struct {
	Type int
}

type Properties

type Properties struct {
	MaxMembers                  int64       `json:"max_members"`
	SystemChannelFlags          int64       `json:"system_channel_flags"`
	AfkTimeout                  int64       `json:"afk_timeout"`
	DiscoverySplash             interface{} `json:"discovery_splash"`
	Icon                        *string     `json:"icon"`
	Features                    []string    `json:"features"`
	LatestOnboardingQuestionID  interface{} `json:"latest_onboarding_question_id"`
	ApplicationID               interface{} `json:"application_id"`
	NsfwLevel                   int64       `json:"nsfw_level"`
	PremiumTier                 int64       `json:"premium_tier"`
	ID                          string      `json:"id"`
	Nsfw                        bool        `json:"nsfw"`
	MaxStageVideoChannelUsers   int64       `json:"max_stage_video_channel_users"`
	Description                 interface{} `json:"description"`
	ExplicitContentFilter       int64       `json:"explicit_content_filter"`
	IncidentsData               interface{} `json:"incidents_data"`
	OwnerID                     string      `json:"owner_id"`
	PublicUpdatesChannelID      interface{} `json:"public_updates_channel_id"`
	InventorySettings           interface{} `json:"inventory_settings"`
	HomeHeader                  interface{} `json:"home_header"`
	SystemChannelID             *string     `json:"system_channel_id"`
	Splash                      *string     `json:"splash"`
	VanityURLCode               *string     `json:"vanity_url_code"`
	HubType                     interface{} `json:"hub_type"`
	MfaLevel                    int64       `json:"mfa_level"`
	RulesChannelID              interface{} `json:"rules_channel_id"`
	SafetyAlertsChannelID       interface{} `json:"safety_alerts_channel_id"`
	PreferredLocale             string      `json:"preferred_locale"`
	DefaultMessageNotifications int64       `json:"default_message_notifications"`
	Name                        string      `json:"name"`
	PremiumProgressBarEnabled   bool        `json:"premium_progress_bar_enabled"`
	MaxVideoChannelUsers        int64       `json:"max_video_channel_users"`
	VerificationLevel           int64       `json:"verification_level"`
	Banner                      *string     `json:"banner"`
	AfkChannelID                interface{} `json:"afk_channel_id"`
}

type PurpleGuildExperiment

type PurpleGuildExperiment struct {
	S int64 `json:"s"`
	E int64 `json:"e"`
}

type PurpleUser

type PurpleUser struct {
	Verified             bool        `json:"verified"`
	Username             string      `json:"username"`
	PurchasedFlags       int64       `json:"purchased_flags"`
	Pronouns             string      `json:"pronouns"`
	PremiumType          int64       `json:"premium_type"`
	Premium              bool        `json:"premium"`
	Phone                interface{} `json:"phone"`
	NsfwAllowed          bool        `json:"nsfw_allowed"`
	Mobile               bool        `json:"mobile"`
	MfaEnabled           bool        `json:"mfa_enabled"`
	ID                   string      `json:"id"`
	HasBouncedEmail      bool        `json:"has_bounced_email"`
	GlobalName           string      `json:"global_name"`
	Flags                int64       `json:"flags"`
	Email                interface{} `json:"email"`
	Discriminator        string      `json:"discriminator"`
	Desktop              bool        `json:"desktop"`
	Bio                  string      `json:"bio"`
	BannerColor          interface{} `json:"banner_color"`
	Banner               interface{} `json:"banner"`
	AvatarDecorationData interface{} `json:"avatar_decoration_data"`
	Avatar               interface{} `json:"avatar"`
	AccentColor          interface{} `json:"accent_color"`
}

type ReadState

type ReadState struct {
	Version int64   `json:"version"`
	Partial bool    `json:"partial"`
	Entries []Entry `json:"entries"`
}

type Register

type Register struct {
	Fingerprint   string `json:"fingerprint"`
	Username      string `json:"global_name"`
	Invite        string `json:"invite"`
	Consent       bool   `json:"consent"`
	GiftCodeSkuID any    `json:"gift_code_sku_id"`
}

type RegisterResponse

type RegisterResponse struct {
	// no captcha key provided
	CaptchaKey     []string `json:"captcha_key"`
	CaptchaSitekey string   `json:"captcha_sitekey"`
	CaptchaService string   `json:"captcha_service"`

	// success
	Token string `json:"token"`
}

type Reply

type Reply struct {
	T  string `json:"t"`
	S  int64  `json:"s"`
	Op int64  `json:"op"`
	D  D      `json:"d"`
}

type Request

type Request struct {
	Body     interface{}
	Response interface{}
	Endpoint string
	Header   http.Header
	Method   string
}

type Response

type Response struct {
	Status int
}

type Role

type Role struct {
	UnicodeEmoji interface{} `json:"unicode_emoji"`
	Tags         Tags        `json:"tags"`
	Position     int64       `json:"position"`
	Permissions  string      `json:"permissions"`
	Name         string      `json:"name"`
	Mentionable  bool        `json:"mentionable"`
	Managed      bool        `json:"managed"`
	ID           string      `json:"id"`
	Icon         interface{} `json:"icon"`
	Hoist        bool        `json:"hoist"`
	Flags        int64       `json:"flags"`
	Color        int64       `json:"color"`
}

type ScEvent

type ScEvent struct {
	Type       string       `json:"type"`
	Properties ScProperties `json:"properties"`
}

type ScProperties

type ScProperties struct {
	UptimeApp                      int    `json:"uptime_app"`
	ClientRtcState                 string `json:"client_rtc_state"`
	ClientAppState                 string `json:"client_app_state"`
	CaptchaEventName               string `json:"captcha_event_name"`
	CaptchaFlowKey                 string `json:"captcha_flow_key"`
	CaptchaService                 string `json:"captcha_service"`
	SiteKey                        string `json:"sitekey"`
	ClientTrackTimestamp           int64  `json:"client_track_timestamp"`
	ClientHeartbeatSessionID       string `json:"client_heartbeat_session_id"`
	TotalCompressedByteSize        int64  `json:"total_compressed_byte_size,omitempty"`
	TotalUncompressedByteSize      int64  `json:"total_uncompressed_byte_size,omitempty"`
	TotalTransferByteSize          int64  `json:"total_transfer_byte_size,omitempty"`
	JSCompressedByteSize           int64  `json:"js_compressed_byte_size,omitempty"`
	JSUncompressedByteSize         int64  `json:"js_uncompressed_byte_size,omitempty"`
	JSTransferByteSize             int64  `json:"js_transfer_byte_size,omitempty"`
	CSSCompressedByteSize          int64  `json:"css_compressed_byte_size,omitempty"`
	CSSUncompressedByteSize        int64  `json:"css_uncompressed_byte_size,omitempty"`
	CSSTransferByteSize            int64  `json:"css_transfer_byte_size,omitempty"`
	LoadID                         string `json:"load_id,omitempty"`
	ScreenName                     string `json:"screen_name,omitempty"`
	DurationMSSinceAppOpened       int64  `json:"duration_ms_since_app_opened,omitempty"`
	ClientPerformanceMemory        int64  `json:"client_performance_memory"`
	AccessibilityFeatures          int64  `json:"accessibility_features"`
	RenderedLocale                 string `json:"rendered_locale"`
	AccessibilitySupportEnabled    bool   `json:"accessibility_support_enabled"`
	ClientUUID                     string `json:"client_uuid"`
	ClientSendTimestamp            int64  `json:"client_send_timestamp"`
	CompressedByteSize             int64  `json:"compressed_byte_size,omitempty"`
	UncompressedByteSize           int64  `json:"uncompressed_byte_size,omitempty"`
	CompressionAlgorithm           string `json:"compression_algorithm,omitempty"`
	PackingAlgorithm               string `json:"packing_algorithm,omitempty"`
	UnpackDurationMS               int64  `json:"unpack_duration_ms,omitempty"`
	IdentifyTotalServerDurationMS  int64  `json:"identify_total_server_duration_ms,omitempty"`
	IdentifyAPIDurationMS          int64  `json:"identify_api_duration_ms,omitempty"`
	IdentifyGuildsDurationMS       int64  `json:"identify_guilds_duration_ms,omitempty"`
	NumGuilds                      int64  `json:"num_guilds,omitempty"`
	NumGuildChannels               int64  `json:"num_guild_channels,omitempty"`
	NumGuildCategoryChannels       int64  `json:"num_guild_category_channels,omitempty"`
	PresencesSize                  int64  `json:"presences_size,omitempty"`
	UsersSize                      int64  `json:"users_size,omitempty"`
	ReadStatesSize                 int64  `json:"read_states_size,omitempty"`
	PrivateChannelsSize            int64  `json:"private_channels_size,omitempty"`
	UserSettingsSize               int64  `json:"user_settings_size,omitempty"`
	ExperimentsSize                int64  `json:"experiments_size,omitempty"`
	UserGuildSettingsSize          int64  `json:"user_guild_settings_size,omitempty"`
	RelationshipsSize              int64  `json:"relationships_size,omitempty"`
	RemainingDataSize              int64  `json:"remaining_data_size,omitempty"`
	GuildChannelsSize              int64  `json:"guild_channels_size,omitempty"`
	GuildMembersSize               int64  `json:"guild_members_size,omitempty"`
	GuildPresencesSize             int64  `json:"guild_presences_size,omitempty"`
	GuildRolesSize                 int64  `json:"guild_roles_size,omitempty"`
	GuildEmojisSize                int64  `json:"guild_emojis_size,omitempty"`
	GuildThreadsSize               int64  `json:"guild_threads_size,omitempty"`
	GuildStickersSize              int64  `json:"guild_stickers_size,omitempty"`
	GuildEventsSize                int64  `json:"guild_events_size,omitempty"`
	GuildFeaturesSize              int64  `json:"guild_features_size,omitempty"`
	GuildRemainingDataSize         int64  `json:"guild_remaining_data_size,omitempty"`
	SizeMetricsDurationMS          int64  `json:"size_metrics_duration_ms,omitempty"`
	DurationMSSinceIdentifyStart   int64  `json:"duration_ms_since_identify_start,omitempty"`
	DurationMSSinceConnectionStart int64  `json:"duration_ms_since_connection_start,omitempty"`
	DurationMSSinceEmitStart       int64  `json:"duration_ms_since_emit_start,omitempty"`
	IsReconnect                    bool   `json:"is_reconnect,omitempty"`
	IsFastConnect                  bool   `json:"is_fast_connect,omitempty"`
	DidForceClearGuildHashes       bool   `json:"did_force_clear_guild_hashes,omitempty"`
	IdentifyUncompressedByteSize   int64  `json:"identify_uncompressed_byte_size,omitempty"`
	IdentifyCompressedByteSize     int64  `json:"identify_compressed_byte_size,omitempty"`
	HadCacheAtStartup              bool   `json:"had_cache_at_startup,omitempty"`
	UsedCacheAtStartup             bool   `json:"used_cache_at_startup,omitempty"`
	TabOpened                      string `json:"tab_opened,omitempty"`
	NoticeType                     string `json:"notice_type,omitempty"`
}

type SendMessagePayload

type SendMessagePayload struct {
	MobileNetworkType string `json:"mobile_network_type"`
	Content           string `json:"content"`
	Nonce             string `json:"nonce"`
	Tts               bool   `json:"tts"`
	Flags             int    `json:"flags"`
}

type SendMessageResponse

type SendMessageResponse struct {
	ID        string `json:"id"`
	Type      int    `json:"type"`
	Content   string `json:"content"`
	ChannelID string `json:"channel_id"`
	Author    struct {
		ID                   string      `json:"id"`
		Username             string      `json:"username"`
		Avatar               string      `json:"avatar"`
		Discriminator        string      `json:"discriminator"`
		PublicFlags          int         `json:"public_flags"`
		Flags                int         `json:"flags"`
		Banner               interface{} `json:"banner"`
		AccentColor          int         `json:"accent_color"`
		GlobalName           string      `json:"global_name"`
		AvatarDecorationData interface{} `json:"avatar_decoration_data"`
		BannerColor          string      `json:"banner_color"`
	} `json:"author"`
	Attachments       []interface{} `json:"attachments"`
	Embeds            []interface{} `json:"embeds"`
	Mentions          []interface{} `json:"mentions"`
	MentionRoles      []interface{} `json:"mention_roles"`
	Pinned            bool          `json:"pinned"`
	MentionEveryone   bool          `json:"mention_everyone"`
	Tts               bool          `json:"tts"`
	Timestamp         time.Time     `json:"timestamp"`
	EditedTimestamp   interface{}   `json:"edited_timestamp"`
	Flags             int           `json:"flags"`
	Components        []interface{} `json:"components"`
	Nonce             string        `json:"nonce"`
	ReferencedMessage interface{}   `json:"referenced_message"`
}

type Session

type Session struct {
	Status     string        `json:"status"`
	SessionID  string        `json:"session_id"`
	ClientInfo ClientInfo    `json:"client_info"`
	Activities []interface{} `json:"activities"`
}

type SetBirthResponse

type SetBirthResponse struct {
	ID                   string `json:"id"`
	Username             string `json:"username"`
	Avatar               string `json:"avatar"`
	Discriminator        string `json:"discriminator"`
	PublicFlags          int    `json:"public_flags"`
	Flags                int    `json:"flags"`
	Banner               any    `json:"banner"`
	AccentColor          int    `json:"accent_color"`
	GlobalName           string `json:"global_name"`
	AvatarDecorationData any    `json:"avatar_decoration_data"`
	BannerColor          string `json:"banner_color"`
	MfaEnabled           bool   `json:"mfa_enabled"`
	Locale               string `json:"locale"`
	PremiumType          int    `json:"premium_type"`
	Email                string `json:"email"`
	Verified             bool   `json:"verified"`
	Token                string `json:"token"`
	Phone                any    `json:"phone"`
	NsfwAllowed          bool   `json:"nsfw_allowed"`
	LinkedUsers          []any  `json:"linked_users"`
	Bio                  string `json:"bio"`
	AuthenticatorTypes   []any  `json:"authenticator_types"`
	ErrorCode            any    `json:"code,omitempty"`
	ErrorMessage         any    `json:"message,omitempty"`
	Errors               any    `json:"errors,omitempty"`
}

type SetProfilPayload

type SetProfilPayload struct {
	Bio         string `json:"bio"`
	Pronouns    string `json:"pronouns"`
	AccentColor int    `json:"accent_color"`
}

type SetProfilResponse

type SetProfilResponse struct {
	Bio         string `json:"bio"`
	AccentColor int    `json:"accent_color"`
	Pronouns    string `json:"pronouns"`
}

type StickyGuildExperiment

type StickyGuildExperiment struct {
	Integer    *int64
	UnionArray []IndigoGuildExperiment
}

type TData

type TData struct {
	T  string `json:"t"`
	S  int64  `json:"s"`
	Op int64  `json:"op"`
}

type Tags

type Tags struct {
	BotID             *string     `json:"bot_id,omitempty"`
	PremiumSubscriber interface{} `json:"premium_subscriber"`
}

type TentacledGuildExperiment

type TentacledGuildExperiment struct {
	FluffyGuildExperiment *FluffyGuildExperiment
	UnionArrayArrayArray  [][][]StickyGuildExperiment
}

type Timestamps

type Timestamps struct {
	End int64 `json:"end"`
}

type Tutorial

type Tutorial struct {
	IndicatorsSuppressed bool     `json:"indicators_suppressed"`
	IndicatorsConfirmed  []string `json:"indicators_confirmed"`
}

type UserElement

type UserElement struct {
	Username             string      `json:"username"`
	PublicFlags          int64       `json:"public_flags"`
	ID                   string      `json:"id"`
	GlobalName           string      `json:"global_name"`
	DisplayName          string      `json:"display_name"`
	Discriminator        string      `json:"discriminator"`
	Bot                  bool        `json:"bot"`
	AvatarDecorationData interface{} `json:"avatar_decoration_data"`
	Avatar               interface{} `json:"avatar"`
}

type VerifyEmailPayload

type VerifyEmailPayload struct {
	Jwt string `json:"token"`
}

type VerifyResponse

type VerifyResponse struct {
	Token  string `json:"token"`
	UserID string `json:"user_id"`
}

type WsData

type WsData struct {
	Op int64 `json:"op"`
	D  any   `json:"d"`
}

type XProp

type XProp struct {
	Os                     string `json:"os"`
	Browser                string `json:"browser"`
	Device                 string `json:"device"`
	SystemLocale           string `json:"system_locale"`
	BrowserUserAgent       string `json:"browser_user_agent"`
	BrowserVersion         string `json:"browser_version"`
	OsVersion              string `json:"os_version"`
	Referrer               string `json:"referrer"`
	ReferringDomain        string `json:"referring_domain"`
	ReferrerCurrent        string `json:"referrer_current"`
	ReferringDomainCurrent string `json:"referring_domain_current"`
	ReleaseChannel         string `json:"release_channel"`
	ClientBuildNumber      int    `json:"client_build_number"`
	ClientEventSource      any    `json:"client_event_source"`
}

Jump to

Keyboard shortcuts

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