A rust library for interacting with multiple Discord.com-compatible APIs and Gateways at the same time.

Overview

Rust Build Contributors Forks Stargazers Issues GPL3 License


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

Roadmap

Core functionality:

  • Rate Limiter (hint: couldn't be fully tested due to an Issue with the Spacebar Server)
  • Login (conventional way) (Guess what? Found an Issue with the Spacebar Server :3)
  • 2FA
  • Registration (encountered another Issue with the Spacebar Server which makes some error messages an empty string)
  • Gateway Events, multithreaded
  • Sending messages (Text, Images, Attachments)
  • Events (Message, User, Channel, etc.)
  • Adding, deleting and editing channels
  • User profile customization
  • Deleting messages
  • Emoji
  • Stickers
  • Listing users and user profiles
  • Message threads
  • Forum channels
Comments
  • Implement Gateway Functionality

    Implement Gateway Functionality

    There needs to be a working implementation of a gateway, which connects to the Gateway of an instance and can send and receive messages. It would be great if the Gateway would emit 'events' on things like message received, message edited message deleted etc. These events could then, for example, be used by the client to update its UI when the event happens.

    Priority: High Status: Accepted Type: Enhancement Difficulty: Complex 
    opened by bitfl0wer 5
  • Multithreading and Gateways

    Multithreading and Gateways

    The foundation for Gateways has been made! The library now allows you to write code which immediately runs, when a specific event is received via the gateway.

    However: Actually communicating with the gateway and receiving those events is where I have failed until now. I just couldn't get it to work the way I would have liked to, and I require help on this one.

    From my POV, an ideal implementation would have each Gateway/Websocket running in a seperate thread. Each gateway thread updates the GatewayEvents (defined in src/gateway.rs), which would trigger the observers.

    Priority: High Status: Accepted Type: Enhancement Difficulty: Complex 
    opened by bitfl0wer 1
  • Feature/guild creation deletion

    Feature/guild creation deletion

    Merge guild creation/deletion into main. Before this can be merged, the following things will still need to be done:

    • [x] Add Tests
    • [x] Debug said tests, if necessary

    Closes #44

    Status: Pending Type: Enhancement 
    opened by bitfl0wer 0
  • Gateway implementation

    Gateway implementation

    Add an implementation of multi-threaded gateways.

    Currently only a few of the events the server can dispatch are implemented, further ones need to be added to Events and transcribed from the docs into rust types. (A lot of these require more complex types like Guild, Sticker etc) All the send events are fully implemented.

    The implementation works by running a listener thread for handling events and a heartbeat thread. Sending events to the server can be done directly in the thread that needs it, via the shared websocket tx.

    Due to needing to access the observers and events on different threads, both now have to encapsulated in an Arc Mutex.

    Status: Accepted 
    opened by kozabrada123 0
  • User settings

    User settings

    It should be possible to modify all aspects of a user profile using this library. This includes, but is not limited to:

    • [ ] Username
    • [ ] Discriminator
    • [ ] Avatar
    • [ ] Accent Color
    • [ ] Email
    • [ ] Pronouns
    • [ ] Banner
    • [ ] Bio
    • [ ] Theme Colors
    • [ ] Phone
    • [ ] NSFW
    • [ ] Disabled
    • [ ] Deletion
    Priority: High Status: In Progress Type: Enhancement Difficulty: Complex 
    opened by bitfl0wer 0
  • Improve error handling in request limiter

    Improve error handling in request limiter

    the rate limiter should return more custom errors instead of just generic ones. I have already started with this in #44, but this still needs some work.

    Priority: Medium Status: Available Type: Enhancement Difficulty: Easy 
    opened by bitfl0wer 0
  • Gateway: 100% (+) coverage

    Gateway: 100% (+) coverage

    #50

    Currently only a few of the events the server can dispatch are implemented, further ones need to be added to Events and transcribed from the docs into rust types. (A lot of these require more complex types like Guild, Sticker etc)

    Making an issue to track the progress of implementing every gateway event

    • [ ] Application Command Permissions Update
    • [ ] Auto Mod
      • [ ] Rule
        • [ ] Create
        • [ ] Update
        • [ ] Delete
      • [ ] Action Execution
    • [X] Channel
      • [X] Create
      • [X] Update
      • [X] Unread Update
      • [X] Delete
      • [X] Pins Update
    • [X] Call (RE)
      • [X] Create
      • [X] Update
      • [X] Delete
    • [X] Thread
      • [x] Create
      • [x] Update
      • [x] Delete
      • [x] List Sync
      • [x] Member Update
      • [x] Members Update
    • [ ] Guild
      • [X] Create
      • [X] Update
      • [X] Delete
      • [x] Audit Log entry create
      • [X] Ban Add
      • [X] Ban Remove
      • [X] Emojis Update
      • [X] Stickers Update
      • [X] Integrations Update
      • [X] Member
        • [X] Add
        • [X] Remove
        • [X] Update
        • [X] Chunk
      • [X] Role
        • [X] Create
        • [X] Update
        • [X] Delete
      • [ ] Scheduled Event
        • [ ] Create
        • [ ] Update
        • [ ] Delete
        • [ ] User Add
        • [ ] User Remove
      • [X] Passive Update V1 (RE)
    • [X] Integration
      • [X] Create
      • [X] Update
      • [X] Delete
    • [ ] Interaction Create
    • [x] Invite
      • [x] Create
      • [x] Delete
    • [X] Message
      • [X] Create
      • [X] Update
      • [X] Delete
      • [X] Delete Bulk
      • [X] Reaction
        • [X] Add
        • [X] Remove
        • [X] Remove All
        • [X] Remove Emoji
      • [X] ACK
    • [X] Presence Update
    • [ ] Stage Instance
      • [ ] Create
      • [ ] Update
      • [ ] Delete
    • [X] Sessions Replace
    • [X] Typing Start
    • [X] User Update
    • [ ] Voice State Update
    • [ ] Voice Server Update
    • [X] Webhooks Update

    Also, I am working on this already :)

    Priority: High Status: In Progress Type: Enhancement Difficulty: Medium 
    opened by kozabrada123 0
  • Permissions and Roles

    Permissions and Roles

    One should be able to modify, create and delete Roles and their permissions. This extends to modifying role and user permissions on channels and channel categories.

    Priority: High Status: Available Type: Enhancement Difficulty: Complex 
    opened by bitfl0wer 0
Owner
polyphony
Providing FOSS tools to interact with @spacebarchat, written in Rust.
polyphony
A Litecord compatible/inspired OSS implementation of Discord's backend for fun and profit.

A Litecord compatible/inspired OSS implementation of Discord's backend for fun and profit.

Evie Viau 3 May 9, 2022
A rust(serenity) based discord bot for the hacksquad discord server

A Discord Bot for Hacksquad How to Deploy? Requirements Docker Docker Compose Steps To Run Copy the docker-compose.yml and .env.example files to your

HackSquad 5 Jan 4, 2023
A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers.

ACABot A Discord bot focused on addressing the inherent problems with Discord, to allow a more socialist/anarchist organization of servers (or "guilds

null 4 May 3, 2022
Collection of "surprising behaviours" in Rust. In the same spirit of wtfpython and wtfjs.

wtfrust Collection of "surprising behaviours" in Rust. In the same spirit of wtfpython and wtfjs. This document avoids common and general problems in

张实唯 3 Oct 29, 2021
Small and simple stateful applications, designed to facilitate the monitoring of unwanted behaviors of the same.

Violet Violet é um pequeno e simples monitorador de aplicação, voltado para receber eventos de erro e estado. Instalação simples: Dependencias: Docker

Lucas Mendes Campos 3 Jun 4, 2022
secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process.

secmem-proc is a crate designed to harden a process against low-privileged attackers running on the same system trying to obtain secret memory contents of the current process. More specifically, the crate disables core dumps and tries to disable tracing on unix-like OSes.

null 3 Dec 19, 2022
`fugit` provides a comprehensive library of `Duration` and `Instant` for the handling of time in embedded systems, doing all it can at compile time.

fugit fugit provides a comprehensive library of Duration and Instant for the handling of time in embedded systems, doing all it can at compile time. T

Emil Fresk 40 Oct 2, 2022
A library for working with alpaca.markets APIs, including the Broker API.

alpaca-rs, an unofficial Rust SDK for the Alpaca API (WIP) Features Easy to use - Minimal setup and no boilerplate. Cross-platform - can run on most p

null 4 Dec 2, 2023
cqlsh-rs is a command-line interface for interacting with Cassandra using CQL

cqlsh-rs is a command-line interface for interacting with Cassandra using CQL (the Cassandra Query Language). Originally shipped with every Cassandra package and implemented in Python 2, this tool is reimplemented in Rust.

28Smiles 1 Feb 10, 2022
Rust bindings for the WebView2 COM APIs

webview2-rs Rust bindings for the WebView2 COM APIs Crates in this repo The root of this repo defines a virtual workspace in Cargo.toml which includes

Bill Avery 24 Dec 15, 2022
Provides two APIs for easily cancelling futures, with the option to fallback to a timeout cancellation

tokio-context Provides two different methods for cancelling futures with a provided handle for cancelling all related futures, with a fallback timeout

Peter Farr 18 Dec 27, 2022
🚀 Fast and 100% API compatible postcss replacer, built in Rust

?? Fast and 100% API compatible postcss replacer, built in Rust

迷渡 472 Jan 7, 2023
CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" format.

Lighthouse Groupie CLI tool that make it easier to perform multiple lighthouse runs towards a single target and output the result in a "plotable" form

Polestar 1 Jan 12, 2022
A tool to calculate mean and standard deviation from multiple tests using PageSpeed Insights API.

psi-sample PSI Test tool is an open source tool to assist web developers that runs Page Speed Insight test manually! Installing To install the psi-tes

Igor Brasileiro 14 Sep 10, 2022
Serenity is a Rust library for the Discord API

serenity Serenity is a Rust library for the Discord API. View the examples on how to make and structure a bot. Serenity supports bot login via the use

serenity 3.3k Jan 2, 2023
Efficent platform for inference and serving local LLMs including an OpenAI compatible API server.

candle-vllm Efficient platform for inference and serving local LLMs including an OpenAI compatible API server. Features OpenAI compatible API server p

Eric Buehler 21 Nov 15, 2023
A webhook-based Discord slash command library

Slashook A webhook-based Discord slash command library. This is a WIP project. Please note breaking changes can occur within minor releases until vers

Tonkku 11 Oct 18, 2022
Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Edge Computing + chūnibyō = Edgelord ✨ ?? Edgelord Edgelord is now working. You can contribute for it. Edgelord is a Rust library for cloudflare worke

null 23 Dec 26, 2022
Unofficial Bitwarden compatible server written in Rust, formerly known as bitwarden_rs

Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deploy

Daniel García 21.5k Jan 8, 2023