Golang bot for managing discord verifications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.3 KiB

4 years ago
package main
import (
"time"
"github.com/bwmarrin/discordgo"
"github.com/rudi9719/loggy"
)
4 years ago
// BotCommand struct used for modular commands
type BotCommand struct {
Message *discordgo.MessageCreate
Session *discordgo.Session
Parts []string
Command string
}
// Command is the type to store commands
type Command struct {
Name string
RequiresAdmin bool
Help string
Keywords []string
Exec func(BotCommand) bool
}
4 years ago
// Config struct used for bot
type Config struct {
GuildID string
AdminChannel string
AdminRole string
MonitorRole string
IntroChann string
4 years ago
MonitorChann string
SocialChanns []string
4 years ago
VerifiedRole string
BumpTime time.Time
LastBumper string
4 years ago
Stats map[string]int
Activity map[string]int
4 years ago
Unverified map[string]time.Time
Verifications map[string]Verification
Probations map[string]time.Time
LogOpts loggy.LogOpts
WhitelistURLs []string
4 years ago
}
// Verification struct used for storing and logging
4 years ago
type Verification struct {
UserID string
Username string
Photo string
Submitted time.Time
Status string
Admin string
Closed time.Time
}
3 years ago
// Tokens are the Login Token struct
type Tokens struct {
Username string
IP string
Password string
Timestamp time.Time
}