Browse Source

Moving structures to structs.go to clean up client file some.
Will probably move these all into individual files later

Bruce Marriner 10 năm trước cách đây
mục cha
commit
49ca49f6de
1 tập tin đã thay đổi với 67 bổ sung0 xóa
  1. 67 0
      structs.go

+ 67 - 0
structs.go

@@ -0,0 +1,67 @@
+package discordgo
+
+type Server struct {
+	Afk_timeout int
+	Joined_at   string
+	// Afk_channel_id int `json:",string"`
+	Id   int `json:",string"`
+	Icon string
+	Name string
+	//	Roles          []Role
+	Region string
+	//Embed_channel_id int `json:",string"`
+	//	Embed_channel_id string
+	//	Embed_enabled    bool
+	Owner_id int `json:",string"`
+}
+
+type Role struct {
+	Permissions int
+	Id          int `json:",string"`
+	Name        string
+}
+
+type Channel struct {
+	Guild_id        int `json:",string"`
+	Id              int `json:",string"`
+	Name            string
+	Last_message_id string
+	Is_private      string
+
+	//	Permission_overwrites string
+	//	Position              int `json:",string"`
+	//	Type                  string
+}
+
+type Message struct {
+	Attachments      []Attachment
+	Tts              bool
+	Embeds           []Embed
+	Timestamp        string
+	Mention_everyone bool
+	Id               int `json:",string"`
+	Edited_timestamp string
+	Author           *Author
+	Content          string
+	Channel_id       int `json:",string"`
+	Mentions         []Mention
+}
+
+type Mention struct {
+}
+
+type Attachment struct {
+}
+
+type Embed struct {
+}
+
+type Author struct {
+	Username      string
+	Discriminator int `json:",string"`
+	Id            int `json:",string"`
+	Avatar        string
+}
+
+type User struct {
+}