Skip to content

jvmistica/telegram-assistant

Repository files navigation

telegram-assistant

Build status Coverage

A telegram bot that allows users to manage their inventory - items and recipes. Initially made to prevent food stored in the far reaches of my kitchen cabinet and fridge from going to waste.

Running the Server Locally

  1. Install and run PostgreSQL
  2. Create a user, password, and database
  3. Set the values for the environment variables or simply enter the commands below in the terminal:
export POSTGRES_HOST=<postgres_host>
export POSTGRES_PORT=<postgres_port>
export POSTGRES_USER=<user>
export POSTGRES_PASS=<password>
export POSTGRES_DB=<postgres_db>
export BOT_TOKEN=<telegram-bot-token>
  1. Run the server with make run

Commands

/start                                - List the available commands  
/listitems                            - List items in your inventory  
/listitems sort by <field> asc        - List items in your inventory in ascending order  
/listitems sort by <field> desc       - List items in your inventory in descending order  
/listitems filter by <field> = <text> - List filtered items in your inventory (operations can be =, >, <, >=, <=, <>)  
/showitem                             - Show prompt for entering the item to be shown  
/showitem <item>                      - Show an item's details  
/additem                              - Show prompt for entering the item to be added  
/additem <item>                       - Add an item to your inventory  
/updateitem                           - Show prompt for entering the item to be updated  
/updateitem <item> <field> <value>    - Update an item in your inventory  
/deleteitem                           - Show prompt for entering the item to be deleted  
/deleteitem <item>                    - Delete an item in your inventory    
/importitems                          - Import records from a CSV file 

Usage

Adding the bot to a chat for the first time will present you with a START button. Upon clicking it, the Menu button will become available and clicking it will show a list of commands accepted by the bot. image

Listing and adding items
image

Updating and showing items
image image

Deleting items
image

About

A telegram bot that allows you to list, add, update, and delete items in your inventory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published