@wilcosp/rex
Version:
Rex is an automated command manager for discord js
34 lines (33 loc) • 1.07 kB
JavaScript
/*!
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { RexModalSubmitInteraction } from "../modal/modalSubmit.js";
import { RexUpdateReplyInteractionBase } from "../replyUpdateBase.js";
export class RexComponentInteractionBase extends RexUpdateReplyInteractionBase {
constructor(inter, opt) {
super(inter, opt);
}
get message() {
return this.inter.message;
}
get component() {
return this.inter.component;
}
get componentType() {
return this.inter.componentType;
}
get customId() {
return this.inter.customId;
}
get version() {
return this.inter.version;
}
showModal(modal) {
return this.asignLastRequest(this.inter.showModal(modal));
}
awaitModalSubmit(options) {
return this.inter.awaitModalSubmit(options).then(modalInter => new RexModalSubmitInteraction(modalInter));
}
}