-
Notifications
You must be signed in to change notification settings - Fork 3
Gift Class
CreativeBuilds edited this page May 5, 2019
·
4 revisions
Can be found from listening to messages.
const Gift = require("dlive-js/src/classes/Gift");
new Gift(dliveMessageObject, streamerBlockchainusername, permissionObj) // Returns a dlive-js GiftObject| name | returns | description |
|---|---|---|
| id | string | dlive id for the message |
| content | string | Empty string |
| streamerBlockchainUsername | string | an id of the streamer that cant be changed, and is their "lino username" |
| sender | User | returns a dlive-js User object of the user who sent the message |
| roomRole | string | the role of the user who sent the message in the room |
| type | string | the type of Message object, can be Follow, Message, or Gift |
| createdAt | timestamp in ms | the current time when the message was received by the client (not really the time the message was actually made) |
| gift | string | type of gift that was sent, can be LEMON, ICE_CREAM, DIAMOND, NINJAGHINI, NINJET |
| amount | number | amount of gifts sent ex: 1 lemon was sent, amount is 1, gift is lemon |
| inLino | number | the actual amount of lino that was donated |
| profit | number | the amount of lino the streamer gained after the %9.01 |
| name | returns | description |
|---|---|---|
| getPermissionObj | Function() -> PermissionObj | returns the permission object that was passed into it on creation |