Actually fix panic when a ticket is closed and the log contains no messages
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Elara 2023-12-15 07:00:39 -08:00
parent 8452a2e8e9
commit ee61581b29
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ func writeMsgs(msgs []*discordgo.Message, w io.Writer) error {
return nil
}
for i := len(msgs); i >= 0; i-- {
for i := len(msgs) - 1; i >= 0; i-- {
_, err := io.WriteString(w, fmt.Sprintf("%s - %s\n", msgs[i].Author.Username, msgs[i].Content))
if err != nil {
return err