Skip to content

Commit

Permalink
better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
topi314 committed Jun 5, 2024
1 parent 1426a7a commit 6465865
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions routes/github_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ func processReleaseEvent(b *lavalinkbot.Bot, e *github.ReleaseEvent) error {
Build(),
)
if err != nil {
return err
return fmt.Errorf("failed to send message: %w", err)
}
_, err = b.Client.Rest().CrosspostMessage(msg.ChannelID, msg.ID)
return err
if err != nil {
return fmt.Errorf("failed to crosspost message: %w", err)
}
return nil
}

func substr(input string, start int, length int) string {
Expand Down

0 comments on commit 6465865

Please sign in to comment.