danparizher / Pax-Academia

General purpose utility bot for the Homework Help Discord server
MIT License
13 stars 5 forks source link

feat: add `view-logs` command #213

Closed GabeMillikan closed 1 year ago

GabeMillikan commented 1 year ago

Implements https://github.com/Arborym/Pax-Academia/issues/211. The command simply allows the user to read the last N lines of log.txt. This allows developers to more easily debug issues on production!

I also made 3 other (small) changes:

  1. rename dump_database to view-database so that the naming scheme is consistent
  2. rename environment variables (@sebastiaan-daniels)
    • ALLOW_DUMP_DATABASE_ROLE -> ALLOW_VIEW_DATABASE_ROLE_NAME
    • ALLOW_DUMP_DATABASE_GUILD -> ALLOW_VIEW_DATABASE_GUILD_ID
  3. resolve type errors in util/Logging.py - currently it's chock full of them & I hate red underlines! (note: I did NOT make any functional changes here!)

preview:

https://github.com/Arborym/Pax-Academia/assets/44247924/864bc64b-9185-4b89-b022-0ddf8ab8f8ff

sebastiaan-daniels commented 1 year ago

They always say there is a clear upper limit to human intelligence, but stupidity knows absolutely no bounds. And this is the proof.