@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
54 lines (53 loc) • 1.31 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Warning = void 0;
const Base_1 = require("./Base");
/**
* Represents a warning.
*/
class Warning extends Base_1.Base {
/**
* The data of the warning returned by the API.
*/
data;
/**
* Creates a new instance of a warning.
* @param chatbot The current instance of the chatbot.
* @param data The data of the warning returned by the API.
*/
constructor(chatbot, data) {
super(chatbot);
this.data = data;
}
/**
* The Id of the channel's broadcaster where the user received the warning.
*/
get broadcasterId() {
return this.data.broadcaster_id;
}
/**
* The Id of the chatroom where the warning was received.
*/
get chatroomId() {
return this.data.broadcaster_id;
}
/**
* The Id of the user who received the warning.
*/
get userId() {
return this.data.user_id;
}
/**
* The Id of the moderator who warned the user.
*/
get moderatorId() {
return this.data.moderator_id;
}
/**
* The reason for the warning.
*/
get reason() {
return this.data.reason;
}
}
exports.Warning = Warning;