2022-10-16 21:35:09 +03:00
|
|
|
# HoloCheckerBot
|
|
|
|
|
2022-10-23 13:13:12 +03:00
|
|
|
Small Telegram bot made on Pyrogram
|
|
|
|
|
2022-10-23 17:22:25 +03:00
|
|
|
## What can this bot do?
|
|
|
|
|
|
|
|
* Get user applications
|
|
|
|
* Send applications to the admins
|
|
|
|
* Give one-time links to join group
|
|
|
|
* Track down users that were not allowed to join
|
|
|
|
* Show applications to other users
|
2022-12-13 11:44:44 +02:00
|
|
|
* Manage YouTube sponsorships [WIP]
|
|
|
|
* Send and receive messages to users using bot [WIP]
|
2022-10-23 17:22:25 +03:00
|
|
|
|
2022-10-23 13:13:12 +03:00
|
|
|
## Installation
|
|
|
|
|
|
|
|
1. `git clone https://git.end-play.xyz/profitroll/HoloCheckerBot.git`
|
|
|
|
2. `cd HoloCheckerBot`
|
|
|
|
3. Install Python 3.7+ (at least 3.9 is recommended) for your OS
|
|
|
|
4. `python3 -m pip install -r requirements.txt`
|
|
|
|
5. Run it with `python3 main.py` after configuring
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
So bot has its "config_example.json" and it needs to be changed.
|
|
|
|
Copy this file to "config.json" and open it with any text editor.
|
|
|
|
|
|
|
|
You can see config file with all the comments below:
|
|
|
|
|
2022-10-23 13:15:11 +03:00
|
|
|
```json
|
2022-10-23 13:13:12 +03:00
|
|
|
{
|
2022-12-06 14:22:55 +02:00
|
|
|
"locale": "uk",
|
|
|
|
"debug": false,
|
|
|
|
"owner": 0,
|
|
|
|
"age_allowed": 0,
|
|
|
|
"api": "http://example.com",
|
|
|
|
"inline_preview_count": 7,
|
|
|
|
"remove_application_time": -1,
|
2023-01-03 16:48:33 +02:00
|
|
|
"search_radius": 50,
|
2022-12-06 14:22:55 +02:00
|
|
|
"admins": [],
|
2023-01-04 20:14:02 +02:00
|
|
|
"groups": {
|
|
|
|
"admin": 0,
|
|
|
|
"users": 0
|
|
|
|
},
|
2022-10-23 13:13:12 +03:00
|
|
|
"bot": {
|
2022-12-06 14:22:55 +02:00
|
|
|
"api_id": 0,
|
|
|
|
"api_hash": "",
|
|
|
|
"bot_token": ""
|
2022-10-23 13:13:12 +03:00
|
|
|
},
|
2022-12-13 11:44:44 +02:00
|
|
|
"database": {
|
|
|
|
"user": null,
|
|
|
|
"password": null,
|
|
|
|
"host": "127.0.0.1",
|
|
|
|
"port": 27017,
|
|
|
|
"name": "holochecker"
|
|
|
|
},
|
2022-12-14 15:52:12 +02:00
|
|
|
"geocoding": {
|
|
|
|
"username": "demo"
|
|
|
|
},
|
2022-10-23 13:13:12 +03:00
|
|
|
"logging": {
|
2022-12-06 14:22:55 +02:00
|
|
|
"size": 512,
|
|
|
|
"location": "logs"
|
2022-10-23 13:13:12 +03:00
|
|
|
},
|
2023-01-03 22:36:26 +02:00
|
|
|
"features": {
|
2023-01-04 20:14:02 +02:00
|
|
|
"general": {
|
|
|
|
"enabled": true
|
|
|
|
},
|
2023-01-03 22:36:26 +02:00
|
|
|
"applications": {
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"sponsorships": {
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"warnings": {
|
2023-01-04 22:56:37 +02:00
|
|
|
"enabled": true
|
2023-01-03 22:36:26 +02:00
|
|
|
},
|
|
|
|
"invites_check": {
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"dinovoice": {
|
|
|
|
"enabled": false
|
2023-01-04 22:56:37 +02:00
|
|
|
},
|
|
|
|
"spoilers": {
|
|
|
|
"enabled": true
|
2023-01-03 22:36:26 +02:00
|
|
|
}
|
|
|
|
},
|
2022-12-13 11:44:44 +02:00
|
|
|
"scheduler": {
|
|
|
|
"birthdays": {
|
|
|
|
"time": 9,
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"sponsorships": {
|
|
|
|
"time": 9,
|
|
|
|
"enabled": true
|
2023-01-03 16:48:33 +02:00
|
|
|
},
|
|
|
|
"cache_avatars": {
|
|
|
|
"interval": 6,
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"cache_members": {
|
|
|
|
"interval": 30,
|
|
|
|
"enabled": true
|
|
|
|
},
|
|
|
|
"cache_admins": {
|
|
|
|
"interval": 120,
|
|
|
|
"enabled": true
|
2022-12-13 11:44:44 +02:00
|
|
|
}
|
|
|
|
},
|
2022-10-23 13:13:12 +03:00
|
|
|
"locations": {
|
2022-12-06 14:22:55 +02:00
|
|
|
"cache": "cache",
|
|
|
|
"locale": "locale"
|
2023-01-03 22:36:26 +02:00
|
|
|
},
|
|
|
|
"commands": {
|
|
|
|
"rules": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"general"
|
|
|
|
]
|
|
|
|
},
|
2023-01-04 22:56:37 +02:00
|
|
|
"spoiler": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"spoilers"
|
|
|
|
]
|
|
|
|
},
|
2023-01-03 22:36:26 +02:00
|
|
|
"cancel": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
2023-01-04 22:56:37 +02:00
|
|
|
"spoilers",
|
2023-01-03 22:36:26 +02:00
|
|
|
"applications",
|
|
|
|
"sponsorships"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"nearby": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins",
|
|
|
|
"group_users",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"warn": {
|
|
|
|
"permissions": [
|
|
|
|
"group_users"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"warnings"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"reapply": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"sponsorship": {
|
|
|
|
"permissions": [
|
|
|
|
"users",
|
|
|
|
"admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"sponsorships"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"reboot": {
|
|
|
|
"permissions": [
|
2023-01-05 13:44:13 +02:00
|
|
|
"owner"
|
2023-01-03 22:36:26 +02:00
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"general"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"label": {
|
|
|
|
"permissions": [
|
|
|
|
"admins",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"message": {
|
|
|
|
"permissions": [
|
|
|
|
"admins",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"general"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"identify": {
|
|
|
|
"permissions": [
|
|
|
|
"admins",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications",
|
|
|
|
"sponsorships"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"application": {
|
|
|
|
"permissions": [
|
|
|
|
"admins",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"applications": {
|
|
|
|
"permissions": [
|
|
|
|
"admins",
|
|
|
|
"group_admins"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"applications"
|
|
|
|
]
|
2023-01-05 13:44:13 +02:00
|
|
|
},
|
|
|
|
"resetcommands": {
|
|
|
|
"permissions": [
|
|
|
|
"owner"
|
|
|
|
],
|
|
|
|
"modules": [
|
|
|
|
"general"
|
|
|
|
]
|
2023-01-03 22:36:26 +02:00
|
|
|
}
|
2022-10-23 13:13:12 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
After all of that you're good to go! Happy using :)
|
2022-10-24 14:29:23 +03:00
|
|
|
|
|
|
|
## To-Do
|
|
|
|
|
2023-01-03 16:47:44 +02:00
|
|
|
* [ ] Stats and infographics
|
|
|
|
* [ ] Check group members without completed application
|
2023-01-04 22:56:54 +02:00
|
|
|
* [x] Replicate some functions of @spoilerobot
|
2023-01-02 12:17:17 +02:00
|
|
|
* [x] Check sponsorship on Holo girls
|
|
|
|
* [x] /nearby command
|
2022-12-21 13:26:50 +02:00
|
|
|
* [x] Complete messenger between user and admins
|
2023-01-03 22:36:26 +02:00
|
|
|
* [x] Get application by id and user_id
|