18 lines
660 B
JavaScript
18 lines
660 B
JavaScript
/*
|
|
* Хэндлинг команды start
|
|
*/
|
|
const errorHandler = require("../utils/error-handler");
|
|
const functions = require("../utils/functions");
|
|
const keyboards = require("../utils/keyboards");
|
|
|
|
module.exports = bot => async msg => {
|
|
try {
|
|
const opts = { //Опции (клавиатура и т.д.)
|
|
parse_mode: 'Markdown' //Форматирование текста
|
|
};
|
|
await bot.sendMessage(msg.chat.id, await functions.genStartText(msg.from), opts);
|
|
bot.sendSticker(msg.chat.id, "CAACAgIAAxkBAAIFF2LxHJ4PO_MJruorbcq7M57p3t5RAAIPBwACWiM9C-6cSIsHEOb3KQQ")
|
|
} catch (error) {
|
|
errorHandler(bot, msg.chat.id, error);
|
|
}
|
|
}; |