Documentation ¶
Index ¶
- Constants
- Variables
- func RandStringRunes(n int) string
- func RegisterPlugin()
- func ScheduledEventMW(...) ...
- 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.PermissionReadMessages
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)
);
`}
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 Plugin ¶
type Plugin struct{}
func (*Plugin) CheckBanned ¶ added in v1.19.11
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 RecentGuildBan ¶ added in v1.19.11
type VerificationEventData ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.