-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
105 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
# AdvancedUserTelegramBot | ||
# PyConsoleMenu | ||
![Language](https://img.shields.io/badge/Language-Python3.10+-blue.svg?style=flat) | ||
[![BUILD-STATUS](https://github.com/BaggerFast/AdvancedUserTelegramBot/workflows/CI/badge.svg)](https://github.com/BaggerFast/AdvancedUserTelegramBot/actions) | ||
|
||
This is a telegram bot that creates a user bot for each user. | ||
The user bot allows you to use custom animations in any chat. | ||
Animations are divided into paid and free | ||
|
||
|
||
-------- | ||
|
||
## Example: | ||
[<img src="assets/preview.gif" width="639" height="235.5" alt="preview"/>](assets/preview.gif) | ||
|
||
## Tech Stack 💻 | ||
|
||
- **Languages:** | ||
- Python 3.10 | ||
- **Telegram:** | ||
- [Aiogram](https://docs.aiogram.dev/en/latest/) - for main bot | ||
- [Pyrogram](https://docs.pyrogram.org/) - for user bot | ||
- **Database:** | ||
- Sqlite3 | ||
- [Sqlalchemy](https://docs.sqlalchemy.org/en/14/) | ||
- **Payment:** | ||
- [Yookassa](https://yookassa.ru/developers) | ||
- **Debug:** | ||
- Pylint | ||
- Loguru | ||
-------- | ||
|
||
## Installation 💾 | ||
|
||
[QUICK START](markdown/quick_start.md?) | ||
|
||
-------- | ||
|
||
## Code Guide👋 | ||
|
||
[GUIDE](markdown/examples.md?) | ||
|
||
-------- |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Code Guide | ||
|
||
### To understand the architecture of the application, watch this [VIDEO](https://www.youtube.com/watch?v=W-0YoEYBSwU&t=23s) | ||
|
||
## [Main Bot](../telegram_bot/main.py) | ||
1. [Setup config.py](../telegram_bot/utils/config.py): | ||
- PRICE - price for vip access | ||
- HELPER_URL - telegram username (@username) for help btn | ||
- BOT_URL - this bot username (@bot) for advert in free commands | ||
- VIP_HELP_URL - site url for view vip help commands | ||
- VIP_HELP_URL - site url for view free help commands | ||
|
||
2. Add user commands [HERE](../telegram_bot/handlers/user/main.py) | ||
3. Add admin commands [HERE](../telegram_bot/handlers/admin/main.py) | ||
|
||
4. If you want to change the payment system, edit this [FILE](../telegram_bot/handlers/user/buy_vip.py) | ||
-------- | ||
|
||
## [User Bot](../user_bot/main.py) | ||
1. [Setup config.py](../user_bot/utils/config.py): | ||
- PREFIX - sign for commands (.hello) | ||
|
||
2. Add Free commands [HERE](../user_bot/handlers/common/main.py) | ||
3. Add Vip commands [HERE](../user_bot/handlers/vip/main.py) | ||
|
||
-------- | ||
|
||
### [BACK](../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# QUICK_START | ||
|
||
1. Clone project | ||
2. Create a virtual venv | ||
3. Install requirements: | ||
``` | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
``` | ||
4. [Setup environment variables](https://stackoverflow.com/questions/42708389/how-to-set-environment-variables-in-pycharm): | ||
- [TOKEN](https://telegram.me/BotFather) | ||
- [ADMIN_ID](https://telegram.me/myidbot) | ||
- [API_HASH](https://my.telegram.org/) | ||
- [API_ID](https://my.telegram.org/) | ||
- [SHOP_ID](https://yookassa.ru/) | ||
- [SHOP_TOKEN](https://yookassa.ru/) | ||
|
||
|
||
5. Run run.py | ||
6. When you first start your bot, use the /admin command (if you set ADMIN_ID) | ||
-------- | ||
|
||
### [BACK](../README.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
# Telegram | ||
Pyrogram~=2.0.41 | ||
aiogram~=2.22.1 | ||
|
||
Pyrogram | ||
aiogram | ||
|
||
# Database | ||
SQLAlchemy~=1.4.40 | ||
SQLAlchemy | ||
|
||
# Debug | ||
pylint_runner | ||
loguru~=0.6.0 | ||
loguru | ||
|
||
# Other | ||
asyncio~=3.4.3 | ||
asyncio | ||
tgcrypto | ||
|
||
|
||
yookassa~=2.3.2 | ||
#Payment | ||
yookassa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/python | ||
from user_bot import start_user_bot | ||
|
||
if __name__ == '__main__': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters