fix channel resolver issues with plain name
This commit is contained in:
parent
06de913e11
commit
65b5938192
@ -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 = /^<?#?([0-9]*)>?/iu;
|
||||
const name = /^#?([a-z0-9\-_0]+)/iu;
|
||||
const id = /^<?#?([0-9]{17,22})>?/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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user