danparizher / Pax-Academia

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

feat: Improve python code detection + improve UX #264

Closed GabeMillikan closed 9 months ago

GabeMillikan commented 9 months ago

This PR makes 3 changes:

  1. fixes a couple of the code_detection/python code regex's since they were too broad (and causing some messages to be incorrectly flagged). I just went through the last 2 weeks of messages from Pax and individually fixed each of the issues I found.
  2. Adjusts the autoformatting message to be (much) shorter. Right now it's quite large and blocks most of the channel. Plus, nobody reads it anyway, so it doesn't need to be so verbose. (see before & after below) (thanks @danparizher for this idea)
  3. Auto-deletes the formatting message if the author's message is deleted or is edited. (up to 1 hour later, when the cache is purged)
Before After
image Discord_fy6ADKW7KY