Commit Graph

19 Commits

Author SHA1 Message Date
projectmoon 6b6e59da2e Initial SQLx implementation (variables). not yet wired up to bot.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
- Adds migrations for the necessary tables.
 - Implements the user variables database functions.
 - Adds sqlx metadata for 'offline' use so we can build without a database.
2021-05-15 15:27:40 +00:00
projectmoon e177da9c25 Centralize record_room_information function.
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is failing Details
2020-11-30 19:53:26 +00:00
projectmoon dda0d74f45 Implement resync command without filtering ourselves out.
continuous-integration/drone/push Build was killed Details
2020-11-22 21:30:24 +00:00
projectmoon 51ba3e3f42 Record user join/leaves in rooms. Move event emitter to its own file. 2020-11-08 21:47:01 +00:00
projectmoon 66f9bc6013 Move original dice rolling code into its own 'basic' module.
This gives it parity with the other systems: cofd and cthulhu. More
refactoring and a rewrite later as we trend towards more
system-specific implementations.
2020-11-04 20:46:25 +00:00
projectmoon d5034c11dc Basic implementation of CoC dice rolling.
Not hooked up to parser or commands yet.
2020-10-31 20:51:17 +00:00
projectmoon 9268314421 Remove actix, move state to RwLock. Update dependencies. 2020-10-18 20:37:02 +00:00
projectmoon 6cdc465a2e Add database and storage of user variables.
This commit introduces the Sled embedded key-value store for keeping
track of user variables on a per-room basis. Extensive changes were
made to the command module to separate concerns and also pass the
database "connection" down the line.

 - A new "Context" object was created to hold information and state
   needed for command execution (namely the database).
 - Database is very simple for now, storing only user variables.
   Refactoring later for storing more complicated types.
 - State actor moved into Actors struct, in preparation for either
   more actors, or ripping the whole thing out entirely.
 - Other modules are also more properly separated, notably
   the config module is entirely self-contained.
2020-10-16 13:18:27 +00:00
projectmoon 938107feae Implement Actix for state, refactor bot code.
Instead of using an Arc Mutex for state management embedded directly
into the bot, utilize actor pattern, with the idea that this will be
much more useful than simply logging a message once in the future.

This also refactors the bot code so that instead of a single run_bot
function, the DiceBot struct now has a run() method attached to it.
This also necessitated changes and cleanup to the dicebot main, which
is for the better anyhow.

The error and config types are also now in their own files, and
implemented for more in-depth use cases.
2020-10-03 20:45:14 +00:00
projectmoon 531844fbb7 Implement basic, not-well-formatted help. 2020-08-30 21:54:01 +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
projectmoon 2c08eb41ad Implement Chronicles of Darkness dice system, improve error handling.
Adds the Chronicles of Darkness 2E dice system to the bot, and also
somewhat improves the error handling when weird commands are received.
2020-08-23 21:24:04 +00:00
Taylor C. Richberger e7458c12ad cargo fix and fmt 2020-04-21 00:09:43 -06:00
Taylor C. Richberger 649aec531e implement command parser fully 2020-04-21 00:07:03 -06:00
Taylor C. Richberger 90ae9c142c lay command groundwork. Maybe need to make parsing more ergonomic. 2020-04-20 21:15:13 -06:00
Taylor C. Richberger a9e1ccbf2e restructure into dice module 2020-04-20 11:19:50 -06:00
Taylor C. Richberger 56de3d34f1 write out nom-based parser 2020-04-20 00:32:57 -06:00
Taylor C. Richberger 59cb407eae Add dicebot-roll dice expression parser 2020-04-19 16:07:33 -06:00
Taylor C. Richberger b30eec72b3 modularize things 2020-04-17 16:53:27 -06:00