From 65b5938192046c5381d7a584fdca1a1e8b352ed9 Mon Sep 17 00:00:00 2001 From: Navy Date: Wed, 9 Jun 2021 18:11:39 +0300 Subject: [PATCH] fix channel resolver issues with plain name --- structure/client/Resolver.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/structure/client/Resolver.js b/structure/client/Resolver.js index a2dc71e..8c5e9c7 100644 --- a/structure/client/Resolver.js +++ b/structure/client/Resolver.js @@ -531,18 +531,16 @@ class Resolver { const resolved = []; for(const resolveable of resolveables) { - const channel = CM.resolve(resolveable); if(channel && filter(channel)) { resolved.push(channel); continue; } - const name = /^#?([a-z0-9\-_0]*)/iu; - const id = /^?/iu; + const name = /^#?([a-z0-9\-_0]+)/iu; + const id = /^?/iu; if (id.test(resolveable)) { - const match = resolveable.match(id); const [, ch] = match; @@ -551,7 +549,6 @@ class Resolver { if (channel && filter(channel)) resolved.push(channel); } else if (name.test(resolveable)) { - const match = resolveable.match(name); const ch = match[1].toLowerCase();