A Telegram bot made in python for students of KL University
- After you have logged in once using this program, you can also login later until a certain period of time without the use of your full password or captcha as this program makes use of session ids which can be used for this purposes.
- You can get the API_KEY through BotFather in telegram
- If you don't know your telegram user ID which is a number,
- You can first attempt to use the program (which it won't allow).
- After attempting, you can see your user ID in the 'attempts' table of the database 'MainDB'.
- Then copy your User ID and place it in the 'Keys' module.
- After placing it in the 'Keys' Module, run the following commands in the terminal
python sqlcreate.py 0
: You don't need to run this if you have already executed it once.python sqlcreate.py 1
: You should run this if you have updated your User ID after running the first command.
- You can install the chrome driver which is required for the Driver_Path from the website : https://chromedriver.chromium.org/downloads
- Copy the files in src to your PyCharm Editor
- Install the required components in
requirements.txt
- Update all the fields in Keys.py file.
- API_KEY : Your telegram api key
- U_ID : Your telegram user ID
- name : How would you like to referred by this program
- PATH, RPATh : Your local file directory which you would like to access via telegrm
- Driver_Path : Your local chrome driver path
- TEST_PATH : A sample local path to test some functionalities. Preferable with different types of files
- Student_ID : Your KLU Student ID (10 digit number given by university)
- SEMID : 0 if Odd Sem || 1 if Even Sem || 2 if Summer Sem
- Now, in the terminal run the following commands (Apple)
python sqlcreate.py 0
- Create a new Database and then create the necessary tablespython sqlcreate.py 1
- if you did not update your User ID before running the first command
- Now, run the main.py to start the bot
/g <KLU_ID> <KLU_Password>
: Login to your ERP/g logout
: Logout/g minclasses
: The number of classes that can be skipped while maintaining the required attendance percentage/g att
: Calculates your total current attendance percentage/cap <captcha>
: To enter the captcha to login<upload file directly>
: Just send the file to your bot. The sent file will be stored in your specified directory/rfile <filename>
: Receive the file from your remote directory/a lsfs
: List all files in the directory/a add
- add user/a rem <id>
- remove user/a attempts
- list the attempts in console window/a attemptsls
- send the attemp list to your telegram/a allusers
- sends the list of users as telegram message