don't assume that the first string found is a mention
This commit is contained in:
parent
9d6feaff8d
commit
b3220fa155
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ function parseMention(
|
|||
entry: Args,
|
||||
argsNullable: Array<string | null>
|
||||
): void {
|
||||
const index = argsNullable.findIndex((x) => typeof x === 'string')
|
||||
const index = argsNullable.findIndex(
|
||||
(x) => typeof x === 'string' && x.includes('<@!')
|
||||
)
|
||||
const regexMatches = MessageMentions.USER_MENTION.exec(argsNullable[index]!)
|
||||
args[entry.name] =
|
||||
regexMatches !== null
|
||||
|
|
Loading…
Reference in a new issue