Versions in this module Expand all Collapse all v0 v0.1.0 Feb 19, 2026 Changes in this version + var DB *gorm.DB + var ErrNoSqid = errors.New("no sqid could be decoded") + func AddMembersToBePruned(pruneID uuid.UUID, members []discord.Member) error + func DeleteInfractionBySqid(sqid string, guildID snowflake.ID) error + func DeletePrunesBeforeTime(t time.Time) error + func GetUserTotalInfractionWeight(guildID, userID snowflake.ID, halfLifeDays float64) (float64, error) + func InitDB(path string) (*gorm.DB, error) + func IsMemberPruned(guildID, userID snowflake.ID) (bool, error) + func RemoveMembersByPruneID(pruneID uuid.UUID, guildID snowflake.ID) error + func RemovePrunedMembers(guildID snowflake.ID) error + func SetGuildSettings(settings *GuildSettings) error + func SetMemberPruned(guildID snowflake.ID, userID snowflake.ID, pruned bool) error + func SetModmailSettings(settings *ModmailSettings) error + type GuildSettings struct + AlwaysSendBanFooter bool + AntiSpamCooldownSeconds int + AntiSpamCount int + AntiSpamEnabled bool + BanFooter string + GatekeepAddPendingRoleOnJoin bool + GatekeepApprovedMessage string + GatekeepApprovedRole snowflake.ID + GatekeepEnabled bool + GatekeepPendingRole snowflake.ID + GuildID snowflake.ID + InfractionHalfLifeDays float64 + JoinLeaveChannel snowflake.ID + JoinMessage string + JoinMessageEnabled bool + LeaveMessage string + LeaveMessageEnabled bool + ModeratorChannel snowflake.ID + NotifyOnWarnedUserJoin bool + NotifyWarnSeverityThreshold float64 + UpdatedAt time.Time + func GetGuildSettings(guildID snowflake.ID) (*GuildSettings, error) + type Infraction struct + GuildID snowflake.ID + Moderator snowflake.ID + Reason string + Silent bool + Timestamp time.Time + UserID snowflake.ID + Weight float64 + func CreateInfraction(guildID, userID, moderator snowflake.ID, reason string, weight float64, ...) (*Infraction, error) + func GetUserInfractions(guildID, userID snowflake.ID, limit, offset int) ([]Infraction, int64, error) + func (i Infraction) Sqid() string + type MemberPendingPrune struct + GuildID snowflake.ID + PruneID uuid.UUID + Pruned bool + Timestamp time.Time + UserID snowflake.ID + func GetMembersToPrune(pruneID uuid.UUID, guildID snowflake.ID) ([]MemberPendingPrune, error) + func GetPrunedMembers(pruneID uuid.UUID, guildID snowflake.ID) ([]MemberPendingPrune, error) + type ModmailSettings struct + GuildID snowflake.ID + ReportNotificationChannel snowflake.ID + ReportPingRole snowflake.ID + ReportThreadsChannel snowflake.ID + UpdatedAt time.Time + func GetModmailSettings(guildID snowflake.ID) (*ModmailSettings, error) + type TempBan struct + Banner snowflake.ID + CreatedAt time.Time + GuildID snowflake.ID + Reason string + Until time.Time + UpdatedAt time.Time + UserID snowflake.ID + func CreateTempBan(guildID, userID, banner snowflake.ID, reason string, until time.Time) (*TempBan, error) + func GetExpiredTempBans() ([]TempBan, error) + func GetTempBan(guildID, userID snowflake.ID) (*TempBan, error) + func GetTempBans(guildID snowflake.ID) ([]TempBan, error) + func (tb *TempBan) Delete() error