This bot will verify the users, and give them access to certain files
-
First you need to have Python installed. For most users, basic installation is enough: Python 3.10.2. Download the windows installer (probably you have 64 bit system)
-
Install Libraries: execute
install_libs.bat
file. A.env
file should be created -
Configure .env file. If you don't know where to obtain the Gmail password for apps, keep reading. If you don't know how to obtain your Telegram Bot Token from @BotFather, keep reading.
-
Configure
contact.json
file, this contains the telegram usernames and their emails asociates, you must put the usernames and emails in the same format. -
Configure
files.json
file, here you should have the name of the course and url files that you want to share
-
Search for @Botfather in Telegram
-
Start a conversation with BotFather by writing
/start
-
Type
/newbot
and follow the prompts to set up a new bot. The BotFather will give you a token that you will use to authenticate your bot and grant it access to the Telegram API. -
If your forgot your token, you can type
/token
to obtain it again. Remeber to put it in the.env
file (not in .env.example) -
Add the bot to your group, with admin access. Navigate to https://api.telegram.org/bot-token-/getUpdates
Replace-token-
with your actual token. -
If everything is ok, you should check:
-
Go to Gmail, and then to Managament Your Account
-
On the search bar type:
App passwords
. Probably will ask you for your actual password to enter. -
Type a name to label this password, exmaple:
telegram-bot
. It will retrieve a password for apps, that you will keep safe and put it on the.env
file, without the dashes (-)
Run just using start.bat
file