-
Notifications
You must be signed in to change notification settings - Fork 3
User Class
CreativeBuilds edited this page Jun 8, 2019
·
4 revisions
Can be found inside of a Message object
const User = require("dlive-js/src/classes/User");
new User(dliveUserObject, permissionObj) // Returns a dlive-js User object| name | returns | description |
|---|---|---|
| id | string | dlive id for the user (not very useful) |
| blockchainUsername | string | an id of the user that cant be changed, and is their "lino username" (very helpful) |
| dliveUsername | string | referred to as "displayname" by dlive, this is what normally shows on a users screen when you send a message |
| avatar | string(url) | jpg or png link to the avatar of the user |
| partnerStatus | string | different values if the user is partnered or not |
| name | returns | description |
|---|---|---|
| getPermissionObj | Function() -> PermissionObj | returns the permission object that was passed into it on creation |
| sendLino | Function(amount, ?memo) -> Promise | sends lino to that user Note you have to have set a blockchainPrivKey on initiation in order for this to work returns a lino transaction object upon completion. |
| getLinoBalance | Function() -> Promise | gets the lino balance for the user |
| timeout | Function(streamerDliveUsername) -> Promise | Takes a channel username and times the userout for 5 minutes |
| mod | Function() -> Promise | mods the current user in the channel of the account thats signed into. |
| unmod | Function() -> Promise | unmods the current user in the channel of the account thats signed into. |
| mute | Function(streamerBlockchainUsername) -> Promise | Bans the user from chat and deletes their messages |
| unmute | Function(streamerBlockchainUsername) -> Promise | Pardons the User from chat if they've been banned |