Documentation ¶
Index ¶
- Constants
- Variables
- func RandStringRunes(n int) string
- func RegisterPlugin()
- func ScheduledEventMW(...) ...
- func VerificationPendingMembersKey(gID int64) string
- type CheckCAPTCHARequest
- type CheckCAPTCHAResponse
- type FormData
- type Plugin
- func (p *Plugin) BotInit()
- func (p *Plugin) CheckBanned(guildID int64, users []*discordgo.User) (*discordgo.GuildBan, error)
- func (p *Plugin) InitWeb()
- func (p *Plugin) LoadServerHomeWidget(w http.ResponseWriter, r *http.Request) (web.TemplateData, error)
- func (p *Plugin) PluginInfo() *common.PluginInfo
- type RecentGuildBan
- type VerificationEventData
Constants ¶
View Source
const DefaultDMMessage = `` /* 191-byte string literal not displayed */
View Source
const (
DefaultPageContent = `## Verification
Please solve the following reCAPTCHA to make sure you're not a robot`
)
View Source
const InTicketPerms = discordgo.PermissionSendMessages | discordgo.PermissionViewChannel
Variables ¶
View Source
var DBSchemas = []string{`
CREATE TABLE IF NOT EXISTS verification_configs (
guild_id BIGINT PRIMARY KEY,
enabled BOOLEAN NOT NULL,
verified_role BIGINT NOT NULL,
page_content TEXT NOT NULL,
kick_unverified_after INT NOT NULL,
warn_unverified_after INT NOT NULL,
warn_message TEXT NOT NULL,
log_channel BIGINT NOT NULL
);
`, `
ALTER TABLE verification_configs ADD COLUMN IF NOT EXISTS dm_message TEXT NOT NULL DEFAULT '';
`, `
CREATE TABLE IF NOT EXISTS verification_sessions (
token TEXT PRIMARY KEY,
user_id BIGINT NOT NULL,
guild_id BIGINT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL,
solved_at TIMESTAMP WITH TIME ZONE,
expired_at TIMESTAMP WITH TIME ZONE
);
`, `
CREATE TABLE IF NOT EXISTS verified_users (
guild_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
verified_at TIMESTAMP WITH TIME ZONE NOT NULL,
ip TEXT NOT NULL,
PRIMARY KEY(guild_id, user_id)
);
`}
View Source
var PageHTMLControlPanel string
View Source
var PageHTMLVerifyPage string
Functions ¶
func RandStringRunes ¶
func RegisterPlugin ¶
func RegisterPlugin()
func ScheduledEventMW ¶
func ScheduledEventMW(innerHandler func(ms *dstate.MemberState, guildID int64, conf *models.VerificationConfig, rawData interface{}) (bool, error)) func(evt *seventsmodels.ScheduledEvent, data interface{}) (retry bool, err error)
Types ¶
type CheckCAPTCHARequest ¶
type CheckCAPTCHAResponse ¶
type FormData ¶
type FormData struct { Enabled bool VerifiedRole int64 `valid:"role,true"` PageContent string `valid:",10000"` KickUnverifiedAfter int `valid:"0,"` WarnUnverifiedAfter int `valid:"0,"` WarnMessage string `valid:"template,10000"` DMMessage string `valid:"template,10000"` LogChannel int64 `valid:"channel,true"` }
type Plugin ¶
type Plugin struct{}
func (*Plugin) CheckBanned ¶
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
type VerificationEventData ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.