Versions in this module Expand all Collapse all v1 v1.0.2 Jun 19, 2022 v1.0.0 Apr 15, 2022 Changes in this version + const CHANNELS + const ERROR_TYPE + const FRAME_RATE + const FRAME_SIZE + const MAX_BYTES + const PLAYLIST_TYPE + const VIDEO_TYPE + type CmdMap map[string]CommandStruct + type Command func(Context) + type CommandHandler struct + func NewCommandHandler() *CommandHandler + func (handler CommandHandler) Get(name string) (*Command, bool) + func (handler CommandHandler) GetCmds() CmdMap + func (handler CommandHandler) Register(name string, command Command, helpmsg string) + type CommandStruct struct + func (command CommandStruct) GetHelp() string + type Config struct + BotToken string + DefaultStatus string + OwnerId string + Prefix string + ServiceUrl string + ShardCount int + ShardId int + UseSharding bool + func LoadConfig(filename string) *Config + type Connection struct + func NewConnection(voiceConnection *discordgo.VoiceConnection) *Connection + func (connection *Connection) Play(ffmpeg *exec.Cmd) error + func (connection *Connection) Stop() + func (connection Connection) Disconnect() + type Context struct + Args []string + CmdHandler *CommandHandler + Conf *Config + Discord *discordgo.Session + Guild *discordgo.Guild + Message *discordgo.MessageCreate + Sessions *SessionManager + TextChannel *discordgo.Channel + User *discordgo.User + VoiceChannel *discordgo.Channel + Youtube *Youtube + func NewContext(discord *discordgo.Session, guild *discordgo.Guild, ...) *Context + func (ctx *Context) GetVoiceChannel() *discordgo.Channel + func (ctx Context) Reply(content string) *discordgo.Message + type JoinProperties struct + Deafened bool + Muted bool + type PlaylistVideo struct + Id string + type Session struct + ChannelId string + Queue *SongQueue + func (sess *Session) Stop() + func (sess Session) Play(song Song) error + type SessionManager struct + func NewSessionManager() *SessionManager + func (manager *SessionManager) Join(discord *discordgo.Session, guildId, channelId string, ...) (*Session, error) + func (manager *SessionManager) Leave(discord *discordgo.Session, session Session) + func (manager SessionManager) GetByChannel(channelId string) (*Session, bool) + func (manager SessionManager) GetByGuild(guildId string) *Session + type Song struct + Duration *string + Id string + Media string + Title string + func NewSong(media, title, id string) *Song + func (song Song) Ffmpeg() *exec.Cmd + type SongQueue struct + Running bool + func (queue *SongQueue) Add(song Song) + func (queue *SongQueue) Clear() + func (queue *SongQueue) Current() *Song + func (queue *SongQueue) Next() Song + func (queue *SongQueue) Pause() + func (queue *SongQueue) Set(list []Song) + func (queue *SongQueue) Start(sess *Session, callback func(string)) + func (queue SongQueue) Get() []Song + func (queue SongQueue) HasNext() bool + type VideoResult struct + Media string + Title string + type YTSearchContent struct + ChannelTitle string + Description string + Duration string + Id string + Title string + type Youtube struct + Conf *Config + func (youtube Youtube) Get(input string) (int, *string, error) + func (youtube Youtube) Playlist(input string) (*[]PlaylistVideo, error) + func (youtube Youtube) Search(query string) ([]YTSearchContent, error) + func (youtube Youtube) Video(input string) (*VideoResult, error)