Documentation ¶
Index ¶
- Constants
- func CreateItem(db *gorm.DB, publisher *events.Publisher, item *Item) error
- func CreateOptionForItem(db *gorm.DB, publisher *events.Publisher, id uint, guildID string, ...) error
- type Item
- type ItemLogMessage
- type ItemOption
- type Plugin
- func (p *Plugin) Action(event *events.Event) bool
- func (p *Plugin) Help() *common.PluginHelp
- func (p *Plugin) Names() []string
- func (p *Plugin) Passthrough() bool
- func (p *Plugin) Priority() int
- func (p *Plugin) Start(params common.StartParameters) error
- func (p *Plugin) Stop(params common.StopParameters) error
Constants ¶
View Source
const ( ActionTypeModDM actionType = "cacophony_mod_dm" ActionTypeModNote actionType = "cacophony_mod_note" ActionTypeDiscordBan actionType = "discord_ban" ActionTypeDiscordUnban actionType = "discord_unban" ActionTypeDiscordJoin actionType = "discord_join" ActionTypeDiscordLeave actionType = "discord_leave" ActionTypeChannelCreate actionType = "discord_channel_create" ActionTypeRoleCreate actionType = "discord_role_create" ActionTypeGuildUpdate actionType = "discord_guild_update" ActionTypeMemberUpdate actionType = "discord_member_update" ActionTypeChannelUpdate actionType = "discord_channel_update" ActionTypeChannelDelete actionType = "discord_channel_delete" ActionTypeRoleUpdate actionType = "discord_role_update" ActionTypeRoleDelete actionType = "discord_role_delete" ActionTypeEmojiCreate actionType = "discord_emoji_create" ActionTypeEmojiUpdate actionType = "discord_emoji_update" ActionTypeEmojiDelete actionType = "discord_emoji_delete" ActionTypeWebhookCreate actionType = "discord_webhook_create" ActionTypeWebhookUpdate actionType = "discord_webhook_update" ActionTypeWebhookDelete actionType = "discord_webhook_delete" ActionTypeInviteCreate actionType = "discord_invite_create" ActionTypeInviteUpdate actionType = "discord_invite_update" ActionTypeInviteDelete actionType = "discord_invite_delete" )
Actions
View Source
const ( EntityTypeUser entityType = "discord_user" EntityTypeRole entityType = "discord_role" EntityTypeGuild entityType = "discord_guild" EntityTypeChannel entityType = "discord_channel" EntityTypeEmoji entityType = "discord_emoji" EntityTypeWebhook entityType = "discord_webhook" EntityTypePermission entityType = "discord_permission" EntityTypeColor entityType = "discord_color" EntityTypeChannelType entityType = "discord_channel_type" EntityTypePermissionOverwrites entityType = "discord_permission_overwrites" EntityTypeDiscordInvite entityType = "discord_invite" EntityTypeGuildVerificationLevel entityType = "discord_guild_verification_level" EntityTypeGuildExplicitContentLevel entityType = "discord_guild_explicit_content_level" EntityTypeGuildMfaLevel entityType = "discord_guild_mfa_level" EntityTypeImageURL entityType = "cacophony_image_url" // TODO: cache? EntityTypeMessageCode entityType = "cacophony_message_code" EntityTypeText entityType = "text" EntityTypeNumber entityType = "number" EntityTypeBool entityType = "bool" EntityTypeSeconds entityType = "seconds" // TODO )
Entities
Variables ¶
This section is empty.
Functions ¶
func CreateOptionForItem ¶
Types ¶
type Item ¶
type Item struct { gorm.Model UUID uuid.UUID `gorm:"UNIQUE_INDEX;NOT NULL;Type:uuid"` GuildID string `gorm:"NOT NULL"` ActionType actionType `gorm:"NOT NULL"` AuthorID string // Author UserID TargetType entityType TargetValue string WaitingForAuditLogBackfill bool Reverted bool Options []ItemOption LogMessage ItemLogMessage `gorm:"embedded;embedded_prefix:log_message_"` }
func FindManyItem ¶
type ItemLogMessage ¶
type ItemOption ¶
type ItemOption struct { gorm.Model ItemID uint `gorm:"NOT NULL;unique_index:idx_itemid_authorid_key"` AuthorID string `gorm:"unique_index:idx_itemid_authorid_key"` Key string `gorm:"NOT NULL;unique_index:idx_itemid_authorid_key"` PreviousValue string NewValue string Type entityType }
func (*ItemOption) TableName ¶
func (*ItemOption) TableName() string
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) Help ¶
func (p *Plugin) Help() *common.PluginHelp
func (*Plugin) Passthrough ¶
Click to show internal directories.
Click to hide internal directories.