Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
ContentType *string `json:"content_type,omitempty" example:"image/png"` // File mime type
Filename string `json:"filename" example:"image.png"` // File name
Height *int64 `json:"height,omitempty" example:"600"` // Image dimensions in pixels
Width *int64 `json:"width,omitempty" example:"800"` // Image dimensions in pixels
URL string `json:"url" example:"https://example.com/image.png"` // URL to download the file
PreviewURL *string `json:"preview_url,omitempty" example:"https://example.com/image_preview.webp"` // Preview URL for image/video
Size int64 `json:"size" example:"1000000"` // FileSize in bytes
}
type AttachmentUpload ¶
type Avatar ¶ added in v1.5.0
type Avatar struct {
Id int64 `json:"id" example:"2230469276416868352"`
URL string `json:"url" example:"https://cdn.example.com/avatars/2230/2231.webp"`
ContentType *string `json:"content_type,omitempty" example:"image/webp"`
Width *int64 `json:"width,omitempty" example:"128"`
Height *int64 `json:"height,omitempty" example:"128"`
Size int64 `json:"size" example:"245678"`
}
Avatar represents a stored avatar item with its ID and metadata
type AvatarData ¶ added in v1.5.0
type AvatarData struct {
Id int64 `json:"id" example:"2230469276416868352"`
URL string `json:"url" example:"https://cdn.example.com/avatars/2230/2231.webp"`
ContentType *string `json:"content_type,omitempty" example:"image/webp"`
Width *int64 `json:"width,omitempty" example:"128"`
Height *int64 `json:"height,omitempty" example:"128"`
Size int64 `json:"size" example:"245678"`
}
AvatarData is returned with user profile to describe active avatar
type AvatarUpload ¶ added in v1.5.0
type Channel ¶
type Channel struct {
Id int64 `json:"id" example:"2230469276416868352"` // Channel ID
Type model.ChannelType `json:"type" example:"0"` // Channel type
GuildId *int64 `json:"guild_id,omitempty" example:"2230469276416868352"` // Guild ID channel was created in
ParticipantId *int64 `json:"participant_id,omitempty" example:"2230469276416868352"` // For DM channels: the other participant's user ID
Name string `json:"name" example:"channel-name"` // Channel name, without spaces
ParentId *int64 `json:"parent_id,omitempty" example:"2230469276416868352"` // Parent channel id
Position int `json:"position" example:"4"` // Channel position
Topic *string `json:"topic" example:"Just a channel topic"` // Channel topic.
Permissions *int64 `json:"permissions,omitempty"` // Permissions. Check the permissions documentation for more info.
Private bool `json:"private" default:"false"` // Whether the channel is private. Private channels can only be seen by users with roles assigned to this channel.
Roles []int64 `json:"roles,omitempty" example:"2230469276416868352"` // Roles IDs
LastMessageId int64 `json:"last_message_id" example:"2230469276416868352"` // ID of the last message in the channel
CreatedAt time.Time `json:"created_at"` // Timestamp of channel creation
}
type ChannelOrder ¶
type Guild ¶
type Guild struct {
Id int64 `json:"id" example:"2230469276416868352"` // Guild ID
Name string `json:"name" example:"My Guild"` // Guild Name
Icon *Icon `json:"icon,omitempty"` // Icon metadata
Owner int64 `json:"owner" example:"2230469276416868352"` // Owner ID
Public bool `json:"public" default:"false"` // Whether the guild is public
Permissions int64 `json:"permissions" default:"7927905"` // Default guild Permissions. Check the permissions documentation for more info.
}
type GuildInvite ¶
type Icon ¶ added in v1.5.0
type Icon struct {
Id int64 `json:"id" example:"2230469276416868352"`
URL string `json:"url" example:"https://cdn.example.com/icons/2230/2231.webp"`
Filesize int64 `json:"filesize" example:"12345"`
Width int64 `json:"width" example:"128"`
Height int64 `json:"height" example:"128"`
}
Icon is a full guild icon description returned in guild payloads
type IconUpload ¶ added in v1.5.0
type IconUpload struct {
Id int64 `json:"id" example:"2230469276416868352"`
GuildId int64 `json:"guild_id" example:"2230469276416868352"`
}
IconUpload describes newly created guild icon placeholder
type IndexDeleteMessage ¶
type IndexMessage ¶
type IndexMessage struct {
MessageId int64 `json:"message_id"`
UserId int64 `json:"user_id"`
ChannelId int64 `json:"channel_id"`
GuildId *int64 `json:"guild_id"`
// Mentions contains users IDs
Mentions []int64 `json:"mentions"`
// Has is a list of features that the message contains (url, image, video, file)
Has []string `json:"has"`
Type int `json:"type"`
Content string `json:"content"`
}
IndexMessage is a structure with message data that the search engine will index and search by
type InvitePreview ¶
type Member ¶
type Member struct {
User User `json:"user"` // Guild member data
Username *string `json:"username" example:"FancyUserName"` // Username in this guild
Avatar *int64 `json:"avatar" example:"2230469276416868352"` // Avatar ID
JoinAt time.Time `json:"join_at"` // Join date
Roles []int64 `json:"roles,omitempty" example:"2230469276416868352"` // List of assigned role IDs
}
type Message ¶
type Message struct {
Id int64 `json:"id" example:"2230469276416868352"` // Message ID
ChannelId int64 `json:"channel_id" example:"2230469276416868352"` // Channel id the message was sent to
Author User `json:"author"`
Content string `json:"content" example:"Hello world!"`
Attachments []Attachment `json:"attachments,omitempty"`
Type int `json:"type" example:"0"`
UpdatedAt *time.Time `json:"updated_at,omitempty"` // Timestamp of the last message edit
}
type Role ¶
type Role struct {
Id int64 `json:"id" example:"2230469276416868352"` // Role ID
GuildId int64 `json:"guild_id" example:"2230469276416868352"` // Guild ID
Name string `json:"name" example:"role-name"` // Role name
Color int `json:"color"` // Role color. Will change username color. Represent RGB color in one Integer value.
Permissions int64 `json:"permissions"` // Role permissions. Check the permissions documentation for more info.
}
Click to show internal directories.
Click to hide internal directories.