Skip to content

gicrisf/qrbot

Repository files navigation

QR Code Telegram Bot

A Telegram bot that generates QR codes.

Users can send any text, and the bot will create a QR code in either PNG or SVG format.

Commands

  • /start - display the welcome message.
  • /help - show the help message with instructions.
  • /settings - configure the QR code format (PNG or SVG).

Installation

Clone the repository:

git clone https://github.com/gicrisf/qrbot.git
cd qrbot

Install dependencies:

npm install

Set up environment variables:

  • Create a .env file in the root directory.
  • Add your Telegram bot token:
TELEGRAM_TOKEN=your_telegram_bot_token

Run the bot:

npm start

Tests

To run the tests for this bot, ensure you have Bun installed. Once Bun is set up, simply execute the following command in your terminal:

bun test

This will run all the test cases defined in the provided test suite, ensuring the bot’s functionality is working as expected. No additional setup is required beyond having Bun installed.

Docker

Build the Docker Image (in the root directory):

docker build -t qrbot .

Run the Docker Container:

docker run -d --name qrbot-container qrbot

Pass the token using the -e flag:

docker run -d --name qrbot-container -e "TELEGRAM_TOKEN=your_token" qrbot

Your bot should now be running inside the Docker container. To monitor the bot’s logs, use:

docker logs -f qrbot-container

License

This project is licensed under the MIT License.

Acknowledgments

About

A Telegram bot that generates QR codes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published