From bc86bb4859c4537032f9ca8d57ac32cc14dbd629 Mon Sep 17 00:00:00 2001 From: ascpial Date: Sat, 27 Sep 2025 23:35:32 +0200 Subject: [Feat] Role reaction (#15) * first draft of rolereact * fix(rolereact): fill description when setting it * fix(rolereact): fix some issues * feat(rolereact): split the code in multiple files --- config/guild.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'config/guild.go') diff --git a/config/guild.go b/config/guild.go index e046ca7..8799186 100644 --- a/config/guild.go +++ b/config/guild.go @@ -14,6 +14,25 @@ type GuildConfig struct { DisabledChannels string FallbackChannel string DaysXPRemains uint `gorm:"default:90"` // 30 * 3 = 90 (three months) + RrMessages []RoleReactMessage +} + +type RoleReactMessage struct { + ID uint `gorm:"primarykey"` + MessageID string `gorm:"not null;unique"` + ChannelID string + GuildID string + Note string + Roles []*RoleReact + GuildConfigID uint +} + +type RoleReact struct { + ID uint `gorm:"primarykey"` + Reaction string + RoleID string + RoleReactMessageID uint + CounterID uint `gorm:"-"` } func GetGuildConfig(guildID string) *GuildConfig { -- cgit v1.2.3