diff --git a/app/services/gamebridge/payloads/ChatPayload.ts b/app/services/gamebridge/payloads/ChatPayload.ts index d6aa2dac..a3b0b478 100644 --- a/app/services/gamebridge/payloads/ChatPayload.ts +++ b/app/services/gamebridge/payloads/ChatPayload.ts @@ -53,19 +53,21 @@ export default class ChatPayload extends Payload { reply = await msg.fetchReference(); } - let nickname = msg.author.username; + const username = msg.author.username; + let nickname = ""; try { const author = await msg.guild?.members.fetch(msg.author.id); if (author && author.nickname && author.nickname.length > 0) { - nickname = `${author.nickname} (${nickname})`; + nickname = author.nickname; } } catch {} // dont care - const avatar = msg.author.avatarURL({ forceStatic: true }); + const avatar = msg.author.avatarURL(); const payload: ChatResponse = { user: { id: msg.author.id, + username: username, nick: nickname, color: msg.member?.displayColor ?? 0, avatar_url: avatar ?? msg.author.defaultAvatarURL, diff --git a/app/services/gamebridge/payloads/structures/ChatResponse.ts b/app/services/gamebridge/payloads/structures/ChatResponse.ts index 88c05002..900a678b 100644 --- a/app/services/gamebridge/payloads/structures/ChatResponse.ts +++ b/app/services/gamebridge/payloads/structures/ChatResponse.ts @@ -1,15 +1,16 @@ export default interface ChatResponse { user: { + avatar_url: string; + color: number; id: string; nick: string; - color: number; - avatar_url: string; + username: string; }; replied_message?: { - msgID: string; content: string; ingameName: string; + msgID: string; }; - msgID: string; content: string; + msgID: string; }