Documentation ¶
Index ¶
- Variables
- func CheckNickname(gDB *gorm.DB, nicknameStmt *sql.Stmt, userID, guildID int64, nickname string)
- func CheckNicknameBulk(gDB *gorm.DB, guildID int64, members []*discordgo.Member)
- func CheckUsername(gDB *gorm.DB, usernameStmt *sql.Stmt, user *discordgo.User)
- func CheckUsernameBulk(gDB *gorm.DB, users []*discordgo.User)
- func EvtProcesser()
- func EvtProcesserGCs()
- func HandleDeleteMessageJson(w http.ResponseWriter, r *http.Request) interface{}
- func HandleGC(evt *eventsystem.EventData)
- func HandleLogsCP(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func HandleLogsCPDelete(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func HandleLogsCPSaveGeneral(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func HandleLogsHTML(w http.ResponseWriter, r *http.Request) interface{}
- func HandleMsgDelete(evt *eventsystem.EventData)
- func HandlePresenceUpdate(evt *eventsystem.EventData)
- func HandleQueueEvt(evt *eventsystem.EventData)
- func RegisterPlugin()
- type DeleteData
- type GeneralFormData
- type GuildLoggingConfig
- type LightGC
- type Message
- type MessageLog
- type NicknameListing
- type Plugin
- type UsernameListing
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrChannelBlacklisted = errors.New("Channel blacklisted from creating message logs")
)
Functions ¶
func CheckNickname ¶
func CheckNicknameBulk ¶ added in v1.4.1
func CheckUsernameBulk ¶ added in v1.4.1
func EvtProcesser ¶
func EvtProcesser()
Queue up all the events and process them one by one, because of limited connections
func EvtProcesserGCs ¶
func EvtProcesserGCs()
func HandleDeleteMessageJson ¶
func HandleDeleteMessageJson(w http.ResponseWriter, r *http.Request) interface{}
func HandleGC ¶
func HandleGC(evt *eventsystem.EventData)
func HandleLogsCP ¶
func HandleLogsCP(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func HandleLogsCPDelete ¶
func HandleLogsCPDelete(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func HandleLogsCPSaveGeneral ¶
func HandleLogsCPSaveGeneral(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func HandleLogsHTML ¶
func HandleLogsHTML(w http.ResponseWriter, r *http.Request) interface{}
func HandleMsgDelete ¶
func HandleMsgDelete(evt *eventsystem.EventData)
Mark all log messages with this id as deleted
func HandlePresenceUpdate ¶
func HandlePresenceUpdate(evt *eventsystem.EventData)
func HandleQueueEvt ¶
func HandleQueueEvt(evt *eventsystem.EventData)
While presence update is sent when user changes username.... MAKES NO SENSE IMO BUT WHATEVER Also check nickname incase the user came online
func RegisterPlugin ¶ added in v1.4.1
func RegisterPlugin()
Types ¶
type DeleteData ¶
type DeleteData struct {
ID string
}
type GeneralFormData ¶
type GuildLoggingConfig ¶
type GuildLoggingConfig struct { configstore.GuildConfigModel UsernameLoggingEnabled bool NicknameLoggingEnabled bool BlacklistedChannels string ManageMessagesCanViewDeleted bool EveryoneCanViewDeleted bool ParsedBlacklistedchannels []int64 `gorm:"-"` }
func GetConfig ¶
func GetConfig(guildID int64) (*GuildLoggingConfig, error)
Returns either stored config, err or a default config
func (*GuildLoggingConfig) GetName ¶
func (g *GuildLoggingConfig) GetName() string
func (*GuildLoggingConfig) PostFetch ¶
func (g *GuildLoggingConfig) PostFetch()
type MessageLog ¶
type MessageLog struct { gorm.Model Messages []Message ChannelName string ChannelID string GuildID string Author string AuthorID string }
func CreateChannelLog ¶
func CreateChannelLog(config *GuildLoggingConfig, guildID, channelID int64, author string, authorID int64, count int) (*MessageLog, error)
func GetChannelLogs ¶
func GetChannelLogs(id int64) (*MessageLog, error)
func GetGuilLogs ¶
func GetGuilLogs(guildID int64, before, after, limit int) ([]*MessageLog, error)
func (*MessageLog) Link ¶
func (m *MessageLog) Link() string
type NicknameListing ¶
type NicknameListing struct { gorm.Model UserID int64 `gorm:"index"` GuildID string Nickname string }
func GetNicknames ¶
func GetNicknames(userID, guildID int64, limit int) ([]NicknameListing, error)
type Plugin ¶
type Plugin struct{}
func (*Plugin) AddCommands ¶ added in v1.4.1
func (p *Plugin) AddCommands()
type UsernameListing ¶
func GetUsernames ¶
func GetUsernames(userID int64, limit int) ([]UsernameListing, error)
Click to show internal directories.
Click to hide internal directories.