Skip to content

Commit

Permalink
Release Version 2.1.0
Browse files Browse the repository at this point in the history
# v2.1.0

Added the listed services as a variable under `.env`, they will no longer be under `run.py`.
    Temporarily commented out '.env' under `.gitignore` to add changes to repo.
Removed `.github\workflows\python-version-check.yml` file due to being unable to get the workflow working correctly.
Added badges under `README.md`.
    Added Version Release number.
    Added Repo License.
    Added Windows text in bright green.
    Added Python text in blue.

Co-Authored-By: JakeWasHere <[email protected]>
  • Loading branch information
redtrillix and JakeWasHere committed Mar 31, 2024
1 parent 8cf2e2d commit a563238
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 51 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
TOKEN=your_bot_token_here
CHANNEL_ID=your_channel_id_here
SERVICES=Your,List,of,Services,Here
44 changes: 0 additions & 44 deletions .github/workflows/python-version-check.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

.env
#.env - temp change
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/redtrillix/DiscordComputerStatus?style=flat-square)
[![GitHub license](https://img.shields.io/github/license/redtrillix/DiscordComputerStatus?style=flat-square)](https://github.com/redtrillix/DiscordComputerStatus/blob/master/LICENSE)
![Static Badge](https://img.shields.io/badge/Windows-brightgreen?style=flat)
![Static Badge](https://img.shields.io/badge/Python-blue?style=flat)

# 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 specified running services.
Expand Down
10 changes: 10 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Changelog

# v2.1.0
Added the listed services as a variable under `.env`, they will no longer be under `run.py`.
Temporarily commented out '.env' under `.gitignore` to add changes to repo.
Removed `.github\workflows\python-version-check.yml` file due to being unable to get the workflow working correctly.
Added badges under `README.md`.
Added Version Release number.
Added Repo License.
Added Windows text in bright green.
Added Python text in blue.

# v2.0.2
Attempt 2 - Fix `python-version-check.yml` not running correctly.

Expand Down
16 changes: 10 additions & 6 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version: 2.0.2
## Version: 2.1.0
## License: https://github.com/redtrillix/DiscordComputerStatus/raw/main/LICENSE
## Git Repository: https://github.com/redtrillix/DiscordComputerStatus
## Changelog: https://github.com/redtrillix/DiscordComputerStatus/blob/main/CHANGELOG.txt
Expand All @@ -22,8 +22,8 @@
# Channel ID where you want to send the message
CHANNEL_ID = os.getenv('CHANNEL_ID')

# Define the services that are up and running
services = ["Service1", "Service2", "Service3", "Service4", "Service5"]
# Retrieve services from .env and split them into a list
SERVICES = os.getenv('SERVICES').split(',')

# Get the current time
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
Expand All @@ -48,9 +48,13 @@
MESSAGE += f"🌐 Public IP Address: {public_ip}\n"
MESSAGE += f"💻 CPU Usage: {cpu_usage}%\n"
MESSAGE += f"🧠 Memory Usage: {memory_usage}%\n\n"
MESSAGE += "**Services Running:**\n"
for index, service in enumerate(services, start=1):
MESSAGE += f"{index}. {service}\n"
MESSAGE += "**Services Running:**\n\n"
MESSAGE += "```"
MESSAGE += f"{'Service':<20}{'Status':<10}\n"
MESSAGE += "-" * 30 + "\n"
for service in SERVICES:
MESSAGE += f"{service:<20}{'Running':<10}\n"
MESSAGE += "```"

# Define the intents
intents = Intents.default()
Expand Down

0 comments on commit a563238

Please sign in to comment.