config

package
v0.0.0-...-5b3c2df Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmpDir            = "/tmp/tmp.img"
	ChannelPermission = 8208
	GuildSupport      = "https://discord.com/invite/ydWC5knbJT"

	//Crontab
	TwitterFanart              = "@every 0h3m0s"
	BiliBiliFanart             = "@every 0h6m0s"
	BiliBiliLive               = "@every 0h7m0s"
	BiliBiliSpace              = "@every 0h13m0s"
	YoutubeCheckChannel        = "@every 0h10m30s"
	YoutubeCheckUpcomingByTime = "@every 0h1m0s"
	YoutubePrivateSlayer       = "@every 2h31m0s"
	YoutubeSubscriber          = "@every 1h0m0s"
	BiliBiliFollowers          = "@every 0h30m0s"
	TwitterFollowers           = "@every 0h17m0s"
	DonationMsg                = "@every 0h30m0s"
	CheckServerCount           = "@every 0h1m0s"
)

Variables

View Source
var (
	ModuleList  = []string{"LiveBiliBili", "SpaceBiliBili", "Youtube", "TwitterFanart", "BiliBiliFanart", "YoutubeSubscriber", "BiliBiliFollowers", "TwitterFollowers"}
	BotConf     ConfigFile
	TwitchToken string
	NotFound    string
	YoutubeIMG  string
	BiliBiliIMG string
	TwitterIMG  string
	WorryIMG    string
	GoSimpIMG   string
	Longcatttt  = "https://cdn.ebaumsworld.com/2020/09/20/013235/86394200/longcat-pic.jpg"
	Dead        string
	BSD         string
	Sleep       string
	Bonjour     string
	Howdy       string
	Guten       string
	Koni        string
	Selamat     string
	Assalamu    string
	Approaching string
	CommandURL  string
	GuideURL    string
	VtubersData string
)

Public variables

Functions

This section is empty.

Types

type ConfigFile

type ConfigFile struct {
	Discord        string `toml:"Discord"`
	BiliSess       string `toml:"BiliSess"`
	SauceAPI       string `toml:"SauceAPI"`
	DiscordWebHook string `toml:"DiscordWebHook"`
	MultiTOR       string `toml:"Multitor"`
	DonationLink   string `toml:"DonationLink"`
	TopGG          string `toml:"TOPGG"`
	Domain         string `toml:"Domain"`
	Twitch         struct {
		ClientID     string `toml:"ClientID"`
		ClientSecret string `toml:"ClientSecret"`
	} `toml:"Twitch"`
	LimitConf struct {
		TwitterFanart int `toml:"TwitterLimit"`
		SpaceBiliBili int `toml:"SpaceBiliBili"`
		YoutubeLimit  int `toml:"YoutubeLimit"`
	} `toml:"Limit"`
	SQL struct {
		User         string `toml:"User"`
		Pass         string `toml:"Pass"`
		Host         string `toml:"Host"`
		Port         string `toml:"Port"`
		MaxOpenConns int    `toml:"MaxOpenConns"`
		MaxIdleConns int    `toml:"MaxIdleConns"`
	} `toml:"Sql"`
	Cached struct {
		Host string `toml:"Host"`
		Port string `toml:"Port"`
	} `toml:"Cached"`
	BotPrefix struct {
		Fanart   string `toml:"Fanart"`
		Youtube  string `toml:"Youtube"`
		Bilibili string `toml:"Bilibili"`
		General  string `toml:"General"`
	} `toml:"BotPrefix"`
	Emoji struct {
		Fanart     []string `toml:"Fanart"`
		Livestream []string `toml:"Livestream"`
	} `toml:"Emoji"`
	YtToken []string `toml:"YoutubeToken"`
}

func ReadConfig

func ReadConfig(path string) (ConfigFile, error)

read from config file

func (ConfigFile) CheckSQL

func (Data ConfigFile) CheckSQL() *sql.DB

func (ConfigFile) GetTwitchAccessToken

func (Data ConfigFile) GetTwitchAccessToken() string

Jump to

Keyboard shortcuts

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