Self¶
Summary¶
The Self object is basically an extended version of the User object with the exception that it contains additional information, specifically about your own account.
The difference between the User class and the Self class is that it’s basically an extended User class sporting following additional fields:
- blurb
- guest
- ignores
- notifications
- pp
- pw
- settings
- xp
All the same best practices work for the Self class that work for the User class.
Model¶
{
"avatarID": "",
"badge": "",
"blurb": "",
"friends": [],
"gRole": -1,
"id": -1,
"ignores": [],
"joined": "Invalid Date",
"language": "",
"level": -1,
"notifications": [],
"pp": -1,
"pw": false,
"role": -1,
"settings": Settings,
"silver": false,
"slug": "",
"sub": -1,
"username": ""
"xp": -1,
}
Detail¶
- avatarID
User’s avatar, i.e. “animals01”.
Type: String
Default Value:""
- badge
User’s badge, i.e. “bt-og”.
Type: String
Default Value:""
- blurb
Message shown on profile page.
Type: String
Default Value:""
- friends
Your friends.
Type: [Number]
Default Value:[]
- gRole
Global role on plug.
Type: Number
Default Value:-1
- id
Unique identifier for user.
Type: Number
Default Value: -1- ignores
Ignored users.
Type: [Ignore]
Default Value:[]
- joined
Date and time of joining plug.
Type: String
Default Value:"Invalid Date"
- level
The experience level on plug
Type: Number
Default Value: -1- language
Language used, represented by ISO 639-1 encoding. See: Wikipedia
Type: String
Default Value:""
- notifications
Notifications received by plug.
Type: [Notification]
Default Value:[]
- pp
Total plug points gained
Type: Number
Default Value:-1
- pw
Account uses a password instead of a token
Type: Boolean
Default Value:false
- role
Room wide role on plug.
Note
Role won’t be set before you join a room since it’s dependent on the room you are in and gets set by plugged rather than plug. This is for convinience reasons.
Type: Number
Default Value:-1
- settings
Your personal Settings on plug.dj, for example if chat images are enabled etc.
Type: Settings
Default Value:see Settings model
- silver
User has a silver subscription level
Type: Boolean
Default Value:false
- slug
URL conform representation of the username, used for the profile link.
Type: String
Default Value:""
- sub
Subscription status
Type: Number
Default Value:-1
- username
User’s name.
Type: String
Default Value:""
- xp
Total experience points gained on plug
Type: Number
Default Value:-1