From d283aa5d78fdb2ed49b410dff110801d573b83e8 Mon Sep 17 00:00:00 2001 From: jenz Date: Wed, 11 Mar 2026 14:10:10 +0100 Subject: [PATCH] fix pings by moving them out of embed --- stoat_map_notifications/python/app.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stoat_map_notifications/python/app.py b/stoat_map_notifications/python/app.py index 3ffc70b..fd46939 100644 --- a/stoat_map_notifications/python/app.py +++ b/stoat_map_notifications/python/app.py @@ -199,9 +199,10 @@ def check_new_map_notification_status(fixed_param, last_msg_id): def send_post_notify_message_to_stoat(list_of_people_to_notify, content, infomap): list_of_people_to_notify = list_of_people_to_notify[0] message = f"{content}\n\n" + message_people_to_notify = "\n" try: list_of_people_to_notify = json.loads(list_of_people_to_notify) - message += "People to notify: " + message_people_to_notify += "People to notify: " except: #in case it fails there should be nobody to notify list_of_people_to_notify = [] @@ -211,9 +212,7 @@ def send_post_notify_message_to_stoat(list_of_people_to_notify, content, infomap if not people or people == "[]": continue people = people.replace('["', '').replace('"]', '') #print('people: ', people) - message += f"<@{people}> " - if not message.endswith("\n"): - message += "\n" + message_people_to_notify += f"<@{people}> " message += f"commands: showlist, add {infomap}, remove {infomap}" headers = { "x-bot-token": f"{stoat_token}", @@ -225,7 +224,7 @@ def send_post_notify_message_to_stoat(list_of_people_to_notify, content, infomap image_url = f"https://vauff.com/mapimgs/240/{thumbnail_name}.jpg" data = { - "content": image_url, + "content": image_url + message_people_to_notify, "embeds": [{ "description": message, }]