mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 01:22:48 +00:00
new sounds
This commit is contained in:
BIN
dist/GoBot-linux
vendored
BIN
dist/GoBot-linux
vendored
Binary file not shown.
BIN
dist/GoBot-windows.exe
vendored
BIN
dist/GoBot-windows.exe
vendored
Binary file not shown.
BIN
dist/sounds/50dkp.dca
vendored
Normal file
BIN
dist/sounds/50dkp.dca
vendored
Normal file
Binary file not shown.
BIN
dist/sounds/blewit.dca
vendored
Normal file
BIN
dist/sounds/blewit.dca
vendored
Normal file
Binary file not shown.
BIN
dist/sounds/lata.dca
vendored
Normal file
BIN
dist/sounds/lata.dca
vendored
Normal file
Binary file not shown.
BIN
dist/sounds/lying.dca
vendored
Normal file
BIN
dist/sounds/lying.dca
vendored
Normal file
Binary file not shown.
BIN
dist/sounds/spaghet.dca
vendored
Normal file
BIN
dist/sounds/spaghet.dca
vendored
Normal file
Binary file not shown.
BIN
dist/sounds/stop.dca
vendored
Normal file
BIN
dist/sounds/stop.dca
vendored
Normal file
Binary file not shown.
2
makefile
2
makefile
@@ -14,5 +14,5 @@ copyconfig:
|
|||||||
@cp config.template.json ./dist/config.json
|
@cp config.template.json ./dist/config.json
|
||||||
@cp -r ./sounds ./dist/
|
@cp -r ./sounds ./dist/
|
||||||
|
|
||||||
build: clean windows linux copyconfig
|
all: windows linux copyconfig
|
||||||
|
|
||||||
BIN
sounds/50dkp.dca
Normal file
BIN
sounds/50dkp.dca
Normal file
Binary file not shown.
BIN
sounds/blewit.dca
Normal file
BIN
sounds/blewit.dca
Normal file
Binary file not shown.
BIN
sounds/lata.dca
Normal file
BIN
sounds/lata.dca
Normal file
Binary file not shown.
BIN
sounds/lying.dca
Normal file
BIN
sounds/lying.dca
Normal file
Binary file not shown.
BIN
sounds/spaghet.dca
Normal file
BIN
sounds/spaghet.dca
Normal file
Binary file not shown.
BIN
sounds/stop.dca
Normal file
BIN
sounds/stop.dca
Normal file
Binary file not shown.
@@ -17,7 +17,7 @@ var sounds = make(map[string][][]byte, 0)
|
|||||||
|
|
||||||
const SOUNDS_DIR string = "./sounds/"
|
const SOUNDS_DIR string = "./sounds/"
|
||||||
|
|
||||||
func AirhornHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
|
func SoundsHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||||
if strings.HasPrefix(m.Content, config.Config.Activator) {
|
if strings.HasPrefix(m.Content, config.Config.Activator) {
|
||||||
// Find the channel that the message came from.
|
// Find the channel that the message came from.
|
||||||
c, err := s.State.Channel(m.ChannelID)
|
c, err := s.State.Channel(m.ChannelID)
|
||||||
@@ -22,7 +22,7 @@ func main() {
|
|||||||
handlers.LoadSounds()
|
handlers.LoadSounds()
|
||||||
|
|
||||||
//add handlers
|
//add handlers
|
||||||
bot.AddHandler(handlers.AirhornHandler)
|
bot.AddHandler(handlers.SoundsHandler)
|
||||||
|
|
||||||
//start websock to listen for messages
|
//start websock to listen for messages
|
||||||
bot.Start()
|
bot.Start()
|
||||||
|
|||||||
Reference in New Issue
Block a user