Giter Site home page Giter Site logo

discord-ilo4-bot's Introduction

Discord ilo - A Discord bot for ILO

This bot is designed to help you manage your ILO server.

How it works

The bot uses the ILO API to communicate with the server. It sends a request to the ILO server every 5 seconds to get the power status, temperature, fan speed, and power usage. The bot also stores the power usage in a MySQL database to create a power usage chart.

Issues and feature requests

If you have any issues or feature requests, please create an issue on the issues page

Photos

image

Features

  • Power on
  • Power off
  • Power reset
  • Power status
  • Get the temperature
  • Get the fan speed
  • Get the power usage
  • Get the server health

Requirements

  • Node.js (v16.6.0 or higher)
  • MySql Server (For the power charts)

Installation

  1. Clone the repository
  2. Install the requirements
  3. Create a .env file with the following content:
DISCORD_TOKEN=your_discord_token
ILO_HOST=your_ilo_host
ILO_USER=your_ilo_user
ILO_PASSWORD=your_ilo_password
DB_HOST=your_db_host
DB_USER=your_db_user
DB_PASS=your_db_password
DB_NAME=your_db_name
  1. Run the bot
node index.js

Docker Installation

docker run -d --name discord-ilo \
    -e DISCORD_TOKEN=your_discord_token \
    -e ILO_HOST=your_ilo_host \
    -e ILO_USER=your_ilo_user \
    -e ILO_PASSWORD=your_ilo_password \
    -e DB_HOST=your_db_host \
    -e DB_USER=your_db_user \
    -e DB_PASS=your_db_password \
    -e DB_NAME=your_db_name \
    --restart unless-stopped \
    ghcr.io/luxxy-gf/discord-ilo-bot:latest

or use the docker-compose file

version: '3.7'
services:
  discord-ilo:
    image: ghcr.io/luxxy-gf/discord-ilo-bot:latest
    container_name: discord-ilo
    environment:
      - DISCORD_TOKEN=your_discord_token
      - ILO_HOST=your_ilo_host
      - ILO_USER=your_ilo_user
      - ILO_PASSWORD=your_ilo_password
      - DB_HOST=your_db_host
      - DB_USER=your_db_user
      - DB_PASS=your_db_password
      - DB_NAME=your_db_name
    restart: unless-stopped

Usage

  • !status - Get the power status of the server
  • !start - Power on the server
  • !stop - Power off the server

License

This project is licensed under the MIT License - see the LICENSE file for details

Bugs

  • Fix the bug where the bot crashes when the ILO server is not reachable
  • Maybe the bot adding to much data to the database as it queries the ILO server every 5 seconds

discord-ilo4-bot's People

Contributors

luxxy-gf avatar

Stargazers

Didid avatar  avatar  avatar

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.