UNPKG

@wilcosp/rex

Version:

Rex is an automated command manager for discord js

32 lines (31 loc) 1.16 kB
"use strict"; /*! * 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/. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.RexAutoCompleteInteraction = void 0; const interactionBase_js_1 = require("../interactionBase.js"); const optionsResolver_js_1 = require("./optionsResolver.js"); class RexAutoCompleteInteraction extends interactionBase_js_1.RexInteractionBase { constructor(inter) { super(inter); this.options = new optionsResolver_js_1.RexSlashInteractionOptionsResolver(this.inter.options); } get responded() { return this.inter.responded; } respond(...choices) { return this.inter.respond(choices.flat().slice(0, 25)); } respondNormalized(...choices) { return this.inter.respond(choices .flat() .map(i => { return { value: i.toString(), name: i.toString() }; }) .slice(0, 25)); } } exports.RexAutoCompleteInteraction = RexAutoCompleteInteraction;