added server struct.

This commit is contained in:
5elenay 2021-08-23 08:24:52 +03:00
parent 68e7355db8
commit b9c3edb138

32
server.go Normal file
View File

@ -0,0 +1,32 @@
package revoltgo
// Server struct.
type Server struct {
Id string `json:"_id"`
Nonce string `json:"nonce"`
OwnerId string `json:"owner"`
Name string `json:"name"`
Description string `json:"description"`
ChannelIds []string `json:"channels"`
Categories []*ServerCategories `json:"categories"`
SystemMessages *SystemMessages `json:"system_messages"`
Roles map[string]interface{} `json:"roles"`
DefaultPermissions []interface{} `json:"default_permissions"`
Icon *Attachment `json:"icon"`
Banner *Attachment `json:"banner"`
}
// Server categories struct.
type ServerCategories struct {
Id string `json:"id"`
Title string `json:"title"`
ChannelIds []string `json:"channels"`
}
// System messages struct.
type SystemMessages struct {
UserJoined string `json:"user_joined"`
UserLeft string `json:"user_left"`
UserKicked string `json:"user_kicker"`
UserBanned string `json:"user_banned"`
}