use nicknames

This commit is contained in:
git-bruh 2021-01-21 12:42:05 +05:30
parent dc8d45818e
commit 23f341df1c
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -314,7 +314,7 @@ class DiscordClient(discord.ext.commands.Bot):
for attachment in message.attachments: for attachment in message.attachments:
content += f"\n{attachment.url}" content += f"\n{attachment.url}"
content = f"[{message.author.name}] {content}" content = f"[{message.author.display_name}] {content}"
return content, replied_event, emotes return content, replied_event, emotes
@ -346,7 +346,7 @@ class Callbacks(object):
channel_id = self.get_channel(room) channel_id = self.get_channel(room)
author = event.sender.split(":")[0][1:] author = room.user_name(event.sender)
avatar = None avatar = None
homeserver = event.sender.split(":")[-1] homeserver = event.sender.split(":")[-1]