summary refs log tree commit diff homepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Discord.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Discord.ts b/src/Discord.ts
index ea84d3e..12ac656 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)
   }
d> 2020-12-30Add unary & to bitJune McEnroe Also unary + and fix precedence of unary -. 2020-12-30Support unary + in orderJune McEnroe Missed this because operator(7) just doesn't list it, oddly. 2020-12-30Add postfix $ operator to bitJune McEnroe 2020-12-29Add make lexerJune McEnroe This is kind of a mess and needs to be cleaned up against more careful reading of the make grammar. 2020-12-29Clean up C lexerJune McEnroe This ordering of rules feels much cleaner. 2020-12-29Clean up hilex code somewhatJune McEnroe 2020-12-29Match lex/yacc %% %{ %} lines as MacroJune McEnroe 2020-12-29Match top-level C definitions as IdentifierTagJune McEnroe 2020-12-29Match C type declarations as IdentifierTagJune McEnroe 2020-12-29Match function-like macro definitions as IdentifierTagJune McEnroe 2020-12-29Reconfigure C macro start conditionsJune McEnroe 2020-12-29Document HTML class namesJune McEnroe 2020-12-29Rename Tag class to IdentifierTagJune McEnroe 2020-12-29Change HTML class from hi to hilexJune McEnroe You can tell I was just copying the HTML code huh. 2020-12-29Add hilex HTML outputJune McEnroe