fix: correct OPTS error code (#190)

If an unknown option is given, the response should be 501
This commit is contained in:
Tyler Stewart
2020-01-07 09:39:22 -07:00
committed by GitHub
parent b2b1b2a0d3
commit c59e191a39

View File

@@ -13,7 +13,7 @@ module.exports = {
const [_option, ...args] = command.arg.split(' ');
const option = _.toUpper(_option);
if (!OPTIONS.hasOwnProperty(option)) return this.reply(500);
if (!OPTIONS.hasOwnProperty(option)) return this.reply(501, 'Unknown option command');
return OPTIONS[option].call(this, args);
},
syntax: '{{cmd}}',