diff --git a/lorebot/botfunc.go b/lorebot/botfunc.go index 82e249e..5ca833a 100644 --- a/lorebot/botfunc.go +++ b/lorebot/botfunc.go @@ -86,10 +86,16 @@ func loreRmString(nick, rmString, rmType string, redisClient *redis.Client) erro } // add lore to index - redisClient.SAdd(fmt.Sprintf("index:%s:removed", rmType)) + redisClient.SAdd(fmt.Sprintf("index:%s:removed", rmType), rmString).Err() + if err != nil { + glogger.Error.Printf("error removing lore from 'index:%s:removed'\n", rmType) + } // remove lore form added index - redisClient.SRem(fmt.Sprintf("index:%s:added", rmType)) + redisClient.SRem(fmt.Sprintf("index:%s:added", rmType), rmString).Err() + if err != nil { + glogger.Error.Printf("error removing lore from 'index:%s:added'\n", rmType) + } return nil }