Documentation ¶
Overview ¶
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
SPDX-License-Identifier: AGPL-3.0-only
Index ¶
- func InitCommands(bot *bot.Bot) (s string, list []*bcr.Command)
- type ActionType
- type Entry
- type Export
- type ModLog
- func (bot *ModLog) Embed(s *state.State, entry *Entry) (embed discord.Embed)
- func (bot *ModLog) InsertEntry(guildID discord.GuildID, user, mod discord.UserID, timestamp time.Time, ...) (log *Entry, err error)
- func (bot *ModLog) Log(s *state.State, actionType ActionType, guildID discord.GuildID, ...) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionType ¶
type ActionType string
ActionType ...
const ( ActionBan ActionType = "ban" ActionUnban ActionType = "unban" ActionKick ActionType = "kick" ActionWarn ActionType = "warn" ActionChannelban ActionType = "channelban" ActionUnchannelban ActionType = "unchannelban" )
Constants for action types
type Entry ¶
type Entry struct { ID int64 `json:"id"` ServerID discord.GuildID `json:"-"` UserID discord.UserID `json:"user_id"` ModID discord.UserID `json:"mod_id"` ActionType ActionType `json:"action_type"` Reason string `json:"reason,omitempty"` Time time.Time `json:"timestamp"` ChannelID discord.ChannelID `json:"-"` MessageID discord.MessageID `json:"-"` }
Entry ...
type Export ¶
type Export struct { ServerID discord.GuildID `json:"server_id"` Timestamp time.Time `json:"timestamp"` Entries []Entry `json:"entries"` }
Export is an export of a server's mod logs
type ModLog ¶
ModLog can be created in two ways: either by bcr for commands, or other
Source Files ¶
Click to show internal directories.
Click to hide internal directories.