This project is a Node.js Telegraf (Telegram) bot to {}.
This is the code powering @bibliotrentobot.
Once you cloned the repository:
you need to enter into project dir: cd bibliotrentobot
and type npm install
to install all dependencies.
Create a config.js
file in the root of this project with the following info:
module.exports = {
// API key for Telegram
token:'YOUR_TELEGRAM_API_KEY'
};
For Telegram API key, check https://github.com/Finalgalaxy/telegram-telegraf-bot and follow README instructions about how to create a Telegram Bot.
Once you've set up your API key, just type:
npm start
...done!
For easier deployment you can also use the docker image
docker pull albertoxamin/bibliotrentobot
docker run -it -e "token=YOUR_TELEGRAM_API_KEY" \
-v storage_path:/usr/src/app/storage \
--name bibliotrentobot albertoxamin/bibliotrentobot
where storage_path
is something like this ~/biblio
and inside that folder add a db.json