fix: correct OPTS error code (#190)
If an unknown option is given, the response should be 501
This commit is contained in:
@@ -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}}',
|
||||
|
||||
Reference in New Issue
Block a user