fix pings by moving them out of embed
This commit is contained in:
parent
d59019dd23
commit
d283aa5d78
@ -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):
|
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]
|
list_of_people_to_notify = list_of_people_to_notify[0]
|
||||||
message = f"{content}\n\n"
|
message = f"{content}\n\n"
|
||||||
|
message_people_to_notify = "\n"
|
||||||
try:
|
try:
|
||||||
list_of_people_to_notify = json.loads(list_of_people_to_notify)
|
list_of_people_to_notify = json.loads(list_of_people_to_notify)
|
||||||
message += "People to notify: "
|
message_people_to_notify += "People to notify: "
|
||||||
except:
|
except:
|
||||||
#in case it fails there should be nobody to notify
|
#in case it fails there should be nobody to notify
|
||||||
list_of_people_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
|
if not people or people == "[]": continue
|
||||||
people = people.replace('["', '').replace('"]', '')
|
people = people.replace('["', '').replace('"]', '')
|
||||||
#print('people: ', people)
|
#print('people: ', people)
|
||||||
message += f"<@{people}> "
|
message_people_to_notify += f"<@{people}> "
|
||||||
if not message.endswith("\n"):
|
|
||||||
message += "\n"
|
|
||||||
message += f"commands: showlist, add {infomap}, remove {infomap}"
|
message += f"commands: showlist, add {infomap}, remove {infomap}"
|
||||||
headers = {
|
headers = {
|
||||||
"x-bot-token": f"{stoat_token}",
|
"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"
|
image_url = f"https://vauff.com/mapimgs/240/{thumbnail_name}.jpg"
|
||||||
data = {
|
data = {
|
||||||
"content": image_url,
|
"content": image_url + message_people_to_notify,
|
||||||
"embeds": [{
|
"embeds": [{
|
||||||
"description": message,
|
"description": message,
|
||||||
}]
|
}]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user