修正在消息关键词中指定数字大于9时无法正确读取对应映射关系的问题 (#223)
This commit is contained in:
parent
9df10b9bb4
commit
418572110c
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue