From 89b23632f5ceeebd82132210c1407dc9514a547b Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sat, 7 Mar 2026 13:20:56 +0100 Subject: feat(gokord): replace snowflake by uint --- user/member.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'user/member.go') diff --git a/user/member.go b/user/member.go index e3a1d30..db39911 100644 --- a/user/member.go +++ b/user/member.go @@ -9,16 +9,16 @@ import ( type Copaing struct { ID uint `gorm:"primarykey"` - DiscordID string `gorm:"not null"` + DiscordID uint64 `gorm:"not null"` CopaingXPs []CopaingXP `gorm:"constraint:OnDelete:SET NULL;"` - GuildID string `gorm:"not null"` + GuildID uint64 `gorm:"not null"` } type CopaingXP struct { ID uint `gorm:"primarykey"` XP uint `gorm:"default:0"` CopaingID uint - GuildID string `gorm:"not null;"` + GuildID uint64 `gorm:"not null;"` CreatedAt time.Time } @@ -27,7 +27,7 @@ type CopaingAccess interface { GetXP() uint } -func GetCopaing(ctx context.Context, discordID string, guildID string) *CopaingCached { +func GetCopaing(ctx context.Context, discordID, guildID uint64) *CopaingCached { state := GetState(ctx) cc, err := state.Copaing(guildID, discordID) if err != nil { -- cgit v1.2.3