Skip to content

Commit

Permalink
change what we return
Browse files Browse the repository at this point in the history
  • Loading branch information
tblanarik committed Oct 18, 2024
1 parent 910e6f1 commit 83e37f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spotbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def run(req):
existingMessage = get_previous_message(messageId)
content = existingMessage + "\n" + content

messageId = post_message(content, messageId)
content_payload = {"content":content, "flags": 4}

messageId = post_message(content_payload, messageId)
tables.upsert_entity(table, callsign, messageId)

def create_content(req_body, dd):
Expand All @@ -41,7 +43,8 @@ def create_content(req_body, dd):
spot_deeplink = create_spot_deeplink(source, callsign, wwffRef)
formatted_time = dd.strftime("%H:%M")
# flags = 4 means it will suppress embeds: https://discord.com/developers/docs/resources/message#message-object-message-flags
content = {"content": f"{callsign} | {spot_deeplink} | freq: {frequency} | mode: {mode} | loc: {summitRef}{wwffRef} | {formatted_time}", "flags": 4}
#content = {"content": f"{callsign} | {spot_deeplink} | freq: {frequency} | mode: {mode} | loc: {summitRef}{wwffRef} | {formatted_time}", "flags": 4}
content = f"{callsign} | {spot_deeplink} | freq: {frequency} | mode: {mode} | loc: {summitRef}{wwffRef} | {formatted_time}"
return content

def create_spot_deeplink(source, callsign, wwffRef):
Expand Down

0 comments on commit 83e37f3

Please sign in to comment.