mirror of https://github.com/velour/catbase.git
Merge branch 'master' into ImpossibleGame
This commit is contained in:
commit
4a45b21ffb
|
@ -77,7 +77,7 @@ func LeaderAll(db *sqlx.DB) ([]Item, error) {
|
||||||
var items []Item
|
var items []Item
|
||||||
err := db.Select(&items, s)
|
err := db.Select(&items, s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Msgf("Error querying leaderboard: %w", err)
|
log.Error().Msgf("Error querying leaderboard: %s", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for i := range items {
|
for i := range items {
|
||||||
|
|
|
@ -72,7 +72,7 @@ func (t *Twitter) check(c bot.Connector) {
|
||||||
for _, tweet := range tweets {
|
for _, tweet := range tweets {
|
||||||
userKey := fmt.Sprintf("twitter.last.%s", u)
|
userKey := fmt.Sprintf("twitter.last.%s", u)
|
||||||
lastTweet := int64(t.c.GetInt(userKey, 0))
|
lastTweet := int64(t.c.GetInt(userKey, 0))
|
||||||
if lastTweet < tweet.Id && tweet.RetweetedStatus != nil {
|
if lastTweet < tweet.Id {
|
||||||
link := fmt.Sprintf("https://twitter.com/%s/status/%s", u, tweet.IdStr)
|
link := fmt.Sprintf("https://twitter.com/%s/status/%s", u, tweet.IdStr)
|
||||||
log.Debug().Str("tweet", link).Msg("Unknown tweet")
|
log.Debug().Str("tweet", link).Msg("Unknown tweet")
|
||||||
for _, ch := range chs {
|
for _, ch := range chs {
|
||||||
|
|
Loading…
Reference in New Issue