fix: 停止服务后不应再继续发送消息

This commit is contained in:
milimoe 2024-05-17 21:24:15 +08:00
parent 4ba00e7a90
commit 4ed0530101
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E

View File

@ -160,6 +160,7 @@ namespace Milimoe.RainBOT.Settings
if (delay > 0)
{
await Task.Delay(delay);
if (!GeneralSettings.IsRun) return;
}
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
}
@ -171,6 +172,7 @@ namespace Milimoe.RainBOT.Settings
if (delay > 0)
{
await Task.Delay(delay);
if (!GeneralSettings.IsRun) return;
}
await SendMessage(SupportedAPI.send_group_msg, group_id, function, content, true);
}