discord-diabetes / diabot

A diabetes-oriented chatbot for Discord
https://discord.gg/diabetes
Other
19 stars 13 forks source link

Fix graphing when an entry is outside of the allowed conversion range #181

Closed p5nbTgip0r closed 1 year ago

p5nbTgip0r commented 1 year ago

If a user's nightscout contains an entry that is outside the -999 <= sgv <= 999 range, executing /graph while that entry is in the hour range specified will make the command only return Error: value must be between -999 and 999.

Until the erroneous entry/entries are either removed manually, or the entry/entries are older than the hour value specified, /graph is effectively broken for them. This PR makes the /graph command ignore entries outside of the allowed range, restoring the graphing functionality despite having erroneous entries.