@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
29 lines • 1.12 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.InteractionCommandContext = exports.MessageCommandContext = void 0;
const InteractionContext_1 = require("../contexts/InteractionContext");
const MessageContext_1 = require("../contexts/MessageContext");
class MessageCommandContext extends MessageContext_1.MessageContext {
constructor(api, message, command) {
super(api, message);
this.command = command;
}
async deleteExecutionMessage() {
return this.message.delete();
}
}
exports.MessageCommandContext = MessageCommandContext;
class InteractionCommandContext extends InteractionContext_1.InteractionContext {
constructor(api, interaction, command) {
super(api, interaction);
this.command = command;
}
async deleteExecutionMessage() {
if (!this.interaction.acknowledged)
await this.defer();
this.responseId = null;
return this.interaction.deleteOriginalMessage();
}
}
exports.InteractionCommandContext = InteractionCommandContext;
//# sourceMappingURL=CommandContext.js.map