Commit Graph

18 Commits

Author SHA1 Message Date
projectmoon 624c748583 Add useful logging of skipping commands.
This commit lays the groundwork for a stateful dicebot, instead of one
that only responds to commands. It now maintains a simple state
machine, used to store the current state of the bot. Currently, it
only cares about whether or not the message about skipping old
messages was logged.
2020-09-27 09:44:59 +00:00
projectmoon 6d49c9e16c Fall back to 15 minutes if oldest message age not specified.
This makes the oldest message age setting optional, in additon to the
entire bot config (for now). If the oldest message age is not
specified (or if the entire bot config is missing), it will default to
15 minutes.
2020-09-27 09:44:59 +00:00
projectmoon fabda911fd Ignore messages that are too old. 2020-09-27 09:44:59 +00:00
projectmoon f3f5846826 Fix command parser returning non-commands/empty messages as errors.
This behavior became broken again after switching away from the
macro-based command parsing. The bot would return any non !command
message as an error, which would cause it to read more messages, and
return those as errors, until finally the matrix SDK would throw up.

Command parser now more properly handles empty messages and
non-commands, but we also simply abort processing if the incoming
message doesn't start with an exclamation point.
2020-08-31 23:33:46 +00:00
projectmoon 54a3cc0880 Add basic logging to the dice bot. 2020-08-28 00:13:04 +00:00
projectmoon 18a05ebd7c Add auto-join, adapted from matrix SDK examples. 2020-08-27 23:50:32 +00:00
jeff 0eb181a7a9 Clean up dependencies and upgrade to 0.3.0 after matrix SDK port. 2020-08-27 00:05:19 +00:00
jeff 6572e1d04e Port dice bot to use matrix-rust-sdk.
This gives us many things for free, like automated state management,
no need to declare special API structs and use HTTP requests directly,
and most importantly: ENCRYPTION!
2020-08-26 23:53:30 +00:00
Taylor C. Richberger 6cb88a566c get everything working and slightly documented 2020-04-21 22:30:00 -06:00
Taylor C. Richberger 8e50218c03 cargo fix 2020-04-21 22:20:05 -06:00
Taylor C. Richberger 6d180734d5 make actually work with messages 2020-04-21 22:19:15 -06:00
Taylor C. Richberger e7458c12ad cargo fix and fmt 2020-04-21 00:09:43 -06:00
Taylor C. Richberger d0f3ec7ad2 handle matrix message handling 2020-04-20 15:09:38 -06:00
Taylor C. Richberger 59cb407eae Add dicebot-roll dice expression parser 2020-04-19 16:07:33 -06:00
Taylor C. Richberger b4ccae581a improve documentation 2020-04-18 17:12:25 -06:00
Taylor C. Richberger 7cc29ddf8f get things cleaned up a little bit more 2020-04-18 17:09:55 -06:00
Taylor C. Richberger f129f45864 add TODO 2020-04-17 16:54:07 -06:00
Taylor C. Richberger b30eec72b3 modularize things 2020-04-17 16:53:27 -06:00