UNPKG

@twurple/eventsub-base

Version:

Base for the other Twurple EventSub packages

43 lines (42 loc) 1.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EventSubChannelHypeTrainSharedParticipant = void 0; const tslib_1 = require("tslib"); const common_1 = require("@twurple/common"); /** * The broadcaster participating in the shared Hype Train. */ let EventSubChannelHypeTrainSharedParticipant = class EventSubChannelHypeTrainSharedParticipant extends common_1.DataObject { constructor(data, _client) { super(data); this._client = _client; } /** * The ID of the broadcaster participating in the shared Hype Train. */ get broadcasterId() { return this[common_1.rawDataSymbol].broadcaster_user_id; } /** * The name of the broadcaster participating in the shared Hype Train. */ get broadcasterName() { return this[common_1.rawDataSymbol].broadcaster_user_login; } /** * The display name of the broadcaster participating in the shared Hype Train. */ get broadcasterDisplayName() { return this[common_1.rawDataSymbol].broadcaster_user_name; } /** * Gets more information about the broadcaster. */ async getBroadcaster() { return (0, common_1.checkRelationAssertion)(await this._client.users.getUserById(this[common_1.rawDataSymbol].broadcaster_user_id)); } }; exports.EventSubChannelHypeTrainSharedParticipant = EventSubChannelHypeTrainSharedParticipant; exports.EventSubChannelHypeTrainSharedParticipant = EventSubChannelHypeTrainSharedParticipant = tslib_1.__decorate([ (0, common_1.rtfm)('eventsub-base', 'EventSubChannelHypeTrainSharedParticipant', 'broadcasterId') ], EventSubChannelHypeTrainSharedParticipant);