Documentation
¶
Index ¶
- func Dir(useLocal bool, name string) http.FileSystem
- func FS(useLocal bool) http.FileSystem
- func FSByte(useLocal bool, name string) ([]byte, error)
- func FSMustByte(useLocal bool, name string) []byte
- func FSMustString(useLocal bool, name string) string
- func FSString(useLocal bool, name string) (string, error)
- func HandleAutoroles(w http.ResponseWriter, r *http.Request) interface{}
- func HandlePresenceUpdate(evt *eventsystem.EventData)
- func HandleUpdateAutomodRules(event *pubsub.Event)
- func KeyGeneral(guildID int64) string
- func KeyProcessing(guildID int64) string
- func OnMemberJoin(evt *eventsystem.EventData)
- func RegisterPlugin()
- type Form
- type GeneralConfig
- type LegacyGeneralConfig
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
func Dir(useLocal bool, name string) http.FileSystem
Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.
func FS ¶
func FS(useLocal bool) http.FileSystem
FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSByte ¶
FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.
func FSMustByte ¶
FSMustByte is the same as FSByte, but panics if name is not present.
func FSMustString ¶
FSMustString is the string version of FSMustByte.
func HandleAutoroles ¶
func HandleAutoroles(w http.ResponseWriter, r *http.Request) interface{}
func HandlePresenceUpdate ¶
func HandlePresenceUpdate(evt *eventsystem.EventData)
HandlePresenceUpdate makes sure the member with joined_at is available for the relevant guilds TODO: Figure out a solution that scales better
func KeyGeneral ¶
func KeyProcessing ¶
func OnMemberJoin ¶
func OnMemberJoin(evt *eventsystem.EventData)
func RegisterPlugin ¶
func RegisterPlugin()
Types ¶
type Form ¶
type Form struct {
GeneralConfig `valid:"traverse"`
}
type GeneralConfig ¶
type GeneralConfig struct { Role int64 `json:",string" valid:"role,true"` RequiredDuration int RequiredRoles []int64 `valid:"role,true"` IgnoreRoles []int64 `valid:"role,true"` OnlyOnJoin bool }
func GetGeneralConfig ¶
func GetGeneralConfig(client *redis.Client, guildID int64) (*GeneralConfig, error)
func (*GeneralConfig) CanAssignTo ¶
func (conf *GeneralConfig) CanAssignTo(member *discordgo.Member) bool
func (*GeneralConfig) UnmarshalJSON ¶
func (l *GeneralConfig) UnmarshalJSON(b []byte) error
type LegacyGeneralConfig ¶
Click to show internal directories.
Click to hide internal directories.