diff options
author | Zachery Notz <zachery_notz@enigma.mil> | 2020-05-23 17:14:31 -0700 |
---|---|---|
committer | Zachery Notz <zachery_notz@enigma.mil> | 2020-05-23 17:14:31 -0700 |
commit | 14f61d88ffb5ac7f66d46e0155833d32d46802d6 (patch) | |
tree | 4fbd0a518535399cff3645c7864eb5e12e88e0d8 | |
parent | backwards compat with new option (diff) | |
download | shulker-14f61d88ffb5ac7f66d46e0155833d32d46802d6.tar.gz shulker-14f61d88ffb5ac7f66d46e0155833d32d46802d6.zip |
Improved regex so that TELLRAW templates can use variables more than once
Diffstat (limited to '')
-rw-r--r-- | src/Discord.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Discord.ts b/src/Discord.ts index 2893c8b..c9b3b74 100644 --- a/src/Discord.ts +++ b/src/Discord.ts @@ -140,9 +140,9 @@ class Discord { } return this.config.MINECRAFT_TELLRAW_TEMPLATE - .replace('%username%', variables.username) - .replace('%discriminator%', variables.discriminator) - .replace('%message%', variables.text) + .replace(/%username%/g, variables.username) + .replace(/%discriminator%/g, variables.discriminator) + .replace(/%message%/g, variables.text) } private replaceDiscordMentions(message: string): string { |