Documentation ¶
Index ¶
- Constants
- Variables
- func HandleChannelUpdate(evt *eventsystem.EventData) (retry bool, err error)
- func HandleGuildMemberAdd(evtData *eventsystem.EventData) (retry bool, err error)
- func HandleGuildMemberRemove(evt *eventsystem.EventData) (retry bool, err error)
- func HandleNotificationsGet(w http.ResponseWriter, r *http.Request) interface{}
- func HandleNotificationsPost(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func RegisterPlugin()
- type Config
- type Plugin
Constants ¶
View Source
const ( RecordSeparator = "\x1e" MaxUserMessages = 10 )
Variables ¶
View Source
var DefaultConfig = &Config{}
View Source
var PageHTML string
Functions ¶
func HandleChannelUpdate ¶
func HandleChannelUpdate(evt *eventsystem.EventData) (retry bool, err error)
func HandleGuildMemberAdd ¶
func HandleGuildMemberAdd(evtData *eventsystem.EventData) (retry bool, err error)
func HandleGuildMemberRemove ¶
func HandleGuildMemberRemove(evt *eventsystem.EventData) (retry bool, err error)
func HandleNotificationsGet ¶
func HandleNotificationsGet(w http.ResponseWriter, r *http.Request) interface{}
func HandleNotificationsPost ¶
func HandleNotificationsPost(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func RegisterPlugin ¶
func RegisterPlugin()
Types ¶
type Config ¶
type Config struct { configstore.GuildConfigModel JoinServerEnabled bool `json:"join_server_enabled" schema:"join_server_enabled"` JoinServerChannel string `json:"join_server_channel" schema:"join_server_channel" valid:"channel,true"` // TODO: Remove the legacy single-message variant when ready to migrate the // database. JoinServerMsg string `json:"join_server_msg" valid:"template,5000"` JoinServerMsgs []string `json:"join_server_msgs" schema:"join_server_msgs" gorm:"-" valid:"template,5000"` // Do Not Use! For persistence only. JoinServerMsgs_ string `json:"-"` JoinDMEnabled bool `json:"join_dm_enabled" schema:"join_dm_enabled"` JoinDMMsg string `json:"join_dm_msg" schema:"join_dm_msg" valid:"template,5000"` LeaveEnabled bool `json:"leave_enabled" schema:"leave_enabled"` LeaveChannel string `json:"leave_channel" schema:"leave_channel" valid:"channel,true"` LeaveMsg string `json:"leave_msg" schema:"leave_msg" valid:"template,5000"` LeaveMsgs []string `json:"leave_msgs" schema:"leave_msgs" gorm:"-" valid:"template,5000"` // Do Not Use! For persistence only. LeaveMsgs_ string `json:"-"` TopicEnabled bool `json:"topic_enabled" schema:"topic_enabled"` TopicChannel string `json:"topic_channel" schema:"topic_channel" valid:"channel,true"` CensorInvites bool `schema:"censor_invites"` }
func (*Config) BeforeSave ¶ added in v0.29.1
GORM BeforeSave hook
func (*Config) JoinServerChannelInt ¶
func (*Config) LeaveChannelInt ¶
func (*Config) TopicChannelInt ¶
type Plugin ¶
type Plugin struct{}
func (*Plugin) LoadServerHomeWidget ¶ added in v1.17.0
func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func (*Plugin) PluginInfo ¶ added in v1.17.0
func (p *Plugin) PluginInfo() *common.PluginInfo
Click to show internal directories.
Click to hide internal directories.