fix up transgender and pirate flag comparisons in flag.js (#170)
solves issue #169 tested on a self-host by my friend
This commit is contained in:
parent
f5a0fa5f7c
commit
1cf53f9584
1 changed files with 3 additions and 3 deletions
|
@ -10,10 +10,10 @@ class FlagCommand extends ImageCommand {
|
|||
if (!this.args[0].match(emojiRegex)) return false;
|
||||
const flag = emoji.unemojify(this.args[0]).replaceAll(":", "").replace("flag-", "");
|
||||
let path = `./assets/images/region-flags/png/${flag.toUpperCase()}.png`;
|
||||
if (flag === "🏴☠️") path = "./assets/images/pirateflag.png";
|
||||
if (flag === "pirate_flag") path = "./assets/images/pirateflag.png";
|
||||
if (flag === "rainbow-flag") path = "./assets/images/rainbowflag.png";
|
||||
if (flag === "checkered_flag") path = "./assets/images/checkeredflag.png";
|
||||
if (flag === "🏳️⚧️") path = "./assets/images/transflag.png";
|
||||
if (flag === "transgender_flag") path = "./assets/images/transflag.png";
|
||||
try {
|
||||
await fs.promises.access(path);
|
||||
this.flagPath = path;
|
||||
|
|
Loading…
Reference in a new issue