Compare commits

..

No commits in common. "06bf6fd73356fa23c6522b4712854bad3ee6791f" and "fcfec95c2f827a15ebe4ff9b5ac8ced7b92764d0" have entirely different histories.

3 changed files with 2 additions and 7 deletions

View File

@ -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: %s", err) log.Error().Msgf("Error querying leaderboard: %w", err)
return nil, err return nil, err
} }
for i := range items { for i := range items {

View File

@ -90,11 +90,6 @@ 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)) p.b.Send(c, bot.Message, message.Channel, fmt.Sprintf("You guessed the last impossible wikipedia article: \"%s\"", p.title))
for !p.refreshImpossible() { 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 return messaged

View File

@ -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 { if lastTweet < tweet.Id && tweet.RetweetedStatus != nil {
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 {