@globalart/nestcord
Version:
A module for creating Discord bots using NestJS, based on Discord.js
21 lines (20 loc) • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NestCordParamsFactory = void 0;
const nestcord_paramtype_enum_1 = require("./nestcord-paramtype.enum");
class NestCordParamsFactory {
exchangeKeyForValue(type, data, args) {
if (!args) {
return null;
}
switch (type) {
case nestcord_paramtype_enum_1.NestCordParamType.CONTEXT:
return args[0];
case nestcord_paramtype_enum_1.NestCordParamType.DISCOVERY:
return args[1];
default:
return null;
}
}
}
exports.NestCordParamsFactory = NestCordParamsFactory;