lekro / elosensei

[unmaintained] Discord bot implementing the Elo rating system
GNU General Public License v3.0
3 stars 2 forks source link

Add edit command #18

Closed lekro closed 6 years ago

lekro commented 6 years ago

elo edit EVENTID NEWEVENT

EVENTID can just be given a type hint of int.

Check if the match history contains an event with that event ID.. If not, throw an error.

Using the new EloEventConverter, parse NEWEVENT. The passed type should be the same as the old event. Remove the old event, and add the new one to the match history. All old optional values should remain the same. (i.e. if any optional values are None after parsing NEWEVENT, get them from the old event.)

We need to make sure that the EloEventConverter isn't filling in default values for things like K factor.

After everything's done, recalculate elo.

lekro commented 6 years ago

Added in 939c88515786cc5708e3e69b577d7ed1c1457a4f.