|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
|
|
"github.com/rudi9719/loggy"
|
|
|
|
)
|
|
|
|
|
|
|
|
// 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
|
|
|
|
Help string
|
|
|
|
Keywords []string
|
|
|
|
Exec func(BotCommand) bool
|
|
|
|
}
|
|
|
|
|
|
|
|
// Config struct used for bot
|
|
|
|
type Config struct {
|
|
|
|
GuildID string
|
|
|
|
AdminChannel string
|
|
|
|
AdminRole string
|
|
|
|
MonitorRole string
|
|
|
|
IntroChann string
|
|
|
|
MonitorChann string
|
|
|
|
VerifiedRole string
|
|
|
|
BumpTime time.Time
|
|
|
|
LastBumper string
|
|
|
|
Stats map[string]int
|
|
|
|
Unverified map[string]time.Time
|
|
|
|
Verifications map[string]Verification
|
|
|
|
Probations map[string]time.Time
|
|
|
|
LogOpts loggy.LogOpts
|
|
|
|
}
|
|
|
|
|
|
|
|
// Verification struct used for storing and logging
|
|
|
|
type Verification struct {
|
|
|
|
UserID string
|
|
|
|
Username string
|
|
|
|
Photo string
|
|
|
|
Submitted time.Time
|
|
|
|
Status string
|
|
|
|
Admin string
|
|
|
|
Closed time.Time
|
|
|
|
}
|
|
|
|
|
|
|
|
type linkedAccount struct {
|
|
|
|
domainUser string
|
|
|
|
discordUser string
|
|
|
|
sigHash string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Tokens are the Login Token struct
|
|
|
|
type Tokens struct {
|
|
|
|
Username string
|
|
|
|
IP string
|
|
|
|
Password string
|
|
|
|
Timestamp time.Time
|
|
|
|
}
|