Skip to content

Releases: hitblast/filthy-rich

v1.0.6

Choose a tag to compare

@github-actions github-actions released this 01 Jul 05:16
v1.0.6
2476269

v1.0.6

Internal changes:

  • Dependencies have been upgraded and some sub-dependencies were removed.

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 13 May 06:31
v1.0.5
8685400

Internal changes:

  • Code quality improvements.

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 12 May 06:56
v1.0.4
358c7db

New features:

  • Added PresenceRunner::can_connect for checking if a Discord client is available for connection. This works without the initialization of PresenceRunner.
  • Added two new type aliases:
    • RPCRunner (alias for PresenceRunner)
    • RPCClient (alias for PresenceClient)

v1.0.3

Choose a tag to compare

@github-actions github-actions released this 11 May 06:18
v1.0.3
4cbb443

Internal changes:

  • Added a new retry! macro for minimizing some duplicate code related to incrementing the retries counter and executing the passed closure from on_retry.
  • Added a new str! macro globally which aids with generating functions returning &str from String fields (yeah, I'm lazy).

v1.0.2

Choose a tag to compare

@github-actions github-actions released this 10 May 06:33
v1.0.2
a258a97

Changes:

  • Removed exponential backoff as it was largely unused. It has been replaced with a RETRY_DELAY constant with the value being 1 second.

Internal changes:

  • Opcode is now PartialEq-compatible and is directly parsed with read_frame() as a part of the Frame object.
  • Made DiscordSock::write private as send_frame is used throughout most of the code, and bare-bones writes are risky.
  • Removed the internal connect flag.

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 09 May 06:44
v1.0.1
083fcbe

This release primarily focuses on optimizations.

Changes:

  • Closures passed in with on_* event functions now spawn those functions in a separate thread for leaving no obstructions in the inner loop.

Internal changes:

  • The tokio::select! for receiving commands and reading frames is now unbiased again, giving equal priority to both of them.

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 08 May 07:53
v1.0.0
67fec8c

Finally, a stabilized API for filthy-rich!

New features:

  • Added a new ActivitySpec type which basically replaces the current architecture of a mutable Activity to a post-built, immutable object which can be sent around.
  • Added Activity::empty_spec which gives an empty but usable ActivitySpec (basically executes ActivitySpec::default internally).
  • ActivityResponseData now includes an ActivityPayload object (flattened internally) instance for you to directly see which activity details were sent.
  • Completed the ReadyData struct with these changes:
    1. New fields in ReadyData:
    • v - RPC version (u8)
    • config - server configuration (a new ServerConfigurationData object)
    1. The inner user field (with type DiscordUser) now has the complete specification of struct fields documented in the official Discord RPC documentation.

Changes:

  • ActivityBuilder::build now returns Result<ActivitySpec, ActivitySpecBuildError> with all of its niceties (guardrails for you to bring your Rich Presence to life with safety).
  • All of the asset keys/values/URLs which can be passed through the builder functions are now None-filtered.
  • PresenceRunner::new now accepts any type of value for client_id as long as it implements Into<String>.
  • ActivityResponseData now only gives out borrowed read-only data through functions (e.g. ActivityResponseData::name now returns Option<&str>).
  • The change above also has been done to ReadyData.
  • Removed unused derive macros from Activity since its now just a placeholder struct for accessing ActivityBuilder with no values attached to it.
  • A lot of improvements to the documentation for various items in the library!

Bug fixes:

  • Fixed a fatal bug in ping-pong logic which led to the sending of frames with PING and not PONG in response to PING.

Internal changes:

  • Added an idiomatic Opcode enum and bettered code quality for matching opcodes in the socket.read_frame() loop inside of PresenceRunner.
  • Removed the use of Arc from the inner readhalf and writehalf fields of DiscordSock since the main loop doesn't cross thread boundaries.
  • Added a new DisconnectReason::OldRelicComputer error.
  • ActivityPayload, TimestampPayload, ButtonPayload and AssetsPayload are all public structs now. Their fields can be accessed using functions which point to borrowed data.
  • The types modules is now separated into many other modules internally.
  • Optimized some reusable syntax for PresenceRunner with macros for a better developer experience.
  • Removed the acquire!() macro from DiscordSock.

v0.14.1

Choose a tag to compare

@github-actions github-actions released this 04 May 08:00
v0.14.1
98e279a

Internal changes:

  • Removed unsafe buffer init from the internal DiscordSock::read_frame function and implement a MAX_FRAME_SIZE, which, if crossed, returns a DiscordSockError::PayloadTooLarge error from the function (thanks to @Sreehari425) (see pull request).

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 03 May 14:15
v0.14.0
f374073

New features:

  • Added PresenceRunner::on_retry for accepting a closure to execute during socket creation / handshake retries. The returned usize value (through the closure parameter) indicates the amount of total retries done at the time of the closure's execution.
  • Added PresenceRunner::set_max_retries for enabling developers to set a custom retry count for socket creation / handshakes after which the runner instance should give up on connecting to Discord. By default this is set to 0 (indefinite) internally.

Bug fixes:

  • Fixed a bug which had prevented the closure passed through on_activity_send from firing due to improper fields in arRPC.

API changes:

  • PresenceClient::client_id now returns an &str instead of a cloned String.
  • All fields for the ActivityResponseData struct have been made optional.

Internal changes / improvements:

  • Use BytesMut/Bytes instead of standard Vec<u8> in places (added a new bytes crate to the dependencies list).
  • Removed multiple writes from send_frame and instead merged them into a single logical write.
  • Removed the json!() macro call from DiscordSock::do_handshake and replaced it with PresenceHandshake.
  • Removed unused derive macros from several structs in the types module.
  • Minor optimizations have been done to ActivityCommand.

v0.13.2

Choose a tag to compare

@github-actions github-actions released this 02 May 05:03
v0.13.2
42222a2

Improvements:

  • Much smaller tokio bundle (removed the full feature set in favor of a more intentional list of features).