diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index fe8408b06..a6b3df533 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -1119,6 +1119,12 @@ function findCharacterIndex(name) { (a, b) => a.includes(b), ]; + const exactAvatarMatch = characters.findIndex(x => x.avatar === name); + + if (exactAvatarMatch !== -1) { + return exactAvatarMatch; + } + for (const matchType of matchTypes) { const index = characters.findIndex(x => matchType(x.name.toLowerCase(), name.toLowerCase())); if (index !== -1) {