mazziechai / DonguriGaeru

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

Discord Bot to Database Interface #5

Closed amosborne closed 3 years ago

amosborne commented 3 years ago

Define and demonstrate an interface between the Discord Bot and the application database. According to the MLP specification, the Discord Bot must support commands to:

  1. Delete a match by match id.
  2. Create a match by players (either player id, player name, or player discord handle) and their scores.
  3. Fix a match score by match id, the player (either by player id, player name, or player discord handle), and their score.

The MLP specification outlines a streamlined interface for match creation for all users, and a more detailed functional interface for Discord moderators (white listed). The Discord Bot also performs some emoji reaction behavior (handshakes).

The Discord Bot also pokes users when not registered with the application; this functionality is out of scope for this issue given that application registration is not currently implemented.

mazziechai commented 3 years ago

The bot would likely need some sort of functionality to display matches by a player to find the ID of the match to delete. I propose a command module for displaying recent matches submitted to the database and searching them. What do you think? Is this out of scope for this issue?

amosborne commented 3 years ago

My original thinking was that the discord bot need not provide the capability to search the database, at least not for the initial product release. We could provide two ways for a player/moderator to identify a match id:

  1. Pull up the website, open the player profile page for the user in question, and look at the table of recent matches.
  2. When a match gets logged with the discord bot, the discord bot could reply with the new match id.

Obviously searching the database for recent matches by a particular user is a one-liner to implement in code; its just a question of how complex a toolset we want to provide to the moderators via the discord bot. My gut feeling is that early on, simpler is better / less is more. If we get feedback saying that such a feature is really needed, then we can implement.

mazziechai commented 3 years ago

It's probably fine then to omit it from the initial release, however it is something I do want to have in the later, more mature versions.