mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-09 16:42:48 +00:00
fix: build scripts
This commit is contained in:
@@ -31,7 +31,7 @@ func SendEmbeddedNotification(title, description string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start bot - this is a blocking function
|
// Start bot - this is a blocking function
|
||||||
func Start(token string) {
|
func Start(token string) *discordgo.Session {
|
||||||
_token = token
|
_token = token
|
||||||
|
|
||||||
// initialize connection
|
// initialize connection
|
||||||
@@ -52,10 +52,12 @@ func Start(token string) {
|
|||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("error opening connection,", err)
|
log.Error("error opening connection,", err)
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug("Bot is now running...")
|
log.Debug("Bot is now running...")
|
||||||
|
|
||||||
|
return _session
|
||||||
}
|
}
|
||||||
|
|
||||||
func Stop() {
|
func Stop() {
|
||||||
|
|||||||
Reference in New Issue
Block a user