internal

package
v0.0.0-...-ddc3b36 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Start starts the linked channels bot.

Types

type Bot

type Bot struct {
	Auth          *auth.AuthClient
	Client        *dg.Session
	Config        *Config
	OldStates     map[string]*dg.VoiceState
	Serving       string
	PermReference int
}

Bot represents the linked channels bot.

func (*Bot) AddPair

func (bot *Bot) AddPair(text *dg.Channel, voice *dg.Channel)

AddPair creates a link between a voice and text channel.

func (*Bot) RemPair

func (bot *Bot) RemPair(ID string) bool

RemPair removes a link between a voice and text channel.

type Config

type Config struct {
	Auth     string            `yaml:"auth_server"`
	Token    string            `yaml:"token"`
	Prefix   string            `yaml:"prefix"`
	Channels map[string]string `yaml:"linked_channels"`
}

func GetConfig

func GetConfig() Config

func (*Config) Save

func (config *Config) Save()

Jump to

Keyboard shortcuts

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