When entering a BG value (or a value that could be seen as a BG value with the <number> <BG unit> format) as an argument to a Diabot command, the bot will respond with a BG conversion and respond with the command's output.
For example:
diabot estimate average 50 mmol
Diabot: 50.0 mmol/L is 901 mg/dL
Diabot: An A1c of 6.7% (DCCT) or 50.0 mmol/mol (IFCC) is about 146 mg/dL or 8.1 mmol/L
diabot estimate a1c 5 mmol
Diabot: 5.0 mmol/L is 90 mg/dL
Diabot: An average of 5.0 mmol/L is about 4.8% (DCCT) or 28.6 mmol/mol (IFCC)
diabot estimate a1c 150 mgdl
Diabot: 150 mg/dL is 8.3 mmol/L
Diabot: An average of 150 mg/dL is about 6.9% (DCCT) or 51.4 mmol/mol (IFCC)
diabot convert 5 mmol
Diabot: 5.0 mmol/L is 90 mg/dL
Diabot: 5.0 mmol/L is 90 mg/dL
This PR prevents the conversion listener from running on messages that have Diabot's command prefix, making the above situations only respond with the second message of each (which is the executed command's output).
When entering a BG value (or a value that could be seen as a BG value with the
<number> <BG unit>
format) as an argument to a Diabot command, the bot will respond with a BG conversion and respond with the command's output.For example:
diabot estimate average 50 mmol
50.0 mmol/L is 901 mg/dL
An A1c of 6.7% (DCCT) or 50.0 mmol/mol (IFCC) is about 146 mg/dL or 8.1 mmol/L
diabot estimate a1c 5 mmol
5.0 mmol/L is 90 mg/dL
An average of 5.0 mmol/L is about 4.8% (DCCT) or 28.6 mmol/mol (IFCC)
diabot estimate a1c 150 mgdl
150 mg/dL is 8.3 mmol/L
An average of 150 mg/dL is about 6.9% (DCCT) or 51.4 mmol/mol (IFCC)
diabot convert 5 mmol
5.0 mmol/L is 90 mg/dL
5.0 mmol/L is 90 mg/dL
This PR prevents the conversion listener from running on messages that have Diabot's command prefix, making the above situations only respond with the second message of each (which is the executed command's output).