diff --git a/.idea/.gitignore b/.idea/.gitignore index 26d33521..4b4b9529 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -1,3 +1,4 @@ # Default ignored files /shelf/ /workspace.xml +/BotToken.txt diff --git a/BotToken.txt b/BotToken.txt new file mode 100644 index 00000000..d48e26ee --- /dev/null +++ b/BotToken.txt @@ -0,0 +1 @@ +NzE2NzAxNjk5MTQ1NzI4MDk0.Xte5vg.QhcHZLPi-6cmNsGFvp-RsLPdw8k \ No newline at end of file diff --git a/EnsoBot.py b/EnsoBot.py index 3fc71e8c..38a598dc 100644 --- a/EnsoBot.py +++ b/EnsoBot.py @@ -4,6 +4,7 @@ from discord.ext import commands # Bot Prefix client = commands.Bot(command_prefix='~') +token = open("token.txt", "r").readline() # Instantiates a list for all the cogs extensions = ['cogs.WaifuImages', 'cogs.FunCommands'] @@ -69,6 +70,7 @@ async def on_command_error(ctx, error): # Delete the message await message.delete() + @client.event async def on_command_error(ctx, error): if isinstance(error, commands.CommandOnCooldown): @@ -80,7 +82,7 @@ async def on_command_error(ctx, error): await message.delete() -client.run('NzE2NzAxNjk5MTQ1NzI4MDk0.XtWFiw.KZrh9Tkp9vTY9JYSgZfpg2P4mlQ') +client.run(token) ''' @client.command() diff --git a/cogs/FunCommands.py b/cogs/FunCommands.py index 3e1c92c6..0cdad0f3 100644 --- a/cogs/FunCommands.py +++ b/cogs/FunCommands.py @@ -77,7 +77,7 @@ class Fun(commands.Cog): with open('kakashiImages.txt') as file: _8ball_array = file.readlines() - + if str(ctx.channel) not in channels: message = await ctx.send(error_function())