small infrastructure tweaks to RoboPage
This commit is contained in:
10
robopage.py
10
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'))
|
||||
|
||||
Reference in New Issue
Block a user