diff options
Diffstat (limited to 'src/Discord.ts')
-rw-r--r-- | src/Discord.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Discord.ts b/src/Discord.ts index ffdd05b..bb3b9a2 100644 --- a/src/Discord.ts +++ b/src/Discord.ts @@ -131,6 +131,7 @@ class Discord { private makeMinecraftTellraw(message: Message): string { const variables: {[index: string]: string} = { username: emojiStrip(message.author.username), + nickname: message.member.nickname ? emojiStrip(message.member.nickname) : emojiStrip(message.author.username), discriminator: message.author.discriminator, text: emojiStrip(message.cleanContent) } @@ -141,6 +142,7 @@ class Discord { return this.config.MINECRAFT_TELLRAW_TEMPLATE .replace(/%username%/g, variables.username) + .replace(/%nickname%/g, variables.nickname) .replace(/%discriminator%/g, variables.discriminator) .replace(/%message%/g, variables.text) } |