🐞 fix: 修复空格导致的不能触发

This commit is contained in:
秋刀鱼 2024-11-05 16:40:41 +08:00
parent 103748cd88
commit 82f8c26b97

View File

@ -109,8 +109,8 @@ export class songRequest extends plugin {
}
})
} else if (await redisGetKey(REDIS_YUNZAI_SONGINFO) != []) {
if (e.msg.match(/听(\d+)/)) {
const pickNumber = e.msg.match(/听(\d+)/)[1] - 1
if (e.msg.replace(/\s+/g, "").match(/听(\d+)/)) {
const pickNumber = e.msg.replace(/\s+/g, "").match(/听(\d+)/)[1] - 1
let group_id = e.group.group_id
if (!group_id) return
let songInfo = await redisGetKey(REDIS_YUNZAI_SONGINFO)