Giter Site home page Giter Site logo

autobot_joins_teams's Introduction

If you are reading this article, you have probably watched the YouTube(click here) video or have read the article on https://raniac.in/step-by-step-tutorial-for-how-to-make-a-bot-attend-your-class/. To jump right to the links and the code, click here.

The lockdown has compelled each one of us to attend online classes and honestly it is much of a headache. Why is that so? With the comfort that our house offers us, it is quite hard to maintain a constant attendance. So, I have come up with a solution to it! You can make a bot that will join/attend your classes for you! Yes, you've heard it right!

I would like to highlight the point that please use these steps as an enrichment and not a path to escape from your classes. So, Lets dive right into it!

Step 1- Installing the Repository

The first step would be to go to GitHub (click here) and download the zip file under code. As you can see below:-

installing the repository from github

Step 2- Extracting the File

Next, extract the file inside to whatever location you want. (I'd suggest desktop simply)

extracting the file

Step 3- The Configuration

Inside the folder, you will see a config.json.example or the config.json file, open that and enter all your credentials and how you want thing to be. These are things that are in the config file;

configuration of the bot

email and Password

What you have to do now is pretty simple. Enter your username and password between the two quotations .

run_at_time

Second is the run at time, where you can specify the time at which you want the bot to start looking for the meetings. For example, lets say, your class is at 5:00pm and you want to set up your bot at 3:00pm, so what you can do is write 16:55 (in 24-hours format) in front of "run_at_time". That is all! Now, the bot will start looking for the meeting at 4:55pm.

meeting_mode

The input that you put in here will specify where the bot will go to.
If you put 1, the bot will join the meeting that is mentioned in the teams tab as well as calendar tab.
When you key in 2, the bot will go to the teams tab, search for a meeting there and join the meeting.
If you put 3, the bot will go to the calendars tab, see if the current time correlated with the time mentioned in the meeting in calendar and join accordingly.

organisation_num

In your teams account, if you have only one organization, that is your school, (this is the case for most of the people), leave it as 1. But if you have more than one organizations, then enter the number of the organization you want the bot to enter.

random_delay

By default, the boolean value of random_delay is set as false but I'd suggest you to change it to true. If you are to do so, before joining the meeting, the bot will take a pause of 20 seconds so that it appears human-like. If you are to leave it as false, you'd be added into the meeting in milliseconds and that might be something you would not want.

check_interval

The time gap between every search that the bot makes is known as check interval. To understand this, when you open the command line, you are able to see that the bot looks for a new meeting every 10 seconds like what you mentioned in front of the "check_interval" variable. I'd suggest you to leave this as default i.e., 10.

bot looking for meetings

auto_leave_after_min

Once you have joined the meeting, you have to ensure that you dont stay in it for hours. So to insure that, you have an auto leave variable.
Here, if you mention any negative number, the bot will exit the meeting after the specified number/minutes.
"leave_if_last": false
When you mention any positive number, the bot will exit the meeting before the specified number/minutes.
If you leave it as 0, then the meeting would be exitted on the exact time the meeting is set to end by the organiser/teacher.

headless

The headless variable is another boolean value.
If set as true, whatever the bot does, from logging into your account, to entering your meeting and to exiting your meeting, the bot will do it in the background and would not open a browser in the front for you to see.
If you set it as false, which I suggest you to do, the bot will show you all the steps that it takes in the front.

mute_audio

When you set your mute audio variable as true, the bot will mute your microphone so this is obviously what I'd suggest.

chrome_type

With this variable, you can decide whether you want to use Chrome, Chromium, Microsoft Edge as the browser that the bot uses. I would suggest you to leave it as default, i.e. Chrome

blacklist

The last variable that you will see is the blacklist. This is used when you want to blacklist a meeting you do not want to join. Being a student, you obviously do not have the choice, so what you do here is backspace everything from the word blacklist to the last symbol in the document and add a curly bracket in the end.

Now that your config file is all set, remove the example at the end of the file and save it as config.json.

Step 4- Creating a Code Loop

The next step would be to create a command that runs the python file in a loop. To do so, open notepad, and enter the following code into it:-

:loop
auto_joiner.py
goto loop

Once you do so, save the file as "autorun.bat". (UPDATE- I've just added my new repository on GitHub from where if you download the zip file, you do not have to follow this step!)

Step 5- Downloading Python

Before proceeding further, go to https://www.python.org/downloads/ to download the latest version of python onto your PC.

Step 6- Running the Bot

Now, this is where you would start seeing the magic happening. Double click the batch file that you just created, the autorun.bat file.

commands of the bot

The command prompt will open and it will open a browser on its own. You would be able to see your username and password entered by itself. The bot will start looking for meetings and when it finds one, it will join it.

The End

That is all! You now have a bot that will join and leave your meeting whenever you want it to. But this does not mean that you skip your classes and leave it upon the bot to do what you should be doing. Towards the end of the day, you will be the one sitting in the examination hall, not your bot!

Batch File Code

:loop
auto_joiner.py
goto loop

If you are reading this article, you have probably watched the YouTube(click here) video. Thank you for your support, do comment down below whether you enjoyed this content and if we should continue making this type of content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.