commands

package
v0.0.0-...-a7a1043 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BetCommand

func BetCommand(s *discordgo.Session, i *discordgo.InteractionCreate)

func ClearQueue

func ClearQueue(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func Disconnect

func Disconnect(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func GetQueue

func GetQueue(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func PauseSong

func PauseSong(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func PingCommand

func PingCommand(s *discordgo.Session, i *discordgo.InteractionCreate)

func PlayCommand

func PlayCommand(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func ResumeSong

func ResumeSong(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

func SendComplexMessage

func SendComplexMessage(s *discordgo.Session, i *discordgo.InteractionCreate, title string, description string, urlImage string, footerText string, color int, author string)

func SendSimpleMessage

func SendSimpleMessage(s *discordgo.Session, i *discordgo.InteractionCreate, message string, color int)

func SendSimpleMessageResponse

func SendSimpleMessageResponse(s *discordgo.Session, i *discordgo.InteractionCreate, message string, color int)

func SkipSong

func SkipSong(s *discordgo.Session, i *discordgo.InteractionCreate, instance *ServerInstance)

Types

type ServerInstance

type ServerInstance struct {
	ServerId string
	Voice    *VoiceInstance
}

func CreateServerInstance

func CreateServerInstance(id string) (i *ServerInstance)

type Song

type Song struct {
	// contains filtered or unexported fields
}

type VoiceInstance

type VoiceInstance struct {
	ChannelId  string
	Connection *discordgo.VoiceConnection
	Encoder    *dca.EncodeSession
	Stream     *dca.StreamingSession
	IsPlaying  bool
	Queue      chan Song
	QueueList  []Song //Copy of the channel, needed to show queue to the user
	Timer      *time.Timer
}

func CreateVoiceInstance

func CreateVoiceInstance() (i *VoiceInstance)

func (*VoiceInstance) PlaySingleSong

func (v *VoiceInstance) PlaySingleSong(videoInfo *youtube.Video)

func (*VoiceInstance) StartTimer

func (*VoiceInstance) StopTimer

func (v *VoiceInstance) StopTimer()

Jump to

Keyboard shortcuts

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