mazziechai / DonguriGaeru

A Puyo Puyo ranking system
GNU Affero General Public License v3.0
4 stars 0 forks source link

Minimal Discord bot front end for the database #7

Closed mazziechai closed 3 years ago

mazziechai commented 3 years ago

A Player is a name or Discord user, linked to an appropriate entry in the database. A Match has an ID, two Players, their scores, and the date of when the match was played.

This pull request aims to implement the following:

Closes #5.

amosborne commented 3 years ago

Exciting! Can I offer two suggestions?

  1. "Fixing of matches", suppose we only allow fixing scores for the time being? If a match is so broken that more than just the score needs to be fixed, moderator then can simply delete and recreate.
  2. "Administrative command allowlist", I would probably work on this last! I think getting all the commands and interactions working first will not only be more fun, but will allow us to experiment with the interface sooner.
mazziechai commented 3 years ago

Sounds good, thanks for your input.

amosborne commented 3 years ago

Out of curiosity, why did you remove Match.active? I figured that when you delete a match, you could just mark it inactive. That way if there was an accidental deletion, the data would still be there.

mazziechai commented 3 years ago

I actually don't remember why I did... I'll change it back.

mazziechai commented 3 years ago

Since registration with the bot is out of the scope of #5, I think it would be appropriate to leave handshaking to another issue/PR. In order to perform the handshake over Discord, the bot would need to associate Discord accounts with players in the database, which is essentially registration. I'll go ahead and mark this PR ready and get to work on basic Discord registration and handshaking next.

amosborne commented 3 years ago

Awesome. Does this PR include some test code? Idk if you could actually have two bots to run an end to end test. One bot to post on discord, and then donguri gaeru to react.

mazziechai commented 3 years ago

I could try, though tests with Discord bots aren't super common due to how much of a pain it is.

mazziechai commented 3 years ago

I think it would be best to reserve testing to things separated from the Discord API, as creating tests would require a lot more effort than it is to currently just start up the bot and test it manually.