Skip to content

Commit

Permalink
fix(bots): check resp on nil in sendmessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Jan 18, 2025
1 parent b184d80 commit 1e119ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/bots/internal/twitchactions/sendmessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 1e119ae

Please sign in to comment.