diff --git a/index.js b/index.js index ea2ac0c..1af25fe 100644 --- a/index.js +++ b/index.js @@ -61,11 +61,9 @@ matrixClient.on('Room.timeline', function(event, room, resetTimeline) { } project = project[1]; - let command = commands[project]; + const command = commands[project]; if(command !== undefined) { - const command = commands[project]; - const args = body.match(command.regex); if(args === null) { matrixClient.sendNotice(room.roomId, 'usage: ' + command.usage);