user.go 632 B

1234567891011121314151617181920212223
  1. package discordgo
  2. import (
  3. "fmt"
  4. )
  5. // A User stores all data for an individual Discord user.
  6. type User struct {
  7. ID string `json:"id"`
  8. Email string `json:"email"`
  9. Username string `json:"username"`
  10. Avatar string `json:"avatar"`
  11. Discriminator string `json:"discriminator"`
  12. Token string `json:"token"`
  13. Verified bool `json:"verified"`
  14. MFAEnabled bool `json:"mfa_enabled"`
  15. Bot bool `json:"bot"`
  16. }
  17. //String returns a unique identifier of the form username#discriminator
  18. func (u *User) String() string {
  19. return fmt.Sprintf("%s#%s", u.Username, u.Discriminator)
  20. }