UNPKG

@sapphire/plugin-pattern-commands

Version:

Plugin for @sapphire/framework that adds support for pattern commands.

30 lines (28 loc) 904 B
import { __name, __publicField } from '../../chunk-2JTKI4GS.mjs'; import { Command } from '@sapphire/framework'; var _PatternCommand = class _PatternCommand extends Command { constructor(context, options) { super(context, options); __publicField(this, "chance"); __publicField(this, "weight"); __publicField(this, "matchFullName"); this.chance = options.chance ?? 100; if (options.weight) { if (options.weight < 0) { this.weight = 0; } else if (options.weight > 10) { this.weight = 10; } else { this.weight = options.weight; } } else { this.weight = 5; } this.matchFullName = options.matchFullName ?? false; } }; __name(_PatternCommand, "PatternCommand"); var PatternCommand = _PatternCommand; export { PatternCommand }; //# sourceMappingURL=PatternCommand.mjs.map //# sourceMappingURL=PatternCommand.mjs.map