util

package
v0.0.0-...-9bc5058 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPermission

func HasPermission(state *discordgo.State, chanID string, permMask int) (bool, error)

HasPermission checks if the bot has a permission.

func IsZero

func IsZero(v reflect.Value) bool

IsZero checks if the passed value is a zero value

func SendError

func SendError(session *discordgo.Session, err error)

SendError sends an error to the error channel

Types

type Config

type Config struct {
	LogChannel string `yaml:"logChannel"`
	Prefix     string `yaml:"prefix"`
	Status     string `yaml:"status"`
	Token      string `yaml:"token"`
}

Config represents the bot configuration file.

func GetConfig

func GetConfig() *Config

GetConfig gets the config from the filesystem followed by a singleton

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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