Reverse streamer sort and replaced green circle with red

This commit is contained in:
Asaf Gartner 2022-05-27 16:34:34 +03:00
parent 09c4561428
commit 0d0773fd0e
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ func UpdateStreamers(ctx context.Context, dbConn db.ConnOrTx, streamers []hmndat
} else { } else {
var builder strings.Builder var builder strings.Builder
for _, s := range streamers { for _, s := range streamers {
builder.WriteString(fmt.Sprintf(":green_circle: **%s** is live: <https://twitch.tv/%s>\n> _%s_\nStarted <t:%d:R>\n\n", s.Username, s.Username, s.Title, s.StartTime.Unix())) builder.WriteString(fmt.Sprintf(":red_circle: **%s** is live: <https://twitch.tv/%s>\n> _%s_\nStarted <t:%d:R>\n\n", s.Username, s.Username, s.Title, s.StartTime.Unix()))
} }
messageContent = builder.String() messageContent = builder.String()
} }

View File

@ -387,7 +387,7 @@ func notifyDiscordOfLiveStream(ctx context.Context, dbConn db.ConnOrTx) error {
SELECT $columns SELECT $columns
FROM FROM
twitch_stream twitch_stream
ORDER BY started_at DESC ORDER BY started_at ASC
`, `,
) )
if err != nil { if err != nil {