1
0
mirror of https://github.com/mgerb/ServerStatus synced 2026-01-10 03:03:04 +00:00

update dependencies - change imports

This commit is contained in:
2018-01-13 12:29:20 -06:00
parent 5a2f81a23a
commit 217c6c8baa
6 changed files with 23 additions and 24 deletions

32
main.go Normal file
View File

@@ -0,0 +1,32 @@
package main
import (
"github.com/mgerb/serverstatus/bot"
"github.com/mgerb/serverstatus/config"
"github.com/mgerb/serverstatus/serverstatus"
)
// Variables used for command line parameters
var (
BotID string
)
func main() {
//read config file
config.Configure()
//connect bot to account with token
bot.Connect(config.Config.Token)
// add handlers
bot.AddHandler(serverstatus.MessageHandler)
//start websocket to listen for messages
bot.Start()
//start server status task
serverstatus.Start()
// Simple way to keep program running until CTRL-C is pressed.
<-make(chan struct{})
}