Browse Source

Merge 154e1d8507 into dae10ef47a

pull/21/merge
r3t4rd3d 8 years ago
committed by GitHub
parent
commit
f7fd52c506
  1. 83
      docs/types/USER.md

83
docs/types/USER.md

@ -0,0 +1,83 @@
# User
## User
Represents the user object.
### Attributes
Name | Type | Description
---- | ---- | -----------
`id` | `snowflake` | The ID of this user
`username` | `str` | The name of the user
`avatar` | `str` | The user's avatar hash
`discriminator` | `str` | The user's discriminator (4-digit discord-tag)
`bot` | `bool` | Whether this user is a bot
`verified` | `bool` | Whether the email on this account has been verified
`email` | `str` | The user's email address
### Properties
#### default\_avatar
Retruns the Default (colored discord logo) avatar URL of the user.
#### avatar\_url
Returns the avatar URL of the user.
#### mention
Returns a formated string that mentions the user.
### Methods
#### get\_avatar\_url(`fmt='webp'`, `size=1024`)
Returns the URL of the user's avatar in a specific format and size.
##### Arguments:
Name | Type | Description
---- | ---- | -----------
`fmt` | `str` | Imageformat of the avatar
`size` | `int` | Size of the avatar
## Presence
Represents the Presence of a user.
### Attributes
Name | Type | Description
---- | ---- | -----------
`user` | [User](USER.md#user-1) |
`game` | [Game](USER.md#game) | The user's current activity
`status` | [Status](USER.md#status)(enum) | The user's current status
## Game
Represents the activity of a user.
### Attributes
Name | Type | Description
---- | ---- | -----------
`type` | [GameType](USER.md#gametype)(enum) | Whether the user is just playing the game or streaming it.
`name` | `str` | Name of the game
`url` | `str` | Stream URL. Only validated when `GameType` is `STREAMING`.
## Enums
User specific Enumerations
### Status
* `ONLINE`
* `IDLE`
* `DND` (Do not Disturb)
* `OFFLINE`
### GameType
* `DEFAULT` (Playing ...)
* `STREAMING` (Streaming ...)
Loading…
Cancel
Save