Send image on help

This commit is contained in:
Lucas Gabriel 2024-06-01 19:00:18 -03:00
parent 876b1b7f34
commit de29c8cd6b
No known key found for this signature in database
GPG Key ID: D9B075FC6DC93985

View File

@ -2,6 +2,7 @@ module.exports = function(bot, msg) {
const chatId = msg.chat.id; const chatId = msg.chat.id;
const userName = msg.from.first_name; const userName = msg.from.first_name;
const userId = msg.from.id; const userId = msg.from.id;
const lynxPhoto = 'https://graph.org/file/a77382dab4d62ba626806.jpg'
const message = `Hi! I am Lynx!\nI am a simple bot made entirely from scratch in Node.js by Lucas Gabriel (lucmsilva).\n\nSome commands to test: const message = `Hi! I am Lynx!\nI am a simple bot made entirely from scratch in Node.js by Lucas Gabriel (lucmsilva).\n\nSome commands to test:
/start: start the bot /start: start the bot
@ -12,7 +13,7 @@ module.exports = function(bot, msg) {
/gay: check if you are a gay\n\nSee my source code in: /gay: check if you are a gay\n\nSee my source code in:
https://github.com/lucmsilva651/lynx.\n\nThanks to all users, testers, contributors, and others. Without you, perhaps this bot wouldn't be possible ❤️`; https://github.com/lucmsilva651/lynx.\n\nThanks to all users, testers, contributors, and others. Without you, perhaps this bot wouldn't be possible ❤️`;
bot.sendMessage(chatId, message, {disable_web_page_preview: true}) bot.sendPhoto(chatId, lynxPhoto, { caption: message })
.catch(error => console.error('ERROR: Message cannot be send:', error)); .catch(error => console.error('ERROR: Message cannot be send:', error));
console.log(`INFO: /help executed by ${userName}, ${userId}`); console.log(`INFO: /help executed by ${userName}, ${userId}`);
} }