Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Nov 24, 2022
Embed
What would you like to do?
bot.on('photo', async (msg) => {
const caption = msg.caption;
if (!caption || !msg.photo || msg.photo.length <= 0) {
return;
}
const chatId = msg.chat.id;
const opciones = [
"hazle un globo de texto",
"hacer un globo de texto",
"haga un globo de texto",
"poner un globo de texto",
"ponga un globo de texto",
];
for (const opcion of opciones) {
if (caption.toLowerCase().includes(opcion)) {
// Aquí ponemos el globo de texto
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment