25 lines
362 B
Go
25 lines
362 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
|
|
bot "ion606_bot/Bot"
|
|
|
|
"github.com/joho/godotenv"
|
|
)
|
|
|
|
|
|
func main() {
|
|
// Attempt to load .env, but don't fail if not found.
|
|
_ = godotenv.Load()
|
|
|
|
// Get the bot token from the environment
|
|
bot.BotToken = os.Getenv("BOT_TOKEN")
|
|
if bot.BotToken == "" {
|
|
log.Fatal("BOT_TOKEN is not set in the environment")
|
|
}
|
|
|
|
bot.Run()
|
|
}
|