Skip to content

Latest commit

 

History

History
162 lines (119 loc) · 4.88 KB

README.md

File metadata and controls

162 lines (119 loc) · 4.88 KB

Version License: Apache-2.0 Is Mantained?

ATEC Discord Bot

Atec BOT Send Calendar to Discord!

This repository hosts a bot that automates the process of logging into the ATEC training server, capturing a screenshot of your personal calendar, and posting it to a specified Discord channel.

📋 Table of Contents

✨ Features

  • Automated login to the ATEC training server.
  • Navigation to the personal calendar page.
  • Capture of the calendar as a .png screenshot.
  • Automated posting of the screenshot to a specified Discord server.

⚠️ Requirements

  • Python 3.6+
  • selenium
  • pillow
  • discord.py
  • aiohttp
  • python-dotenv
  • Google Chrome
  • ChromeDriver

🛠️ Installation

  1. Clone the Repository:

    git clone https://github.com/rubsxyz/ATEC-Calendar-Discord-Bot.git
    cd atec_send_calendar_discord
  2. Set Up a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Set Up Environment Variables:

    Create a .env file in the root directory of the project with the following content:

    USERNAME=your_username
    PASSWORD=your_password
    DISCORD_TOKEN=your_discord_token
    

    Replace your_username, your_password and your_discord_token with your actual ATEC login credentials and Discord bot token.

    To create a Discord bot and get the token, follow this guide.

  5. Ensure ChromeDriver is in Your PATH:

    Make sure that ChromeDriver is installed and added to your system PATH. You can download ChromeDriver from here.

⚙️ Usage

To run the script, execute:

python main.py

The script will:

  1. Log into the ATEC training server using the provided credentials.
  2. Navigate to the personal calendar page.
  3. Capture a screenshot of the calendar.
  4. Send the screenshot to the specified Discord channel.

🧾 Logging

The script logs its actions and any errors encountered in a bot.log file in the root directory. This file is overwritten each time the script runs.

🔨 Troubleshooting

  • Login Issues: Ensure that your username and password are correctly entered in the .env file.
  • Discord Bot Issues: Ensure that your Discord bot token and channel ID are correctly entered in the .env file and that your bot has permission to post in the specified channel.
  • ChromeDriver Issues: Ensure that ChromeDriver is correctly installed and added to your system PATH.

🗂️ Project Structure

ATEC-Calendar-Discord-Bot/
│
├── src/
│ ├── init.py
│ ├── calendar_interaction.py
│ ├── config.py
│ ├── discord_bot.py
│ ├── web_interaction.py
│
├── images/ (created at first run)
│ └── (Captured images are stored here)
│
├── .env (read Installation)
├── .gitignore
├── bot.log (created at first run)
├── LICENSE.txt
├── main.py
├── README.md 
└── requirements.txt

🤝 Contributing

Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

🛑 Issues

If you encounter any issues, please open a new issue in the Issues section of the repository.

📢 Acknowledgements

📜 License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.