Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions bridgeipelago.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,11 +776,15 @@ async def ProcessDeathQueue():
o.close()

if EnableDeathlinkMessages == "true":
DeathMessage = "**Deathlink received from: " + str(chatmessage['data']['source']) + "**"
DeathMessage = "**Deathlink!** "
# Flavour
if EnableFlavorDeathlink == "true":
DeathMessage += GetFlavorText(str(chatmessage['data']['source']))
else:
DeathMessage += "Received from **" + str(chatmessage['data']['source']) + "**"
# Cause
if chatmessage['data'].get('cause') is not None and chatmessage['data'].get('cause') != "":
DeathMessage = DeathMessage + "\n" + "Cause: " + str(chatmessage['data']['cause'])
elif EnableFlavorDeathlink == "true":
DeathMessage = "Deathlink: " + GetFlavorText(str(chatmessage['data']['source']))
DeathMessage += "\n" + "*Cause:* " + str(chatmessage['data']['cause'])
await SendMainChannelMessage(DeathMessage)
else:
return
Expand Down
3 changes: 2 additions & 1 deletion modules/DeathlinkFlavor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,5 @@ def GetFlavorText(PlayerName):
"PLAYER walked into logic’s trap.",
"PLAYER perished chasing progression.",
]
return (random.choice(FlavorList)).replace("PLAYER", PlayerName)
PlayerNameFormatted = f"**{PlayerName}**"
return (random.choice(FlavorList)).replace("PLAYER", PlayerNameFormatted)