add config
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package discordrhu
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
@@ -10,6 +11,9 @@ import (
|
||||
|
||||
func Init(di *dig.Container) {
|
||||
dsc, err := discordgo.New("Bot " + os.Getenv("DISCORD_KEY"))
|
||||
dsc.AddHandler(func(s *discordgo.Session, r *discordgo.Ready) {
|
||||
fmt.Println("Bot is ready")
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
log.Panic("unable to start discord session!")
|
||||
|
||||
Reference in New Issue
Block a user