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 }