p2r3 / epochtal

Portal 2 tournament framework
https://epochtal.p2r3.com/
GNU General Public License v3.0
8 stars 4 forks source link

Better discord announcements #25

Closed Gewi413 closed 4 months ago

Gewi413 commented 4 months ago

Some categories need different requirements as to how scores are announced:

Proposed fix: each category could have a template string

p2r3 commented 4 months ago

I doubt the proposed fix is a great option, as that would require adding highly verbose yet purely cosmetic data to the category list of week.json, which would repeat for many categories.

Instead, it's probably best to write the function which generates these updates to consider the already existing category data properties, like the points or coop flags. Essentially, I'm saying that the solution is to add just a couple more "if" statements. To tackle the issue of differentiability, a combination of these flags could be used for assigning a symbol, color, or emoji to the message.