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
Size int64 `json:"size" example:"1000000"` // FileSize in bytes
}
type AttachmentUpload ¶
type AttachmentUpload struct {
Id int64 `json:"id" example:"2230469276416868352"` // Attachment ID
ChannelId int64 `json:"channel_id" example:"2230469276416868352"` // Channel ID the attachment was sent to
FileName string `json:"file_name" example:"image.png"` // File name
UploadURL string `json:"upload_url"` // Upload URL. S3 presigned URL
}
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
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
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 *int64 `json:"icon" example:"2230469276416868352"` // Icon ID
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 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"`
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"`
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.