Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpConfigFormat ¶
DumpConfigFormat will write out a sample config with the default values. It be written to the path of the filename string supplied. Returns an error if one is encountered.
Types ¶
type BotConfig ¶
type BotConfig struct { Volume float64 `json:"volume"` YtDlPath string `json:"ytdl_path"` SaveVideos bool `json:"save_videos"` CacheDir string `json:"cache_dir"` UsePlaylist bool `json:"use_playlist"` PlaylistPath string `json:"playlist_path"` AutoPause bool `json:"auto_pause"` DeleteMessages bool `json:"delete_messages"` DeleteInvokingMessages bool `json:"delete_invoking_messages"` NowPlayingMentions bool `json:"now_playing_mentions"` SkipsRequired int `json:"skips_required"` SkipRatio float64 `json:"skip_ratio"` }
BotConfig is used to the the bot specific configuration.
type Config ¶
type Config struct { BotToken string `json:"bot_token"` OwnerID string `json:"owner_id"` GoogleAPIKey string `json:"google_api_key"` CommandPrefix string `json:"command_prefix"` Bot BotConfig `json:"bot"` Guilds []Guilds `json:"guilds"` }
Config is used to store the application configuration.
func LoadConfig ¶
LoadConfig takes a string for a filename and attempts to load it and unmarshal the json inside. Also, auth tokens are attempted to be found as environment variables. If successful, returns a pointer to a Config object, otherwise returns an error.
Click to show internal directories.
Click to hide internal directories.