Skip to content

Commit

Permalink
Update lunaBOT
Browse files Browse the repository at this point in the history
  • Loading branch information
detectiveren committed Jul 23, 2024
1 parent d1caa64 commit 58a5680
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions luna.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,11 @@ def sendLunaBOTMessage(response): # Send the response from lunaBOT into chat
page.pubsub.send_all(LunaMessage(lunaUser=lunaBOTUsername, lunaText=encrypted_bot_message,
lunaMessageType="lunaChatMessage", lunaKey=bot_key))

if message == "!lunaBOT":
lunaBOTResponse = f"Please enter a parameter when invoking the bot (requested by {lunaUsername.value})"
sendLunaBOTMessage(lunaBOTResponse)
if "buildNumber" in message: # If the message contains "buildNumber" then lunaBOT will print out the build number
lunaBOTResponse = f"Build Number: {buildNumber}" # lunaBOT's response
lunaBOTResponse = f"Build {buildNumber}" # lunaBOT's response
sendLunaBOTMessage(lunaBOTResponse)
if "commands" in message:
lunaBOTResponse = ("List of commands\n"
Expand All @@ -311,6 +314,9 @@ def sendLunaBOTMessage(response): # Send the response from lunaBOT into chat
if "banned_word_sent" in message:
lunaBOTResponse = f"{lunaUsername.value} tried to send a message that contained a banned word"
sendLunaBOTMessage(lunaBOTResponse)
if "versionInfo" in message:
lunaBOTResponse = f"lunaChat 1.0\nAlpha 2\nBuild {buildNumber}"
sendLunaBOTMessage(lunaBOTResponse)
print(f"LOG (Message Type: lunaChatMessage) (lunaBOT): {lunaBOTResponse} (requested by {lunaUsername.value})")

# Function for checking if the server password is correct
Expand Down Expand Up @@ -859,8 +865,8 @@ def route_change(route):
ft.Text(f"{lunaUsername.value}"),
]),
ft.Text(" Online", color=ft.colors.BLUE),
ft.Text(" Status: "),
lunaStatus
#ft.Text(" Status: "),
#lunaStatus

]),
])
Expand Down
Binary file modified lunaData.db
Binary file not shown.

0 comments on commit 58a5680

Please sign in to comment.