From d0bf438fea16a8990c4e727d4ecbec0c7c621e92 Mon Sep 17 00:00:00 2001 From: jsl12 Date: Sun, 15 Aug 2021 12:29:01 -0500 Subject: [PATCH] small infrastructure tweaks to RoboPage --- robopage.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/robopage.py b/robopage.py index a944cbe..1bc6522 100644 --- a/robopage.py +++ b/robopage.py @@ -34,9 +34,6 @@ class RoboPage(discord.Client): re.IGNORECASE & re.UNICODE ) - def run(self): - return super().run(os.getenv('DISCORD_TOKEN')) - async def handle_ready(self): async def alive(): channel: discord.TextChannel = discord.utils.get(self.get_all_channels(), name='robotics-facility') @@ -49,7 +46,7 @@ class RoboPage(discord.Client): # limit=500, # days=3, ) - self.data.to_sql('messages.db') + self.data.to_sql(self.db_path) LOGGER.info(f'{self.data.msgs.shape[0]} messages total') # await alive() @@ -120,8 +117,6 @@ def get_emoji_name(string: str) -> str: if __name__ == '__main__': - load_dotenv() - client = RoboPage() @@ -145,4 +140,5 @@ if __name__ == '__main__': await client.handle_raw_reaction(payload) - client.run() + load_dotenv() + client.run(os.getenv('DISCORD_TOKEN'))