This commit is contained in:
2024-10-20 22:45:16 -06:00
parent 9385a31364
commit a615512ed7
9 changed files with 66 additions and 87 deletions

View File

@ -34,14 +34,12 @@ var commands = []api.CreateCommandData{
}
func main() {
godotenv.Load(".env")
token := os.Getenv("DISCORD_TOKEN")
if token == "" {
godotenv.Load(".env")
if token == "" {
log.Fatalln("No $DISCORD_TOKEN given.")
}
if token == "" {
log.Fatalln("No $DISCORD_TOKEN given.")
}
h := newHandler(state.New("Bot " + token))