This is a shopping list Telegram Bot that I made to help me and my family manage grocery shopping. To deploy a similar bot using this code, follow these instructions:
- Get an API token from BotFather on Telegram
git clone
this repository- Go to the project's root and run
export BOT_TOKEN={YOUR_API_TOKEN}
- Run
npm install
to install dependencies - Run
node src/SuperMercadoBot.js
to start your bot
+
adds items to the list. To add potatoes, for example, say + potatoes
. It works with item lists too, separated with commas. + potatoes, ketchup, rice
.
-
removes an item from the list. To remove potatoes, for example, say - potatoes
. Current version does not support removing more than one item.
mostrar lista
gets the current shopping list.
apagar lista
empties the current shopping list.
recuperar lista
prints the last emptied list. Should be used as a backup when a list is emptied without being supposed to.
Made with Nodejs using the Telegraf Framework, deployed to my Digital Ocean server using pm2.