This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Telegram/README.md

74 lines
2.5 KiB
Markdown
Raw Normal View History

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-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
{
"locale": "uk", # locale file. it's a json located under locale folder
2022-10-26 14:31:35 +03:00
"debug": false, # whether config_debug.json should be used instead of config.json
2022-10-23 13:13:12 +03:00
"owner": 0, # telegram ID of a bot owner
"age_allowed": 0, # minimum age of user that submits application
2022-10-25 16:23:41 +03:00
"birthdays_notify": true, # notify admin group about birthdays
"birthdays_time": "09:00", # server time when to notify about birthdays
2022-10-26 16:23:06 +03:00
"api": "http://127.0.0.1:9024", # API server address
2022-10-23 13:13:12 +03:00
"admin_group": 0, # telegram ID of a admin's group
"destination_group": 0, # telegram ID of a user's group
"admins": [], # list of telegram ID's of users that are admins
"bot": {
"api_id": 0, # telegram API ID
"api_hash": "", # telegram API hash
"bot_token": "" # telegram bot's token
},
"logging": {
"size": 512, # size of log file in kbytes after which it should be rotated
"location": "logs" # location of logs folder. can be relative or absolute
},
"locations": {
"data": "data", # location of data folder. can be relative or absolute
"locale": "locale" # location of locale folder. can be relative or absolute
},
"commands": { # user command and its description
2022-10-25 16:23:41 +03:00
"reapply": "Fill the application again"
2022-10-23 13:13:12 +03:00
},
"commands_admin": { # admin commands and their description
2022-10-24 17:32:09 +03:00
"reboot": "Restart the bot",
"applications": "Get all applications as JSON"
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
2022-10-24 15:34:52 +03:00
* [x] Check if link belongs to admin
2022-10-26 15:54:55 +03:00
* [x] Inline query user's application
2022-10-24 15:34:52 +03:00
* [x] Get applications .json
* [ ] Get application by id and user_id
* [x] Age as a DD.MM.YYYY
2022-10-25 15:18:51 +03:00
* [x] Notify about upcoming birthdays
2022-10-25 14:36:16 +03:00
* [x] Change the application data
2022-10-24 15:34:52 +03:00
* [x] Check if user is already in group