Documentation ¶
Index ¶
- Constants
- Variables
- func AutorolePendingMembersKey(gID int64) string
- func KeyGeneral(guildID int64) string
- func KeyProcessing(guildID int64) string
- func RedisKeyFullScanAssignedRoles(gID int64) string
- func RedisKeyFullScanAutoroleMembers(gID int64) string
- func RedisKeyFullScanStatus(gID int64) string
- func RegisterPlugin()
- type Form
- type GeneralConfig
- type Plugin
- func (p *Plugin) AddCommands()
- func (p *Plugin) BotInit()
- func (p *Plugin) InitInternalAPIRoutes(mux *goji.Mux)
- func (p *Plugin) InitWeb()
- func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func (p *Plugin) PluginInfo() *common.PluginInfo
- func (p *Plugin) StopBot(wg *sync.WaitGroup)
Constants ¶
View Source
const ( FullScanStarted int = iota + 1 FullScanIterating FullScanIterationDone FullScanAssigningRole FullScanCancelled )
Variables ¶
View Source
var ErrAlreadyProcessingFullGuild = errors.New("Already processing users on this guild")
View Source
var PageHTML string
Functions ¶
func AutorolePendingMembersKey ¶ added in v2.1.0
func KeyGeneral ¶
func KeyProcessing ¶
func RedisKeyFullScanStatus ¶
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 `valid:"0,"` RequiredRoles []int64 `valid:"role,true"` IgnoreRoles []int64 `valid:"role,true"` OnlyOnJoin bool AssignRoleAfterScreening bool IgnoreBots bool }
func GetGeneralConfig ¶
func GetGeneralConfig(guildID int64) (*GeneralConfig, error)
func GuildCacheGetGeneralConfig ¶
func GuildCacheGetGeneralConfig(guildID int64) (*GeneralConfig, error)
func (*GeneralConfig) CanAssignTo ¶
func (conf *GeneralConfig) CanAssignTo(currentRoles []int64, joinedAt time.Time) bool
type Plugin ¶
type Plugin struct{}
func (*Plugin) AddCommands ¶
func (p *Plugin) AddCommands()
func (*Plugin) InitInternalAPIRoutes ¶
func (p *Plugin) InitInternalAPIRoutes(mux *goji.Mux)
func (*Plugin) LoadServerHomeWidget ¶
func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
func (*Plugin) PluginInfo ¶
func (p *Plugin) PluginInfo() *common.PluginInfo
Click to show internal directories.
Click to hide internal directories.