修正表情添加错误的问题

This commit is contained in:
Kokomi 2023-08-14 12:32:28 +08:00
parent 070d54cd71
commit cd818ed212
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ export class add extends plugin {
let num = 0 let num = 0
if (isNaN(keyWord)) { if (isNaN(keyWord)) {
num = keyWord.trim().match(/[0-9]+/g)[0] num = keyWord.trim().match(/[0-9]+$/)?.[0]
if (!isNaN(num) && !textArr[this.group_id].has(keyWord) && !textArr[this.e.bot.uin].has(keyWord)) { if (!isNaN(num) && !textArr[this.group_id].has(keyWord) && !textArr[this.e.bot.uin].has(keyWord)) {
keyWord = lodash.trimEnd(keyWord, num).trim() keyWord = lodash.trimEnd(keyWord, num).trim()