3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 15:45:03 +00:00

Fix error if game doesnt have small text or large text but only one

This commit is contained in:
Dark 2020-04-05 15:34:23 +02:00 committed by Miikka
parent 29a5c027fb
commit 25a2cc63c2

View file

@ -397,11 +397,14 @@ export class UtilityPlugin extends ZeppelinPlugin<TConfigSchema> {
return true;
}
if (
member.game.assets &&
(member.game.assets.small_text.match(queryRegex) || member.game.assets.large_text.match(queryRegex))
) {
return true;
if (member.game.assets) {
if (member.game.assets.small_text && member.game.assets.small_text.match(queryRegex)) {
return true;
}
if (member.game.assets.large_text && member.game.assets.large_text.match(queryRegex)) {
return true;
}
}
if (member.game.emoji && member.game.emoji.name.match(queryRegex)) {