From 431a86b74d8490014d7700ed100e73b5c63e3d00 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Wed, 15 Jan 2025 22:00:37 -0500 Subject: [PATCH] starting bot with token --- bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 979852b..84ef049 100644 --- a/bot.py +++ b/bot.py @@ -1,6 +1,7 @@ import discord from discord.ext import commands from discord.ext.commands.context import Context +from os import environ from dice import Dice, DiceTextError @@ -35,4 +36,9 @@ async def roll(ctx: Context, *args: str): await ctx.send(msg) -bot.add_command(roll) +token = environ.get("DISCORD_TOKEN") +if token is None: + print("Could not load token") + quit() + +bot.run(token)