Documentation ¶
Index ¶
- func ReadThings(things embed.FS) (map[string]Thing, error)
- type Bot
- type BotConfig
- type Config
- type GitHubConfig
- type GithubReleaseConfig
- type LogConfig
- type NodeConfig
- type NodeConfigs
- type PlayerManager
- func (q *PlayerManager) Add(guildID snowflake.ID, channelID snowflake.ID, tracks ...lavalink.Track)
- func (q *PlayerManager) ChannelID(guildID snowflake.ID) snowflake.ID
- func (q *PlayerManager) Clear(guildID snowflake.ID)
- func (q *PlayerManager) Delete(guildID snowflake.ID)
- func (q *PlayerManager) Get(guildID snowflake.ID) (RepeatMode, []lavalink.Track)
- func (q *PlayerManager) Next(guildID snowflake.ID) (lavalink.Track, bool)
- func (q *PlayerManager) Remove(guildID snowflake.ID, from int, to int)
- func (q *PlayerManager) SetRepeatMode(guildID snowflake.ID, mode RepeatMode)
- func (q *PlayerManager) Shuffle(guildID snowflake.ID) bool
- type PluginConfig
- type PluginConfigs
- type RepeatMode
- type Thing
- type ThingFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bot ¶
type BotConfig ¶
type BotConfig struct { Token string `yaml:"token"` GuildIDs []snowflake.ID `yaml:"guild_ids"` }
type Config ¶
type Config struct { Log LogConfig `yaml:"log"` Bot BotConfig `yaml:"bot"` GitHub GitHubConfig `yaml:"github"` Nodes NodeConfigs `yaml:"nodes"` Plugins PluginConfigs `yaml:"plugins"` }
func ReadConfig ¶
type GitHubConfig ¶
type GitHubConfig struct { ServerAddr string `yaml:"server_addr"` WebhookSecret string `yaml:"webhook_secret"` Releases map[string]GithubReleaseConfig `yaml:"releases"` }
func (GitHubConfig) String ¶
func (c GitHubConfig) String() string
type GithubReleaseConfig ¶
type GithubReleaseConfig struct { WebhookID snowflake.ID `yaml:"webhook_id"` WebhookToken string `yaml:"webhook_token"` PingRole snowflake.ID `yaml:"ping_role"` }
func (GithubReleaseConfig) String ¶
func (c GithubReleaseConfig) String() string
type LogConfig ¶
type NodeConfig ¶
type NodeConfig struct { Name string `yaml:"name"` Address string `yaml:"address"` Password string `yaml:"password"` Secure bool `yaml:"secure"` SessionID string `yaml:"session_id"` }
func (NodeConfig) String ¶
func (c NodeConfig) String() string
func (NodeConfig) ToNodeConfig ¶
func (c NodeConfig) ToNodeConfig() disgolink.NodeConfig
type NodeConfigs ¶
type NodeConfigs []NodeConfig
func (NodeConfigs) String ¶
func (c NodeConfigs) String() string
type PlayerManager ¶
type PlayerManager struct {
// contains filtered or unexported fields
}
func NewPlayerManager ¶
func NewPlayerManager() *PlayerManager
func (*PlayerManager) Add ¶
func (q *PlayerManager) Add(guildID snowflake.ID, channelID snowflake.ID, tracks ...lavalink.Track)
func (*PlayerManager) ChannelID ¶
func (q *PlayerManager) ChannelID(guildID snowflake.ID) snowflake.ID
func (*PlayerManager) Clear ¶
func (q *PlayerManager) Clear(guildID snowflake.ID)
func (*PlayerManager) Delete ¶
func (q *PlayerManager) Delete(guildID snowflake.ID)
func (*PlayerManager) Get ¶
func (q *PlayerManager) Get(guildID snowflake.ID) (RepeatMode, []lavalink.Track)
func (*PlayerManager) Next ¶
func (q *PlayerManager) Next(guildID snowflake.ID) (lavalink.Track, bool)
func (*PlayerManager) Remove ¶
func (q *PlayerManager) Remove(guildID snowflake.ID, from int, to int)
func (*PlayerManager) SetRepeatMode ¶
func (q *PlayerManager) SetRepeatMode(guildID snowflake.ID, mode RepeatMode)
func (*PlayerManager) Shuffle ¶
func (q *PlayerManager) Shuffle(guildID snowflake.ID) bool
type PluginConfig ¶
type PluginConfig struct { Name string `yaml:"name"` Dependency string `yaml:"dependency"` Repository string `yaml:"repository"` Git string `yaml:"git"` }
func (PluginConfig) String ¶
func (c PluginConfig) String() string
type PluginConfigs ¶
type PluginConfigs []PluginConfig
func (PluginConfigs) String ¶
func (c PluginConfigs) String() string
type RepeatMode ¶
type RepeatMode string
const ( RepeatModeNone RepeatMode = "none" RepeatModeTrack RepeatMode = "track" RepeatModeQueue RepeatMode = "queue" )
Click to show internal directories.
Click to hide internal directories.