This commit is contained in:
SpudGunMan
2025-09-28 17:36:57 -07:00
parent 8c0a1bbd0d
commit 1008ec6afa
2 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -301,8 +301,10 @@ def handle_echo(message, message_from_id, deviceID, isDM, channel_number):
if "?" in message.lower():
return "echo command returns your message back to you. Example:echo Hello World"
elif "echo " in message.lower():
echo_msg = message.split("echo ")[1]
if echo_msg.strip() == "":
parts = message.split("echo ", 1)
if len(parts) > 1 and parts[1].strip() != "":
echo_msg = parts[1]
else:
return "Please provide a message to echo back to you. Example:echo Hello World"
if echoChannel and channel_number != echoChannel:
echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg
+5 -3
View File
@@ -176,11 +176,13 @@ def handle_motd(message, message_from_id, isDM):
return msg
def handle_echo(message, message_from_id, deviceID, isDM, channel_number):
if "?" in message.lower() and isDM:
if "?" in message.lower():
return "echo command returns your message back to you. Example:echo Hello World"
elif "echo " in message.lower():
echo_msg = message.split("echo ")[1]
if echo_msg.strip() == "":
parts = message.split("echo ", 1)
if len(parts) > 1 and parts[1].strip() != "":
echo_msg = parts[1]
else:
return "Please provide a message to echo back to you. Example:echo Hello World"
if echoChannel and channel_number != echoChannel:
echo_msg = "@" + get_name_from_number(message_from_id, 'short', deviceID) + " " + echo_msg