sendingnetwork-bot-sdk
Version:
TypeScript/JavaScript SDK for SDN bots
40 lines • 891 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SDNEvent = void 0;
/**
* A SDN event.
* @category SDN events
*/
class SDNEvent {
constructor(event) {
this.event = event;
}
/**
* The user ID who sent this event.
*/
get sender() {
return this.event['sender'];
}
/**
* The type of this event.
*/
get type() {
return this.event['type'];
}
/**
* The content for this event. May have no properties.
*/
get content() {
return this.event['content'] || {};
}
/**
* Gets the raw event that this SDNEvent is using.
* Note that there's no guarantees on formats here - it is the exact
* same input to the constructor.
*/
get raw() {
return this.event;
}
}
exports.SDNEvent = SDNEvent;
//# sourceMappingURL=Event.js.map