starting bot with token
This commit is contained in:
8
bot.py
8
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)
|
||||
|
||||
Reference in New Issue
Block a user