| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | const middlware = require('../lib/structure/AbstractMiddleware') |
||
| 3 | setUp (client, next) { |
||
| 4 | this.client = client |
||
| 5 | var register = client.createRegister('core', 'core') |
||
| 6 | register.textCommand('help', null, function (req, res) { |
||
| 7 | var message = 'This command was instantied inside a middleware\n' |
||
| 8 | client.registers.forEach(function (register) { |
||
| 9 | message += '__' + register.name + '__:\n' |
||
| 10 | register.forEach(function (command) { |
||
| 11 | message += '`' + command.name + '` ' |
||
| 12 | }) |
||
| 13 | message += '\n' |
||
| 14 | }) |
||
| 15 | res.send(message) |
||
| 16 | }) |
||
| 17 | register.textCommand('block', null, function (req, res) { |
||
| 18 | // this will be blocked |
||
| 19 | }) |
||
| 20 | register.textCommand('exception', null, function (req, res) { |
||
| 21 | // this will be blocked |
||
| 22 | }) |
||
| 23 | next() |
||
| 24 | } |
||
| 25 | handle (req, res, next) { |
||
| 40 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.