config

package
v1.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBCon *sql.DB

Server contains entires for each registered server DEPRECEATED: Use the sql package instead and store your data in tables

Functions

func GenerateMysqlLink(conf Mysql) string

func LoadServerConfig

func LoadServerConfig(filename string) (conf map[string]ServerConfig, err error)

LoadServerConfig loads the serverconfig from a given file DEPRECEATED: Use the sql package instead and store your data in tables

Types

type Bot

type Bot struct {
	Token   string
	OwnerID string
	Prefix  string
}

func LoadBotConfig

func LoadBotConfig(filename string) (conf Bot, err error)

type Mysql

type Mysql struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
}

func LoadMysqlConfig

func LoadMysqlConfig(filename string) (conf Mysql, err error)

type ServerConfig

type ServerConfig struct {
	ID           string
	Prefix       string
	VerifiedRole string
	Ranks        map[string]string
	AdminRole    string
	Guild        struct {
		ID     string
		ApiKey string
		Role   []struct {
			Name string // GW2NAME
			ID   string // DISCORD ID
		}
	}
	// The guildsync module
	GuildSync struct {
		MemberRole string
	}
	// The wvw module
	WvW struct {
		DefaultWorld int
	}
	// The role module
	Role struct {
		Roles map[string]string
	}
}

ServerConfig holds static data for a server required by modules DEPRECEATED: Use the sql package instead and store your data in tables

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL