-
-
Save parzibyte/c71c82306e1eaca36ff5bb1d40bf3a97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bot.onText(new RegExp('\/insertar (\\d+|\\w+)'), async (mensaje, coincidencias) => { | |
const nombre = coincidencias[1]; | |
const chatId = mensaje.chat.id; | |
const nombreUsuario = mensaje.from.first_name; | |
const timestampMensaje = mensaje.date; | |
await controlador.insertar(nombre, nombreUsuario, timestampMensaje); | |
bot.sendMessage(chatId, nombreUsuario + " quiere insertar mascota llamada " + nombre); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment