mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-10 17:12:48 +00:00
work in progress - about to refactor how sounds are played
This commit is contained in:
25
server/main.go
Normal file
25
server/main.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"./bot"
|
||||
"./config"
|
||||
"./handlers"
|
||||
"./webserver"
|
||||
)
|
||||
|
||||
func main() {
|
||||
//read config file
|
||||
config.Init()
|
||||
|
||||
//connect bot to account with token
|
||||
bot.Connect(config.Config.Token)
|
||||
|
||||
//add handlers
|
||||
bot.AddHandler(handlers.SoundsHandler)
|
||||
|
||||
// start new go routine for the discord websockets
|
||||
go bot.Start()
|
||||
|
||||
// start the web server
|
||||
webserver.Start()
|
||||
}
|
||||
Reference in New Issue
Block a user