feat: setup discord bot

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-08-06 13:48:37 -03:00
parent 227c3ee3fd
commit a60bbbf0d3
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1 @@
DISCORD_TOKEN=************************************************************************

View File

@@ -7,6 +7,7 @@ services:
- dislate
ports:
- 8080:8080
env_file: .env
networks:
dislate:

12
main.go
View File

@@ -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)
}
}