users.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package discordgo
  2. // A User stores all data for an individual Discord user.
  3. type User struct {
  4. ID string `json:"id"`
  5. Email string `json:"email"`
  6. Username string `json:"username"`
  7. Avatar string `json:"Avatar"`
  8. Verified bool `json:"verified"`
  9. //Discriminator int `json:"discriminator,string"` // TODO: See below
  10. }
  11. // Discriminator sometimes comes as a string
  12. // and sometimes it comes as a int. Weird.
  13. // to avoid errors I've just commented it out
  14. // but it doesn't seem to just kill the whole
  15. // program. Heartbeat is taken on READY even
  16. // with error and the system continues to read
  17. // it just doesn't seem able to handle this one
  18. // field correctly. Need to research this more.
  19. // A PrivateChannel stores all data for a specific user private channel.
  20. type PrivateChannel struct {
  21. ID string `json:"id"`
  22. IsPrivate bool `json:"is_private"`
  23. LastMessageID string `json:"last_message_id"`
  24. Recipient User `json:"recipient"`
  25. } // merge with channel?
  26. // A Settings stores data for a specific users Discord client settings.
  27. type Settings struct {
  28. RenderEmbeds bool `json:"render_embeds"`
  29. InlineEmbedMedia bool `json:"inline_embed_media"`
  30. EnableTtsCommand bool `json:"enable_tts_command"`
  31. MessageDisplayCompact bool `json:"message_display_compact"`
  32. Locale string `json:"locale"`
  33. ShowCurrentGame bool `json:"show_current_game"`
  34. Theme string `json:"theme"`
  35. MutedChannels []string `json:"muted_channels"`
  36. }