cordis-lib / cordis

Modular, micro-service based Discord API wrapper written in TS.
https://cordis.js.org
Other
29 stars 1 forks source link

feat(brokers/routing): RoutingClientInitOptions#maxMessageAge #74

Closed didinele closed 3 years ago

didinele commented 3 years ago

Please describe the changes this PR makes and why it should be merged: This PR adds the following option to the RoutingClient#init

By default, maxMessageAge being Infinity means you don't have to change anything in your codebase - however, I would suggest you do! This is fairly beneficial esp. for gateway users.

If your packet handlers die, currently... your bot may just play catchup with messages that could be.. as old as time! This new option allows you to set maximum age for a gateway packet before it should just be ignored.

Status and versioning classification: