1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-10 17:12:48 +00:00

added ffmpeg binaries for mac/windows

This commit is contained in:
2017-06-28 22:57:09 -05:00
parent f9247c5417
commit eacdc51874
10 changed files with 82 additions and 17 deletions

View File

@@ -2,6 +2,8 @@ package bot
import (
"fmt"
"log"
"github.com/bwmarrin/discordgo"
)
@@ -17,14 +19,16 @@ func Connect(token string) {
Session, err = discordgo.New("Bot " + token)
if err != nil {
fmt.Println("error creating Discord session,", err)
return
log.Println(err)
log.Fatal("Error creating Discord session.", err)
}
// Get the account information.
u, err := Session.User("@me")
if err != nil {
fmt.Println("error obtaining account details,", err)
log.Println("Error obtaining account details. Make sure you have the correct bot token.")
log.Fatal(err)
}
// Store the account ID for later use.