Update 'Feature: Room State Management'
parent
832ec8cb44
commit
93aec5ed34
|
@ -65,6 +65,14 @@ Need to utilize `on_room_member` event for this:
|
||||||
|
|
||||||
* When the bot joins a room for the first time, in addition to recording all users, it should also record information about the room itself.
|
* When the bot joins a room for the first time, in addition to recording all users, it should also record information about the room itself.
|
||||||
|
|
||||||
|
### Architecture Changes
|
||||||
|
|
||||||
|
Implementation of a new resync command, and common code used by both the room member changed event and execution of this command.
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
Most functionality is in a new database object `Rooms`. Keep track of users and the rooms they are in, both by username to a list of room IDs, and a room ID to list of usernames. It will also keep track of actual room information and other useful stuff.
|
Most functionality is in a new database object `Rooms`. It contains all functions for storing information about rooms and users.
|
||||||
|
|
||||||
|
The code is being reorganized to support a new command called resync.
|
||||||
|
|
||||||
|
A new "business logic" layer needs to be created that can do things like update room info. This is because it might be called from a command, event handler, or even bot startup.
|
||||||
|
|
Loading…
Reference in New Issue