From 7008d8a473fa5cd5acd114e1239e4cb98df4f19b Mon Sep 17 00:00:00 2001 From: Zachary G Date: Sun, 31 Mar 2024 15:22:47 +0800 Subject: [PATCH 1/2] Update README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 94f61d0..c081680 100644 --- a/README.md +++ b/README.md @@ -1 +1,14 @@ -# DiscordComputerStatus \ No newline at end of file +# Computer Status Discord Bot + +This Python script sends a notification message to a Discord channel when the computer is turned on. The message includes system information such as the current time, hostname, public IP address, CPU usage, memory usage, and a list of running services. + +## Prerequisites + +- Python 3.x installed on your system. +- Required Python packages: `discord.py`, `psutil`, `requests`, `python-dotenv`. +- A Discord bot token. You can create a new bot and get its token from the Discord Developer Portal. + +## Installation + +1. Clone this repository to your local machine or download the ZIP file. +2. Navigate to the project directory. From b6d4f7133d7a7eb5ddf693e133a7e5c947f4a662 Mon Sep 17 00:00:00 2001 From: Zachary G Date: Sun, 31 Mar 2024 15:31:56 +0800 Subject: [PATCH 2/2] Update README.md --- README.md | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c081680..6c8a7aa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Computer Status Discord Bot -This Python script sends a notification message to a Discord channel when the computer is turned on. The message includes system information such as the current time, hostname, public IP address, CPU usage, memory usage, and a list of running services. +This Python script sends a notification message to a Discord channel when the computer is turned on. The message includes system information such as the current time, hostname, public IP address, CPU usage, memory usage, and a list of specified running services. ## Prerequisites @@ -12,3 +12,35 @@ This Python script sends a notification message to a Discord channel when the co 1. Clone this repository to your local machine or download the ZIP file. 2. Navigate to the project directory. + +3. Install the required Python packages using pip. + +```bash +pip install -r requirements.txt +``` + +4. Edit the `.env` file in the project directory and add your Discord bot token and channel ID in the following format: + +``` +TOKEN=your_bot_token_here +CHANNEL_ID=your_channel_id_here +``` + +## Usage + +1. Run the script using the following command: + +```bash +python run.py +``` + +2. The script will send a notification message to the specified Discord channel with system information when the computer runs this script. + +## Customization + +- You can customize the list of running services by modifying the `services` list in the script. +- Additional system information or features can be added as needed. + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.