aboutsummaryrefslogtreecommitdiff
path: root/xp
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-04-16 15:58:20 +0200
committerAnhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me>2024-04-16 15:58:20 +0200
commitfe789ad0722924c47243859906497ee2a3a55134 (patch)
treeaac8b09a03b43d0cc75622d9dd0747c74dbeaea4 /xp
parent6b595b8b11e9ac05302ee15ab7734e49b89594e5 (diff)
feat(command): reset and reset-user
Diffstat (limited to 'xp')
-rw-r--r--xp/member.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/xp/member.go b/xp/member.go
index bbf013c..9859ca2 100644
--- a/xp/member.go
+++ b/xp/member.go
@@ -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