mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-04-29 09:25:58 +00:00
12 lines
470 B
JavaScript
12 lines
470 B
JavaScript
// start command handler
|
|
module.exports = function(bot, msg) {
|
|
const chatId = msg.chat.id;
|
|
const userName = msg.from.first_name;
|
|
const userId = msg.from.id;
|
|
|
|
const message = `Hello! I am Lynx!\nI was made with love by Lucas Gabriel (lucmsilva)!\n\nSee /help for the bot commands!`
|
|
|
|
bot.sendMessage(chatId, message)
|
|
.catch(error => console.error('ERROR: Message cannot be send:', error));
|
|
console.log(`INFO: /start executed by ${userName}, ${userId}`)
|
|
} |