fix: 定时任务的错误

This commit is contained in:
ikechan8370 2023-03-05 21:48:16 +08:00
parent 3692dd951c
commit a6a73a0822

View file

@ -31,7 +31,7 @@ export class Entertainment extends plugin {
async sendMessage (e) {
let groupId = e.msg.replace(/^#(chatgpt|ChatGPT)打招呼/, '')
groupId = parseInt(groupId)
if (!Bot.getGroupList().get(groupId)) {
if (groupId && !Bot.getGroupList().get(groupId)) {
await e.reply('机器人不在这个群里!')
return
}