command-parser/tests/CommandOption.test.js
Navy.gif 6e00ba118a
Some checks failed
continuous-integration/drone/push Build is failing
v1.4.0
2023-04-16 16:43:27 +03:00

28 lines
532 B
JavaScript

import { Parser, Command, CommandOption, OptionType } from '../build/esm'
const opt = new CommandOption({
name: 'text',
type: OptionType.STRING
});
class TestCommand extends Command {
constructor() {
super({
name: 'test',
options: [opt]
})
}
};
const parser = new Parser({
commands: [new TestCommand()],
resolver: null
});
(async () => {
const parsed = await parser.parseMessage('test message.author')
// console.log(parsed)
})();
test('', () => {
})