users.go 911 B

12345678910111213141516171819202122232425262728
  1. package discordgo
  2. type User struct {
  3. Id int `json:"id,string"`
  4. Email string `json:"email"`
  5. Username string `json:"username"`
  6. Avatar string `json:"Avatar"`
  7. Verified bool `json:"verified"`
  8. //Discriminator int `json:"discriminator,string"` // TODO: See below
  9. }
  10. // Discriminator sometimes comes as a string
  11. // and sometimes it comes as a int. Weird.
  12. // to avoid errors I've just commented it out
  13. // but it doesn't seem to just kill the whole
  14. // program. Heartbeat is taken on READY even
  15. // with error and the system continues to read
  16. // it just doesn't seem able to handle this one
  17. // field correctly. Need to research this more.
  18. type PrivateChannel struct {
  19. Id int `json:"id,string"`
  20. IsPrivate bool `json:"is_private"`
  21. LastMessageId int `json:"last_message_id,string"`
  22. Recipient User `json:"recipient"`
  23. } // merge with channel?
  24. // PM function to PM a user.