From 1e119ae691604c7f73e3b6737c7247e6b1561614 Mon Sep 17 00:00:00 2001 From: Satont Date: Sat, 18 Jan 2025 15:41:14 +0300 Subject: [PATCH] fix(bots): check resp on nil in sendmessage --- apps/bots/internal/twitchactions/sendmessage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/bots/internal/twitchactions/sendmessage.go b/apps/bots/internal/twitchactions/sendmessage.go index a1128663f..6ac65821d 100644 --- a/apps/bots/internal/twitchactions/sendmessage.go +++ b/apps/bots/internal/twitchactions/sendmessage.go @@ -144,7 +144,7 @@ func (c *TwitchActions) SendMessage(ctx context.Context, opts SendMessageOpts) e errorMessage = resp.ErrorMessage } - if resp.ErrorMessage != "" && err == nil { + if resp != nil && resp.ErrorMessage != "" && err == nil { err := c.sentMessagesRepository.Create( ctx, sentmessages.CreateInput{ MessageTwitchID: uuid.NewString(),