修正在消息关键词中指定数字大于9时无法正确读取对应映射关系的问题 (#223)

This commit is contained in:
Lawrence_XS 2023-08-14 02:40:35 +08:00 committed by GitHub
parent 9df10b9bb4
commit 418572110c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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.charAt(keyWord.length - 1) num = keyWord.trim().match(/[0-9]+/g)[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()