Помогите пожалуйста!
Установил программу Node.js, потом создал папку, установил в нее сервер nvm (команда npm init), далее туда же установил библиотеку для взаимодействия с API Telegram (команда npm install --save node-telegram-bot-api), далее написал код:
const TelegramBot = require('node-telegram-bot-api');
// replace the value below with the Telegram token you receive from @BotFather
const token = '557333979:AAHSjnUAVLoYXtoh5-DSEf_d64JmcJLTHqk';
// Create a bot that uses 'polling' to fetch new updates
const bot = new TelegramBot(token, {polling: true});
// Matches "/echo [whatever]"
bot.onText(/\/echo (.+)/, (msg, match) => {
// 'msg' is the received Message from Telegram
// 'match' is the result of executing the regexp above on the text content
// of the message
const chatId = msg.chat.id;
const resp = match[1]; // the captured "whatever"
// send back the matched "whatever" to the chat
bot.sendMessage(chatId, resp);
});
// Listen for any kind of message. There are different kinds of
// messages.
bot.on('message', (msg) => {
const chatId = msg.chat.id;
// send a message to the chat acknowledging receipt of their message
bot.sendMessage(chatId, 'Received your message');
});
Потом выводит ошибку, но бот работает:
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated. In the future, you will have to enable it yourself. See https://github.com/yagop/node-telegram-bot-api/issues/319. module.js:652:30
Кофе для программистов: как напиток влияет на продуктивность кодеров?
Рекламные вывески: как привлечь внимание и увеличить продажи
Стратегії та тренди в SMM - Технології, що формують майбутнє сьогодні
Выделенный сервер, что это, для чего нужен и какие характеристики важны?
Современные решения для бизнеса: как облачные и виртуальные технологии меняют рынок
Изучаю Animatecss и хочу понять на наглядном примере, как реализовать следующую задачу:
Не могу понять в чем проблема пытаюсь запустить сборку gulp и выдает эту ошибкуВот ссылка на сборку https://github
Каким образом можно сделать свой аудио плеер на js? Мне не очень не нравятся "дефолтные" плееры в браузерахТакже можете указать готовые плееры