Fix flag
This commit is contained in:
parent
ab9ac3b3bf
commit
91ad4a01cc
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ class FlagCommand extends ImageCommand {
|
|||
|
||||
async criteria() {
|
||||
const text = this.options.text ?? this.args[0];
|
||||
if (!text.match(emojiRegex)) return false;
|
||||
if (!text.match(emojiRegex())) return false;
|
||||
const flag = emoji.unemojify(text).replaceAll(":", "").replace("flag-", "");
|
||||
let path = `assets/images/region-flags/png/${flag.toUpperCase()}.png`;
|
||||
if (flag === "pirate_flag") path = "assets/images/pirateflag.png";
|
||||
|
|
Loading…
Reference in a new issue