feat: setup discord bot
This commit is contained in:
@@ -0,0 +1 @@
|
||||
DISCORD_TOKEN=************************************************************************
|
||||
|
||||
@@ -7,6 +7,7 @@ services:
|
||||
- dislate
|
||||
ports:
|
||||
- 8080:8080
|
||||
env_file: .env
|
||||
|
||||
networks:
|
||||
dislate:
|
||||
|
||||
12
main.go
12
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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user