Please describe the changes this PR makes and why it should be merged:
This PR adds the following option to the RoutingClient#init
RoutingClientInitOptions#maxMessageAge - defaulting to Infinity
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:
Code changes have been tested against the Discord API, or there are no code changes
This PR changes the library's interface (methods or parameters added)
Please describe the changes this PR makes and why it should be merged: This PR adds the following option to the
RoutingClient#init
RoutingClientInitOptions#maxMessageAge
- defaulting toInfinity
By default,
maxMessageAge
beingInfinity
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: