@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
21 lines • 665 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BigIntegerOptionResolver = void 0;
const eris_1 = require("eris");
const OptionType_1 = require("../constants/OptionType");
class BigIntegerOptionResolver {
constructor() {
this.option = OptionType_1.OptionType.BIG_INTEGER;
this.convert = eris_1.Constants.ApplicationCommandOptionTypes.STRING;
}
async resolve(ctx, option, text) {
try {
return BigInt(text);
}
catch {
return null;
}
}
}
exports.BigIntegerOptionResolver = BigIntegerOptionResolver;
//# sourceMappingURL=BigIntegerOption.js.map