Skip to content

Commit

Permalink
Nuevo error para comando "micro"
Browse files Browse the repository at this point in the history
  • Loading branch information
Lautauro committed Feb 5, 2024
1 parent 608c119 commit edd601a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/commands/commands_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ createCommand(['micro', 'm'], async (args, message) => {
send_error_response(error, message);
});
} else {
send_error_response('Debe indicar un número de parada.', message);
if (typeof args[0] == 'number') {
await send_error_response('Debe indicar un número de parada.', message);
} else {
await send_error_response('Argumentos erróneos. La línea del colectivo debe ser un número.', message);
}
// @ts-ignore
const example = command_example(search_command('micro'));
send_response(example, message);
Expand Down Expand Up @@ -110,7 +114,7 @@ createCommand(['parada', 'p'], async (args, message) => {
send_error_response(error, message);
});
} else {
send_error_response('Debe indicar un número de parada.', message);
await send_error_response('Debe indicar un número de parada.', message);
// @ts-ignore
const example = command_example(search_command('parada'));
send_response(example, message);
Expand Down

0 comments on commit edd601a

Please sign in to comment.