Trying to change token and get the bot online

testing
sgoudham 5 years ago
parent 9f48237fb3
commit f32075fe67

@ -7,11 +7,9 @@ from discord.ext import commands
# Getting the Bot token from Environment Variables
API_TOKEN = config('DISCORD_TOKEN')
# Bot Prefix
client = commands.Bot(command_prefix='~')
# Instantiates a list for all the cogs
extensions = ['cogs.WaifuImages', 'cogs.FunCommands']
@ -88,8 +86,10 @@ async def on_command_error(ctx, error):
await message.delete()
try:
client.run(API_TOKEN)
except discord.errors.LoginFailure as e:
print("Login unsuccessful.")
'''
@client.command()

@ -1,7 +1,6 @@
import asyncio
import pathlib
import random
import discord
from discord.ext import commands
from discord.ext.commands import BucketType, cooldown
@ -101,7 +100,6 @@ class Fun(commands.Cog):
_8ball_array = file.readlines()
if str(ctx.channel) in channels:
await ctx.send(f'Question: {question}\nAnswer: {random.choice(_8ball_array)}')
else:

Loading…
Cancel
Save