discord

package
v0.0.0-...-d5b06d7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LegoYodaMp3Path = "files/legoYoda.mp3"
)

Functions

This section is empty.

Types

type DiscordCommand

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

func NewDiscordCommand

func NewDiscordCommand(log *zap.Logger) *DiscordCommand

func (*DiscordCommand) AddGeneralHandler

func (d *DiscordCommand) AddGeneralHandler(s *discordgo.Session)

func (*DiscordCommand) CommandList

func (d *DiscordCommand) CommandList() []*discordgo.ApplicationCommand

func (*DiscordCommand) Log

func (d *DiscordCommand) Log() *zap.Logger

type VoiceManager

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

func NewVoiceManager

func NewVoiceManager(log *zap.Logger) *VoiceManager

func (*VoiceManager) ConvertMp3ToBuffer

func (vm *VoiceManager) ConvertMp3ToBuffer(filePath string, buffer *[][]byte) error

ConvertMp3ToBuffer plays the current buffer to the provided channel.

func (*VoiceManager) Log

func (vm *VoiceManager) Log() *zap.Logger

func (*VoiceManager) PlayAudio

func (vm *VoiceManager) PlayAudio(s *discordgo.Session, guildID string, channelID string, buffer *[][]byte) (err error)

Jump to

Keyboard shortcuts

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