Commit graph

9 commits

Author SHA1 Message Date
48f75a1efd Add command helpers 2024-12-27 18:41:14 +01:00
8a7d414a01 Add command abstraction 2024-12-27 18:41:14 +01:00
287ce97819 Remove unnecessary RwLock in Bot 2024-12-27 15:07:10 +01:00
0b8f3c45f3 Don't reexport bot and instance types 2024-12-27 15:07:10 +01:00
63edcba9fa Move config structs to corresponding modules 2024-12-27 15:07:10 +01:00
8377695529 Remove instance id generics
Instead, all instance ids are now usize (like message ids). This allows
me to enforce the fact that no two instances of a Bot must have the same
id by generating the ids in the Bot.

Reusing the same id for multiple instances that send their events to the
same place can lead to race conditions depending on how events are
handled. For example, the old instance might still be shutting down
while the new instance is already connected to a room, leading to an
InstanceEvent::Stopped from the old instance that seemingly applies to
the new instance.
2024-12-27 15:07:10 +01:00
36f6dc1587 Add Bot for managing multiple instances 2024-12-27 13:19:00 +01:00
0fdb77fbd3 Add instance-based examplebot 2024-12-27 13:18:36 +01:00
feacde16aa Add bot instance 2024-12-11 23:33:19 +01:00