gregpr07 / toogoodtogo-bot

TooGooToGo-Bot is a tool that notifies you about the availability of your favorite stores on the Too Good To Go platform. It sends notifications through Telegram or Windows notifications, allowing you to quickly find and purchase food items before they are gone.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TooGooToGo-Bot

TooGooToGo-Bot is a tool that notifies you about the availability of your favorite stores. It sends notifications through Telegram or Windows notifications.

Table of Contents

Introduction

TooGooToGo-Bot is a tool designed to help you stay updated on the availability of your favorite stores on the Too Good To Go platform. It provides notifications through Telegram or Windows notifications, allowing you to quickly find and purchase food items before they are gone.

Installation

Prerequisites

Clone the Repository

git clone https://github.com/Achaak/toogoodtogo-bot.git
cd toogoodtogo-bot/

Configure Environment Variables

  1. Make a copy of the sample environment file and enter your parameters:
    cp .env .env.local
  2. Open .env.local in a text editor and fill in the required information.

Install Dependencies

yarn install

Build the Project

yarn run build

Start the Application

yarn start

Update

To update the application, follow these steps:

  1. Get the latest files:

    git pull
  2. Install any new dependencies:

    yarn install
  3. Rebuild the project:

    yarn run build

Run with Docker

You can also run the application using Docker. Follow these steps:

  1. Build the Docker image:

    docker build . -t <your desired username>/togoodtogobot
  2. Run the Docker image:

    docker run -p 3000:3000 -d <your desired username>/togoodtogobot

Configuring Telegram Notifications

To configure Telegram notifications, follow these steps:

  1. Open a Telegram chat with BotFather and enter the /start command.

  2. Select the /newbot command and follow the instructions to create a new bot. Take note of the token access provided.

  3. Once your bot is created, multiple users can use it to receive notifications about their favorite stocks.

  4. To start receiving notifications, send the /start command in your bot's conversation.

Commands

  • /start: Starts Telegram notifications
  • /stop: Stops Telegram notifications
  • /help: Provides a list of usable commands

PM2 Configuration

PM2 allows you to install the bot on a server and receive notifications 24/7. Follow these steps:

  1. Install PM2:

    yarn install pm2 -g
  2. Start the server:

    pm2 start start.sh
  3. After logging in:

    pm2 ls # to see the process_id
    pm2 attach your_process_id
    # Press Enter to submit your registration

Change Log

See the CHANGELOG.md file for the change log.

Credits

Thanks to node-toogoodtogo-watcher for providing the API path and some information.

License

This project is licensed under the MIT License.

About

TooGooToGo-Bot is a tool that notifies you about the availability of your favorite stores on the Too Good To Go platform. It sends notifications through Telegram or Windows notifications, allowing you to quickly find and purchase food items before they are gone.

License:MIT License


Languages

Language:TypeScript 98.9%Language:Dockerfile 1.0%Language:Shell 0.1%