Also remove todo, update some CoC command descriptions.
Fixes#54.
Co-Authored-By: projectmoon <projectmoon@noreply.git.agnos.is>
Co-Committed-By: projectmoon <projectmoon@noreply.git.agnos.is>
Adds new db tree for simple global state values (which also lays
foundation for other stuff), and stores device ID in that tree after
first login. The ID is then reused on subsequent runs of the
application.
This is simpler than storing device ID in config file.
Fixes#9.
- Properly reject large numbers outside bounds of i32 when rolling dice.
- Avoid unnecessary clone of error message when calculating dice amounts.
- Allow up to 50 commands to be executed per message.
- Show failed commands with errors when executing multiple commands.
- Properly format dice plurality when rolling CofD dice pools.
- Use 'username pills' instead of raw user ID in response messages.
- Update matrix SDK to latest.
- General code reorganization for better maintainability.
Fixed the dice amount parsing code to propagate a parsing result
through the parser, while properly handling string to i32 conversion.
We now only attempt to convert to i32 if all characters in the
expression are numeric.
This commit also refactors the dice parsing by moving most of the
parsing closures into separate functions, which makes the parsing
function itself more readable. Some variable names were also changed,
for further clarity.
Fixes#21.
If the amount of commands in a single message is greater, the bot will
now return an error. Includes slight refactoring of command execution
code to make use of streams for async iter-like mapping of the command
list.
Fixes#24.
Instead of relying on all parts of the application to construct both
HTML and plain-text responses, we now construct only HTML responses,
and convert the HTML to plain text right before sending the message to
Matrix.
This is a first iteration, because the plain text has a few extra
newlines than it should, created by use of nested <p> tags.