Documentation
¶
Index ¶
Constants ¶
View Source
const StartEndFormatting = "```"
Variables ¶
View Source
var COLLECTIONS = SoundCollections{
airhorn,
khaled,
cena,
ethan,
cow,
birthday,
wow,
vince,
trump,
}
View Source
var HelpStringGlobal = ""
Functions ¶
This section is empty.
Types ¶
type Play ¶
type Play struct { GuildID string ChannelID string UserID string Sound *Sound // The next play to occur after this, only used for chaining sounds like anotha Next *Play // If true, this was a forced play using a specific airhorn sound name Forced bool }
Play represents an individual use of the !airhorn command
type Sound ¶
type Sound struct { Name string // Weight adjust how likely it is this song will play, higher = more likely Weight int // Delay (in milliseconds) for the bot to wait before sending the disconnect request PartDelay int // contains filtered or unexported fields }
Sound represents a sound clip
func (*Sound) Load ¶
func (s *Sound) Load(basePath string, c *SoundCollection) error
Load attempts to load an encoded sound file from disk DCA files are pre-computed sound files that are easy to send to Discord. If you would like to create your own DCA files, please use: https://github.com/nstafie/dca-rs eg: dca-rs --raw -i <input wav file> > <output file>
func (*Sound) Play ¶
func (s *Sound) Play(vc *discordgo.VoiceConnection)
Plays this sound over the specified VoiceConnection
type SoundBotPlugin ¶
type SoundBotPlugin struct {
// contains filtered or unexported fields
}
func (*SoundBotPlugin) Destroy ¶
func (s *SoundBotPlugin) Destroy() error
func (*SoundBotPlugin) InstallRoute ¶
func (s *SoundBotPlugin) InstallRoute(f haleakala.InstallFunc) error
func (*SoundBotPlugin) Name ¶
func (s *SoundBotPlugin) Name() string
func (*SoundBotPlugin) OnMessage ¶
func (s *SoundBotPlugin) OnMessage(c *muxer.Context)
func (*SoundBotPlugin) SupportsUnload ¶
func (s *SoundBotPlugin) SupportsUnload() bool
type SoundCollection ¶
type SoundCollection struct { Prefix string Commands []string Sounds []*Sound ChainWith *SoundCollection // contains filtered or unexported fields }
func (*SoundCollection) Load ¶
func (sc *SoundCollection) Load(basePath string)
func (*SoundCollection) Random ¶
func (s *SoundCollection) Random() *Sound
type SoundCollections ¶
type SoundCollections []*SoundCollection
func (*SoundCollections) GetFullList ¶
func (s *SoundCollections) GetFullList() map[string][]string
Click to show internal directories.
Click to hide internal directories.