Feedback Bot is a Telegram bot designed to provide feedback and assistance. This bot is built using Python and the pytelegrambotapi
library. You are welcome to contribute and help improve this bot. Visit our GitHub page for more details.
This bot does not use a database; instead, I aimed to make the bot as simple as possible for use. For adding users to the blacklist, I used a JSON file, but you can customize this as needed. The bot supports both polling and webhook modes.
- Python 3.11+
- Poetry for dependency management
pytelegrambotapi
library
-
Clone the repository:
git clone https://github.com/adam-kad/feedbackbot.git cd feedbackbot
-
Install Poetry:
Follow the instructions on the Poetry installation page.
-
Install dependencies:
poetry install
-
Set up your Telegram bot:
-
Create a new bot using BotFather and obtain your bot token.
-
Create a file named
.env
in thefeedbackbot/config
directory and add your bot token and other configuration settings:TELEGRAM_BOT_TOKEN=your_bot_token_here TELEGRAM_WEBHOOK_URL=https://your-webhook-url-here TELEGRAM_WEBHOOK_PORT=8000 TELEGRAM_GROUP_ID=-2323434
-
-
Configure webhook (optional):
-
If you are developing locally and want to use webhooks, you need to expose your local server to the internet. You can use ngrok for this purpose. Download and install ngrok, then run:
ngrok http 8000
-
Use the generated ngrok URL as your
TELEGRAM_WEBHOOK_URL
andTELEGRAM_WEBHOOK_PORT
in the.env
file.
-
-
Run the bot in polling mode:
poetry run python -m bot.main
-
Run the bot in webhook mode:
poetry run python -m bot.main --webhook
We invite you to contribute and help make this bot better.
This project is licensed under the MIT License. See the LICENSE file for details.
Best regards, Feedback Bot