Skip to content

Commit

Permalink
Add time to script
Browse files Browse the repository at this point in the history
# v0.3.0

Add time of script run in to Discord message.
Rename changelog.txt to CHANGELOG.txt
  • Loading branch information
redtrillix committed Mar 31, 2024
1 parent 7084da6 commit fdb973d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ Fix intents missing from script.

# v0.2.0
Modified the script to include a more detailed message indicating manually specified services are up and running.

# v0.3.0
Add time of script run in to Discord message.
Rename changelog.txt to CHANGELOG.txt
13 changes: 9 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## Version: 0.2.0
## Git Repository: https://github.com/redtrillix/DiscordComputerStatus
## Version: 0.3.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
## Owner: Zachary G (redtrillix)

import discord
from discord import Intents
import os
from datetime import datetime

# Discord bot token
TOKEN = 'your_bot_token_here'
Expand All @@ -14,10 +16,13 @@
CHANNEL_ID = 'your_channel_id_here'

# Define the services that are up and running
services = ["Service1", "Service2", "Service3"]
services = ["Satisfactory", "Music Bot", "Lyric Bot", "Palworld", "Minecraft"]

# Get the current time
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")

# Create the detailed message
MESSAGE = "Computer is turned on! Services that are up and running:\n\n"
MESSAGE = f"Computer is turned on at {current_time}! Services that are up and running:\n\n"
for service in services:
MESSAGE += f"- {service}\n"

Expand Down

0 comments on commit fdb973d

Please sign in to comment.