add config

This commit is contained in:
Fran Jurmanović
2024-09-30 23:08:06 +02:00
parent 86804e04d2
commit f5a7749ad9
9 changed files with 79 additions and 27 deletions

View File

@@ -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!")