From bd634d062a674e1e556e120616b4ddb2ad4742fd Mon Sep 17 00:00:00 2001 From: everpcpc Date: Sun, 24 Mar 2024 15:37:00 +0000 Subject: [PATCH] fix: ignore ai if no key --- telegram/checks.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telegram/checks.go b/telegram/checks.go index 933e63b..94c0ea3 100644 --- a/telegram/checks.go +++ b/telegram/checks.go @@ -93,6 +93,9 @@ func checkSave(b *Bot, message *tgbotapi.Message) { } func checkOpenAI(b *Bot, message *tgbotapi.Message) { + if b.ai == nil { + return + } if !b.isAuthedChat(message.Chat) { return }