From 4ce0444076084457f3a3d12869df7cc76da8f9dc Mon Sep 17 00:00:00 2001 From: LittleC <26459759+XxLittleCxX@users.noreply.github.com> Date: Thu, 4 Jan 2024 23:02:31 +0800 Subject: [PATCH] fix(discord): author attr due to specification changes --- adapters/discord/src/message.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/discord/src/message.ts b/adapters/discord/src/message.ts index 70bc92f2..dd104d28 100644 --- a/adapters/discord/src/message.ts +++ b/adapters/discord/src/message.ts @@ -308,9 +308,9 @@ export class DiscordMessageEncoder extends MessageE }) this.buffer = '' } else if (type === 'author') { - const { avatar, nickname } = attrs + const { avatar, name } = attrs if (avatar) this.addition.avatar_url = avatar - if (nickname) this.addition.username = nickname + if (name) this.addition.username = name if (this.stack[0].type === 'message') { this.stack[0].author = attrs }