1aa8bcc6d2
As described in #165 , Gateway induced changes of entity structs do not get propagated to other structs holding the "same" object which got updated. This is bad because it means that structs still hold potentially outdated info. My proposed solution is to create components and composites. A component is an object with information which is supposed to be the same in at least 2 structs, such as a Channel object ("channels" field in Guild struct and lone Channel object for example). These components should be shared instead of cloned, to make sure that an update to this shared structs fields is reflected everywhere the struct is being used. We can do this by using `Arc<Mutex<T>>`. Mutex can be the std::sync::Mutex, as long as locks on the components themselves are not being held across .await points. ~~This draft is not yet finished, but~~ all instances of components in composite entity structs have been replaced with their `Arc<Mutex<T>>` counterparts already. |
||
---|---|---|
.github/workflows | ||
chorus-macros | ||
examples | ||
src | ||
tests | ||
.gitignore | ||
.rusty-hook.toml | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
SECURITY.md |
README.md
Chorus
A rust library for interacting with (multiple) Spacebar-compatible APIs and Gateways (at the same time).
Explore the docs »
Report Bug
·
Request Feature
·
Join Discord
About
Chorus is a Rust library that allows developers to interact with multiple Spacebar-compatible APIs and Gateways simultaneously. The library provides a simple and efficient way to communicate with these services, making it easier for developers to build applications that rely on them. Chorus is open-source and welcomes contributions from the community.
Contributing
If you would like to contribute, please feel free to open an Issue with the idea you have, or a Pull Request. Please keep our contribution guidelines in mind. Your contribution might not be accepted, if it violates these guidelines or our Code of Conduct.
Progress Tracker/Roadmap
Core Functionality
- Rate Limiter (hint: couldn't be fully tested due to an Issue with the Spacebar Server)
- Login (the conventional way)
- 2FA
- Registration
Messaging
- Sending messages
- Events (Message, User, Channel, etc.)
- Channel creation
- Channel deletion
- Channel management (name, description, icon, etc.)
- Join and Leave Guilds
- Start DMs
- Group DM creation, deletion and member management
- Deleting messages
- Message threads
- Reactions
- Message Search
- Message history
- Emoji
- Stickers
- Forum channels
User Management
- User profile customization
- Gettings users and user profiles
- Friend requests
- Blocking users
- User presence (online, offline, idle, etc.)
- User status (custom status, etc.)
- Account deletion
Additional Features
- Server discovery
- Server templates
Voice and Video
Permissions and Roles
- Role management (creation, deletion, modification)
- Permission management (assigning and revoking permissions)
- Channel-specific permissions
- Role-based access control
Guild Management
- Guild creation
- Guild deletion
- Guild settings (name, description, icon, etc.)
- Guild invites
Moderation
- Channel moderation (slow mode, etc.)
- User sanctions (mute, kick, ban)
- Audit logs
Embeds and Rich Content
- Sending rich content in messages (links, images, videos)
- Customizing embed appearance (title, description, color, fields)
Webhooks
- Webhook creation and management
- Handling incoming webhook events
Documentation and Examples
- Comprehensive documentation
- Example usage and code snippets
- Tutorials and guides