Documentation
¶
Index ¶
- Variables
- type AddCommand
- type AutoPlayCommand
- type Bot
- func (b *Bot) Add(track *Track)
- func (b *Bot) AutoDiscoverNextTrack() bool
- func (b *Bot) Clear(all bool) int
- func (b *Bot) Close()
- func (b *Bot) CurrentTrackIndex() int
- func (b *Bot) GoTo(idx int) error
- func (b *Bot) JoinVoiceChannel(channelID string) error
- func (b *Bot) List(page, pageSize int) TrackPage
- func (b *Bot) Next(n int) error
- func (b *Bot) Pause() error
- func (b *Bot) Prev(n int) error
- func (b *Bot) Remove(idx int) error
- func (b *Bot) Reset()
- func (b *Bot) Resume() error
- func (b *Bot) SetAutoDiscoverNextTrack(v bool)
- func (b *Bot) SetTextChannelID(id string)
- func (b *Bot) State() BotState
- func (b *Bot) TextChannelID() string
- func (b *Bot) TotalTracks() int
- func (b *Bot) VoiceChannelID() string
- type BotState
- type ClearCommand
- type Client
- type CommandHandleFunc
- type Hub
- type LeaveCommand
- type ListCommand
- type NextCommand
- type PauseCommand
- type RemoveCommand
- type ResetCommand
- type ResumeCommand
- type SlashCommand
- type Track
- type TrackPage
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AddCommand ¶
type AddCommand struct {
// contains filtered or unexported fields
}
func NewAddCommand ¶
func NewAddCommand(hub *Hub, ytClient *youtube.Client) *AddCommand
func (*AddCommand) Command ¶
func (c *AddCommand) Command() *discordgo.ApplicationCommand
func (*AddCommand) Handle ¶
func (c *AddCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type AutoPlayCommand ¶
type AutoPlayCommand struct {
// contains filtered or unexported fields
}
func NewAutoPlayCommand ¶
func NewAutoPlayCommand(hub *Hub) *AutoPlayCommand
func (*AutoPlayCommand) Command ¶
func (c *AutoPlayCommand) Command() *discordgo.ApplicationCommand
func (*AutoPlayCommand) Handle ¶
func (c *AutoPlayCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
func (*Bot) AutoDiscoverNextTrack ¶
func (*Bot) Clear ¶
Clear clears the upcomming tracks (tracks queue) then return a total removed tracks Set all to true to clear all tracks except the current playing track.
func (*Bot) CurrentTrackIndex ¶
func (*Bot) JoinVoiceChannel ¶
func (*Bot) SetAutoDiscoverNextTrack ¶
func (*Bot) SetTextChannelID ¶
func (*Bot) TextChannelID ¶
func (*Bot) TotalTracks ¶
func (*Bot) VoiceChannelID ¶
type ClearCommand ¶
type ClearCommand struct {
// contains filtered or unexported fields
}
func NewClearCommand ¶
func NewClearCommand(hub *Hub) *ClearCommand
func (*ClearCommand) Command ¶
func (c *ClearCommand) Command() *discordgo.ApplicationCommand
func (*ClearCommand) Handle ¶
func (c *ClearCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddGlobalSlashCommand ¶
func (c *Client) AddGlobalSlashCommand(cmd SlashCommand)
type CommandHandleFunc ¶
type CommandHandleFunc func(s *discordgo.Session, i *discordgo.InteractionCreate)
type LeaveCommand ¶
type LeaveCommand struct {
// contains filtered or unexported fields
}
func NewLeaveCommand ¶
func NewLeaveCommand(hub *Hub) *LeaveCommand
func (*LeaveCommand) Command ¶
func (c *LeaveCommand) Command() *discordgo.ApplicationCommand
func (*LeaveCommand) Handle ¶
func (c *LeaveCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type ListCommand ¶
type ListCommand struct {
// contains filtered or unexported fields
}
func NewListCommand ¶
func NewListCommand(hub *Hub) *ListCommand
func (*ListCommand) Command ¶
func (c *ListCommand) Command() *discordgo.ApplicationCommand
func (*ListCommand) Handle ¶
func (c *ListCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type NextCommand ¶
type NextCommand struct {
// contains filtered or unexported fields
}
func NewNextCommand ¶
func NewNextCommand(hub *Hub) *NextCommand
func (*NextCommand) Command ¶
func (c *NextCommand) Command() *discordgo.ApplicationCommand
func (*NextCommand) Handle ¶
func (c *NextCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type PauseCommand ¶
type PauseCommand struct {
// contains filtered or unexported fields
}
func NewPauseCommand ¶
func NewPauseCommand(hub *Hub) *PauseCommand
func (*PauseCommand) Command ¶
func (c *PauseCommand) Command() *discordgo.ApplicationCommand
func (*PauseCommand) Handle ¶
func (c *PauseCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type RemoveCommand ¶
type RemoveCommand struct {
// contains filtered or unexported fields
}
func NewRemoveCommand ¶
func NewRemoveCommand(hub *Hub) *RemoveCommand
func (*RemoveCommand) Command ¶
func (c *RemoveCommand) Command() *discordgo.ApplicationCommand
func (*RemoveCommand) Handle ¶
func (c *RemoveCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type ResetCommand ¶
type ResetCommand struct {
// contains filtered or unexported fields
}
func NewResetCommand ¶
func NewResetCommand(hub *Hub) *ResetCommand
func (*ResetCommand) Command ¶
func (c *ResetCommand) Command() *discordgo.ApplicationCommand
func (*ResetCommand) Handle ¶
func (c *ResetCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type ResumeCommand ¶
type ResumeCommand struct {
// contains filtered or unexported fields
}
func NewResumeCommand ¶
func NewResumeCommand(hub *Hub) *ResumeCommand
func (*ResumeCommand) Command ¶
func (c *ResumeCommand) Command() *discordgo.ApplicationCommand
func (*ResumeCommand) Handle ¶
func (c *ResumeCommand) Handle(s *discordgo.Session, i *discordgo.InteractionCreate)
type SlashCommand ¶
type SlashCommand interface { Command() *discordgo.ApplicationCommand Handle(s *discordgo.Session, i *discordgo.InteractionCreate) }
Click to show internal directories.
Click to hide internal directories.