initial code commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user