mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-14 21:31:50 +00:00
Fix error when calling resolveUserId with null/missing user id
This commit is contained in:
parent
328ec379c5
commit
a48a58bd3c
1 changed files with 4 additions and 0 deletions
|
@ -622,6 +622,10 @@ const unknownUsers = new Set();
|
|||
const unknownMembers = new Set();
|
||||
|
||||
export function resolveUserId(bot: Client, value: string) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// A user mention?
|
||||
const mentionMatch = value.match(/^<@!?(\d+)>$/);
|
||||
if (mentionMatch) {
|
||||
|
|
Loading…
Add table
Reference in a new issue