From 291358300f66f7641d21cad0c7428bfdae81b034 Mon Sep 17 00:00:00 2001 From: JP Date: Sun, 21 Oct 2018 16:33:35 +0200 Subject: [PATCH] more security = more better --- General.py | 4 ++-- Stroopwafel.py | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/General.py b/General.py index 72e85de..9f4e3d4 100644 --- a/General.py +++ b/General.py @@ -15,8 +15,8 @@ class General(object): self.voice_states = {} self.r = praw.Reddit( user_agent='StroopwafelBot', - client_secret='Z4K17T8TC26cNAgDSRxCkE9jYR4', - client_id='aWeyKpzdHMtmJQ' + client_secret=self.bot.tokens["redditSecret"], + client_id=self.bot.tokens["redditId"] ) self.r.read_only = True f = open("password.txt","r") diff --git a/Stroopwafel.py b/Stroopwafel.py index f56b2e2..535184d 100644 --- a/Stroopwafel.py +++ b/Stroopwafel.py @@ -15,15 +15,8 @@ from discord.ext import commands logging.basicConfig(level=logging.INFO) bot = commands.Bot(command_prefix=commands.when_mentioned_or('!'), description='Stroopwafel. Shitpost bot extraordinaire.', pm_help=True) -#bot.add_cog(Music.Music(bot)) -#TODO: Re-add music functions now that we require a stronger host -bot.add_cog(Shitpost.Shitpost(bot)) -bot.add_cog(General.General(bot)) -bot.add_cog(Cryptocoin.Cryptocoin(bot)) -bot.add_cog(Chatbot.Chatbot(bot)) -#tokenfile = open("stroopwafel.token","r") -#token = tokenfile.readline().strip() +#Read configuration file: config = configparser.ConfigParser() config.read('stroopwafel.ini') bot.tokens = config["tokens"] @@ -37,6 +30,12 @@ for pw in config["passwords"]: print("Problem with decoding password!") bot.passwords[pw] = config["passwords"][pw] +#bot.add_cog(Music.Music(bot)) +#TODO: Re-add music functions now that we require a stronger host +bot.add_cog(Shitpost.Shitpost(bot)) +bot.add_cog(General.General(bot)) +bot.add_cog(Cryptocoin.Cryptocoin(bot)) +bot.add_cog(Chatbot.Chatbot(bot)) @bot.event @asyncio.coroutine