A rust library for interacting with multiple Spacebar-compatible Instances at once.
Go to file
Flori 1fdbe6cc00 Join/Leave Guilds, (Group) DMs and minor improvements (#157)
## Summary:

**Added:**
- Schemas `PrivateChannelCreateSchema` `ChannelInviteCreateSchema`, `AddChannelRecipientSchema` recursively (including schemas which were needed to create these schemas)
- Methods `create_private_channel`, `leave_guild`, `accept_invite`, `create_user_invite`, `create_guild_invite`, `add_channel_recipient`, `remove_channel_recipient`
- Integration tests for the functionality covered by implementing #45
- Documentation in some places where I noticed it would be useful to have some
- `create_user` method in `/src/tests`: Cuts down on test boilerplate needed to create an addition test user

**Changed:**
- `.gitignore`
  - Added `.DS_store` files to gitignore (some weird macos files), removed Cargo.lock, as Cargo.lock should be included for libraries
- Added a lot of default trait derives like Clone, Copy, PartialEq, Eq, Ord, PartialOrd to structs and enums where I saw them missing
- Added missing `teardown()` calls to the integration tests
- Renamed integration test files in `/src/tests` dir to all be plural: `channel.rs` -> `channels.rs`
- Made more fields on `User` type `Option<>`
- All instances in `/src/tests` where a second test user was created using a RegistrationSchema and the register_user method were replaced with the new `create_user` method
- README.md: Marked roadmap fields covered by #45 as implemented
- Changed visibility of `/src/tests/common/mod.rs` methods from `pub` to `pub(crate)`. In hindsight, this was probably not required, haha

**Removed:**
- Unneeded import in`src/types/config/types/guild_configuration.rs`


## Commit log:

* Add .DS_store, remove Cargo.lock

* Create PrivateChannelCreateSchema

* pub use users

* add channels.rs

* create channels.rs

* Add Deserialize/Serialize derives

* Implement create_private_channel

* Add create_dm() test

* Make optional fields on `User` `Option<>`

* Check boxes for implemented features

* Create users/guilds.rs

* Remove unneeded import

* Add UserMeta::leave_guild()

* Create api/invites/mod.rs

* Add debug print to send_request

* Rename tests files

* Create invites.rs

* create invite.rs

* Add documentation

* Implement accept_invite

* Sort fields on Channel alphabetically

* Add invite mod

* Add forgotten teardown() at test end

* change visiblities, add create_user()

* Implement `create_user_invite()`

* start working on invite tests

* Add allow flags

* Fix bad url

* Create CreateChannelInviteSchema and friends

* remove non-implemented test code

* add body to requests

* Add Clone to UserMeta

* More comprehensive error message when running into a deserialization error

* Add arguments documentation to accept_invite

* Add Eq derive to GuildFeaturesList

* Add Eq derive to Emoji

* Add Eq derive to GuildBan

* Add create_accept_invite() test

* Add Default derive to ChannelCreateSchema

* Change create_guild_invite to return GuildInvite

* Dates as chrono::Date(Utc); sort alphabetically

* Add default derives wherever possible

* Implement add_- and remove_channel_recipient

* Create AddChannelRecipientSchema

* replace otheruser regs with bundle.creeate_user()

* Add (disabled) test remove_add_person_from_to_dm()
2023-07-17 19:36:28 +02:00
.github/workflows Update code-ql action to v2 2023-07-17 19:35:16 +02:00
examples Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
src Join/Leave Guilds, (Group) DMs and minor improvements (#157) 2023-07-17 19:36:28 +02:00
tests Join/Leave Guilds, (Group) DMs and minor improvements (#157) 2023-07-17 19:36:28 +02:00
.gitignore Join/Leave Guilds, (Group) DMs and minor improvements (#157) 2023-07-17 19:36:28 +02:00
.rusty-hook.toml Change rusty-hook to be pre-commit 2023-05-28 11:43:03 +02:00
Cargo.lock Join/Leave Guilds, (Group) DMs and minor improvements (#157) 2023-07-17 19:36:28 +02:00
Cargo.toml Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
LICENSE Initial commit 2023-04-03 22:19:25 +02:00
README.md Join/Leave Guilds, (Group) DMs and minor improvements (#157) 2023-07-17 19:36:28 +02:00
SECURITY.md Create SECURITY.md 2023-06-04 22:17:56 +02:00

README.md

Discord Build Contributors Forks Issues


Logo

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

Messaging

User Management

Additional Features

  • Server discovery
  • Server templates

Voice and Video

Permissions and Roles

Guild Management

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