feat(command): reset and reset-user

This commit is contained in:
Anhgelus Morhtuuzh 2024-04-16 15:58:20 +02:00
parent 6b595b8b11
commit fe789ad072
No known key found for this signature in database
GPG key ID: CF4550297832A29F
3 changed files with 56 additions and 0 deletions

View file

@ -185,6 +185,10 @@ func (c *Copaing) GetUserBase() *gokord.UserBase {
return &gokord.UserBase{DiscordID: c.DiscordID, GuildID: c.GuildID}
}
func (c *Copaing) Reset() {
gokord.DB.Where("guild_id = ? AND discord_id", c.GuildID, c.DiscordID).Delete(c)
}
func getRedisClient() (*redis.Client, error) {
if redisClient == nil {
var err error