Versions in this module Expand all Collapse all v0 v0.3.2 May 24, 2025 Changes in this version + type ChannelFormat int + const ChannelFormatDisplay + const ChannelFormatMention + func ParseChannelFormat(s string) ChannelFormat + func (f ChannelFormat) Format(channel discord.Channel) string + func (f ChannelFormat) String() string + type History int + const HistoryNameOnly + const HistoryNameWithDuration + const HistoryNameWithDurationAndTimeline + const HistoryNone + func ParseHistory(s string) History + func (m History) ShouldDisplayDuration() bool + func (m History) ShouldDisplayName() bool + func (m History) ShouldDisplayTimeline() bool + func (m History) String() string + type Repository interface + DeleteRule func(scope Scope, id snowflake.ID) + EffectiveRule func(guildID snowflake.ID, categoryID *snowflake.ID, channelID snowflake.ID) Rule + FindCategoryRule func(categoryID snowflake.ID) (Rule, bool) + FindChannelRule func(channelID snowflake.ID) (Rule, bool) + FindGuildRule func(guildID snowflake.ID) (Rule, bool) + FindRule func(scope Scope, id snowflake.ID) (Rule, bool) + SaveRule func(scope Scope, id snowflake.ID, rule Rule) + ScopedEffectiveRule func(guildID snowflake.ID, categoryID *snowflake.ID, channelID snowflake.ID) (Rule, Scope) + func CreateRepository(db *gorm.DB) Repository + type Rule struct + ChannelFormat ChannelFormat + Enabled bool + History History + NotificationChannel snowflake.ID + UserFormat UserFormat + type RuleModel struct + ChannelFormat string + Enabled bool + History string + Identifier uint64 + NotificationChannel uint64 + Scope int + UserFormat string + type Scope int + const ScopeCategory + const ScopeChannel + const ScopeGuild + func (s Scope) String() string + type UserFormat int + const UserFormatDisplay + const UserFormatMention + const UserFormatUsername + func ParseUserFormat(s string) UserFormat + func (f UserFormat) Format(member *discord.Member) string + func (f UserFormat) String() string