diff --git a/.example.env b/.example.env index e69de29..f06aa5a 100644 --- a/.example.env +++ b/.example.env @@ -0,0 +1 @@ +DISCORD_TOKEN=************************************************************************ diff --git a/docker-compose.yml b/docker-compose.yml index 8fd4754..29c90af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,7 @@ services: - dislate ports: - 8080:8080 + env_file: .env networks: dislate: diff --git a/main.go b/main.go index 3ce4163..9c99677 100644 --- a/main.go +++ b/main.go @@ -2,10 +2,20 @@ package main import ( "log" + "os" - _ "github.com/bwmarrin/discordgo" + "github.com/bwmarrin/discordgo" ) func main() { log.Printf("Hello, world") + + discord, err := discordgo.New("Bot " + os.Getenv("DISCORD_TOKEN")) + if err != nil { + panic(err) + } + err = discord.Open() + if err != nil { + panic(err) + } }