fix pings by moving them out of embed

This commit is contained in:
jenz 2026-03-11 14:10:10 +01:00
parent d59019dd23
commit d283aa5d78

View File

@ -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,
}]