Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VERSION = "v0.0.0" PQ *sql.DB SuccessGreen = 0x00ff7b ErrorRed = 0xFF0000 Session *discordgo.Session Bot *discordgo.User )
View Source
var ( ConfigBotToken = os.Getenv("SUMMIT_TOKEN") ConfigBotClientID = os.Getenv("SUMMIT_CLIENTID") ConfigBotSecret = os.Getenv("SUMMIT_CLIENTSECRET") ConfigPGHost = os.Getenv("SUMMIT_PGHOST") ConfigPGDB = os.Getenv("SUMMIT_PGDB") ConfigPGUsername = os.Getenv("SUMMIT_PGUSER") ConfigPGPassword = os.Getenv("SUMMIT_PGPASSWORD") ConfigSummitHost = os.Getenv("SUMMIT_HOST") ConfigTermsURLOverride = os.Getenv("SUMMIT_TERMSURLOVERRIDE") ConfigPrivacyURLOverride = os.Getenv("SUMMIT_PRIVACYURLOVERRIDE") ConfigBotOwner = os.Getenv("SUMMIT_OWNERID") ConfigSupportID = os.Getenv("SUMMIT_SERVERID") ConfigGitHubRepo = os.Getenv("SUMMIT_GITHUBREPO") ConfigGitHubRepoOwner = os.Getenv("SUMMIT_GITHUBREPOOWNER") )
View Source
var CoreSchema = []string{`
CREATE TABLE IF NOT EXISTS core_config (
guild_id TEXT PRIMARY KEY,
guild_prefix TEXT DEFAULT '~' NOT NULL
);
`, `
CREATE TABLE IF NOT EXISTS banned_guilds (
guild_id TEXT PRIMARY KEY
);
`,
}
Functions ¶
func ConfigDgoBotToken ¶
func ConfigDgoBotToken() string
ConfigDgoBotToken prefixes the bot token with the required "Bot " if it is not done by the host
func Init ¶
func Init() error
Init creates a new discord session, attempts to connect to the postgres database, and intialises all the databases
func InitSchema ¶
InitSchema initialises the schemas passed to the bot
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.