This should get us back on track (tested on ARCH Linux)

This commit is contained in:
Cedric
2023-07-27 18:07:02 +02:00
parent 5c158cf8a8
commit e4586a5834
23 changed files with 836 additions and 76 deletions
+24 -10
View File
@@ -414,16 +414,30 @@ class AllianceRelay:
if self.discord.guild and self.discord.bot:
name = f"<header2>DC Server: <highlight>{self.discord.guild.name}</highlight> - " \
f"Bot: <highlight><myname></highlight></header2>"
blob = self.text.format_page('Info',
f"<header>::: Information :::</header><br><br>"
f"This message has been sent to you by:<br><br>"
f"{name}<br>"
f"<tab>Sender: <notice>{ctx.sender.name}</notice><br>"
f"<tab>Tag: <highlight>{ctx.sender.discord_nick}</highlight><br><br>"
f"To reply, either respond in the relay or "
f"contact them directly at the provided handles.<br><br>"
f"<header2>Have you joined our Discord Server yet? "
f"If not <highlight>{invite}</highlight> to receive an invite.</header2>")
nick = ctx.sender.discord_nick if ctx.sender.get('discord_nick', None) \
else self.discord.client.user.display_name if ctx.sender.char_id == self.bot.get_char_id() else None
if nick:
blob = self.text.format_page('Info',
f"<header>::: Information :::</header><br><br>"
f"This message has been sent to you by:<br><br>"
f"{name}<br>"
f"<tab>Sender: <notice>{ctx.sender.name}</notice><br>"
f"<tab>Tag: <highlight>{nick}</highlight><br><br>" # Bot ha sno nick!!
f"To reply, either respond in the relay or "
f"contact them directly at the provided handles.<br><br>"
f"<header2>Have you joined our Discord Server yet? "
f"If not <highlight>{invite}</highlight> to receive an invite.</header2>")
else:
blob = self.text.format_page('Info',
f"<header>::: Information :::</header><br><br>"
f"This message has been sent to you by:<br><br>"
f"{name}<br>"
f"<tab>Sender: <notice><myname></notice><br>"
f"<tab>Tag: <highlight>{self.discord.client.user.display_name}</highlight><br><br>" # Bot has no nick!!
f"To reply, either respond in the relay or "
f"contact them directly at the provided handles.<br><br>"
f"<header2>Have you joined our Discord Server yet? "
f"If not <highlight>{invite}</highlight> to receive an invite.</header2>")
blob = f"<yellow>[{blob}]</yellow>"
# msg = f"{cmd} [{self.discord.alias_controller.get_alias(ctx.sender.org_id)}] {ctx.message} <yellow>[{blob}]</yellow>"
msg = f"{cmd} [{abbrv}] {sender}: {message} {blob}"