mirror of https://github.com/velour/catbase.git
Compare commits
6 Commits
fcfec95c2f
...
06bf6fd733
Author | SHA1 | Date |
---|---|---|
Scott Kiesel | 06bf6fd733 | |
Scott Kiesel | 4a45b21ffb | |
Scott Kiesel | 788e6bdb4a | |
Chris Sexton | 7148848f77 | |
Scott Kiesel | 6c27e0cafd | |
Scott Kiesel | 859fb258d2 |
|
@ -77,7 +77,7 @@ func LeaderAll(db *sqlx.DB) ([]Item, error) {
|
|||
var items []Item
|
||||
err := db.Select(&items, s)
|
||||
if err != nil {
|
||||
log.Error().Msgf("Error querying leaderboard: %w", err)
|
||||
log.Error().Msgf("Error querying leaderboard: %s", err)
|
||||
return nil, err
|
||||
}
|
||||
for i := range items {
|
||||
|
|
|
@ -90,6 +90,11 @@ func (p *Impossible) message(c bot.Connector, kind bot.Kind, message msg.Message
|
|||
p.b.Send(c, bot.Message, message.Channel, fmt.Sprintf("You guessed the last impossible wikipedia article: \"%s\"", p.title))
|
||||
for !p.refreshImpossible() {
|
||||
}
|
||||
} else if strings.Contains(lowercase, "i friggin give up") {
|
||||
messaged = true
|
||||
p.b.Send(c, bot.Message, message.Channel, fmt.Sprintf("You're a failure the last impossible wikipedia article: \"%s\"", p.title))
|
||||
for !p.refreshImpossible() {
|
||||
}
|
||||
}
|
||||
|
||||
return messaged
|
||||
|
|
|
@ -72,7 +72,7 @@ func (t *Twitter) check(c bot.Connector) {
|
|||
for _, tweet := range tweets {
|
||||
userKey := fmt.Sprintf("twitter.last.%s", u)
|
||||
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)
|
||||
log.Debug().Str("tweet", link).Msg("Unknown tweet")
|
||||
for _, ch := range chs {
|
||||
|
|
Loading…
Reference in New Issue