Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 5, 2022 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3f0a70e3eb2c665e3ccdfbf9d57527fd to your computer and use it in GitHub Desktop.
Save parzibyte/3f0a70e3eb2c665e3ccdfbf9d57527fd to your computer and use it in GitHub Desktop.
bot.onText(new RegExp('\/eliminar (\\d+)'), async (mensaje, coincidencias) => {
const id = parseInt(coincidencias[1]);
const chatId = mensaje.chat.id;
await controlador.eliminar(id);
bot.sendMessage(chatId, "Eliminar con id " + id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment