58 lines
1.7 KiB
Python
58 lines
1.7 KiB
Python
saturn_mode_enabled = False
|
|
|
|
class Assistant: # You are the assistant
|
|
def normal_message(self, message):
|
|
print("ꕤ: " + response(message))
|
|
|
|
def saturn_message(self, message):
|
|
print("🪐: " + concise_response(message)) # Use concise responses for Saturn mode messages
|
|
|
|
def reply(self, message):
|
|
if saturn_mode_enabled:
|
|
self.saturn_message(message)
|
|
else:
|
|
self.normal_message(message) # Use display_message() for regular messages
|
|
|
|
assistant = Assistant()
|
|
|
|
def toggle_saturn_mode():
|
|
global saturn_mode_enabled
|
|
saturn_mode_enabled = not saturn_mode_enabled
|
|
mode_status = 'enabled' if saturn_mode_enabled else 'disabled'
|
|
assistant.display_message(f"Saturn mode is now {mode_status}.")
|
|
|
|
def check_saturn_mode():
|
|
global saturn_mode_enabled
|
|
mode_status = 'enabled' if saturn_mode_enabled else 'disabled'
|
|
assistant.display_message(f"Saturn mode is currently {mode_status}.")
|
|
|
|
def handle_action(action):
|
|
prefix = "/me " if saturn_mode_enabled else ""
|
|
print(prefix + action)
|
|
|
|
def handle_help():
|
|
help_message = """
|
|
Here's what you can do:
|
|
|
|
* Use `saturn check` to check the current Saturn mode.
|
|
* Use `saturn switch` to switch Saturn mode.
|
|
* Use `saturn help` to get help.
|
|
"""
|
|
assistant.display_message(help_message)
|
|
|
|
def handle_user_input(user_input):
|
|
if user_input.startswith("/me"):
|
|
handle_action(action)
|
|
elif user_input.startswith("saturn"):
|
|
if user_input == "saturn check":
|
|
check_saturn_mode()
|
|
elif user_input == "saturn switch":
|
|
toggle_saturn_mode()
|
|
elif user_input == "saturn help":
|
|
handle_help()
|
|
else:
|
|
assistant.reply(user_input)
|
|
|
|
user_input = input()
|
|
handle_user_input(user_input)
|