Seekfried / greedybot-d2irc

A pickupbot for managing Xonotic pickup games, that also syncs messages between Discord and IRC.
MIT License
2 stars 2 forks source link

Implement info command #14

Closed Seekfried closed 3 months ago

Seekfried commented 4 months ago

It used to print some info about the player related to XonStats (total time played, elo, etc.)

nauar commented 3 months ago

The original behavior was:

!info Shows details about a registered player (information from Xonstat). You need to specify the player's IRC nick to look up.

We will implement the following:

  1. Will look for the nick in the DB for the chat type the user has made the request. If found, use their statsId to get the data.
  2. If not found in 1, will look for the nick in the DB for the other chat type. If found, use their statsId to get the data.
  3. If not found in 2, if the provided nick is a natural number, will use it as a statsId to get the data.
  4. If the number in 3 does not correspond to a valid statsId, then return a "not found" message.
Seekfried commented 3 months ago

Yes that sounds good.