Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 24, 2022 01: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/71a36950941538cc50b18c6f87125bb3 to your computer and use it in GitHub Desktop.
Save parzibyte/71a36950941538cc50b18c6f87125bb3 to your computer and use it in GitHub Desktop.
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