Coder Social home page Coder Social logo

cs4alhaider / teams-status-bot Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 4.0 15.07 MB

Automate updating your Microsoft Teams status to be available all the time with an easy configurations

License: MIT License

Python 100.00%
ms-teams microsoft-teams bot automation

teams-status-bot's Introduction

Microsoft Teams Status Bot

Automate updating your Microsoft Teams status to be available all the time with an easy configurations

Installation

  1. Make sure you have python3 and pip on your machine
    1. You can check if you have python3 or not by running $ python3 --version
    2. Also, you can check pip by running $ pip3 --version
  2. Install selenium if not installed by running $ pip3 install selenium
  3. Open a Terminal window to clone this repo:
$ git clone https://github.com/cs4alhaider/teams-status-bot.git
$ cd teams-status-bot

Usage

Open teams-status-bot.py file then edit the SETTINGS part with your preferences

# ======================================================================================== #
# ====================================== SETTINGS ======================================== #
# ======================================================================================== #


# you can get your updated driver from here: https://sites.google.com/a/chromium.org/chromedriver/downloads
driver = webdriver.Chrome("./chromedriver")

# Email
email = "REPLACE_THIS_WITH_YOUR_TEAMS_EMAIL_ADDRESS"

# Password
password = "REPLACE_THIS_WITH_YOUR_PASSWORD"

# The frequency that you want to update your status in minutes
updateEvery = 1  # => in minutes, means it will update your status ever one minute

# For how long you want to keep this running, default = 1 hour
forHours = 8  # => in hours, means it will keep the program running for 8 hours

After configuring the file with your preferences, now it's time to run it:

$ python3 teams-status-bot.py

Author

Twitter, [email protected]

License

teams-status-bot is available under the MIT license. See the LICENSE file for more info.

teams-status-bot's People

Contributors

cs4alhaider avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

teams-status-bot's Issues

Weekly pattern

Hello Sir

Great work!

Question: how would you run this script Mo through Friday , 8am -5pm only?

Thank you

tried Debian and Win10 and no luck

here is the error msg from Windows

PS C:\teams-status-bot> py teams-status-bot.py C:\teams-status-bot\teams-status-bot.py:16: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome("./chromedriver") Traceback (most recent call last): File "C:\teams-status-bot\teams-status-bot.py", line 16, in <module> driver = webdriver.Chrome("./chromedriver") File "C:\Users\###\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 69, in __init__ super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog", File "C:\Users\###\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 90, in __init__ self.service.start() File "C:\Users\###\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\common\service.py", line 74, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Users\###\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\###\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, OSError: [WinError 193] %1 is not a valid Win32 application PS C:\teams-status-bot>

here is error msg from Debian

/teams-status-bot$ python3 teams-status-bot.py /home/server/teams-status-bot/teams-status-bot.py:16: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome("./chromedriver") Traceback (most recent call last): File "/home/server/teams-status-bot/teams-status-bot.py", line 16, in <module> driver = webdriver.Chrome("./chromedriver") File "/home/server/.local/lib/python3.9/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog", File "/home/server/.local/lib/python3.9/site-packages/selenium/webdriver/chromium/webdriver.py", line 90, in __init__ self.service.start() File "/home/server/.local/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 74, in start self.process = subprocess.Popen(cmd, env=self.env, File "/usr/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) OSError: [Errno 8] Exec format error: './chromedriver'

I am not an advanced computer user

Hello there,

I have tried to use the windows command prompt, and it told me:

'$' is not recognized as an internal or external command,
operable program or batch file.

How do I get started with this great programme?

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.