From dfeef2aad6fb25eadc13c12e1caea7160bfe6c3e Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 2 Apr 2022 02:42:12 +0200 Subject: Contact Discord through WS --- pkg/bot/bot.go | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'pkg/bot/bot.go') diff --git a/pkg/bot/bot.go b/pkg/bot/bot.go index 28c506c..264e328 100644 --- a/pkg/bot/bot.go +++ b/pkg/bot/bot.go @@ -1,7 +1,24 @@ package bot -import "fmt" +import ( + "fmt" + "jinx/pkg/discord" +) -func Greet() { - fmt.Println("hello, world!") -} +const TOKEN = "123567890123456789012345678901234567890" + +func Start() error { + fmt.Println("hi..!") + + client := discord.NewClient(TOKEN) + + fmt.Println("connecting..") + + err := client.Connect() + + if err != nil { + return err + } + + return nil +} \ No newline at end of file -- cgit 1.4.1