discordgo icon indicating copy to clipboard operation
discordgo copied to clipboard

RateLimit for FollowupMessageCreate

Open FedorLap2006 opened this issue 1 year ago • 3 comments

Every interaction has unique token, therefore a call of FollowupMessageCreate will create a bucket per interaction. This might cause the bot to OOM eventually.

Originally posted by @wu56781234 in https://github.com/bwmarrin/discordgo/discussions/1332

FedorLap2006 avatar Feb 20 '23 22:02 FedorLap2006

@FedorLap2006 Do we need bucket for FollowupMessageCreate? Discord API says Create Followup Message are not bound to Application Global Rate Limit. https://discord.com/developers/docs/interactions/receiving-and-responding#endpoints

wu56781234 avatar Feb 21 '23 05:02 wu56781234

@FedorLap2006 @bwmarrin regarding this issue, can i submit a merge request?

wu56781234 avatar Mar 20 '23 03:03 wu56781234

And also I noticed that current buckets keep growing. To solve this can implement a schedule intervally remove those expired buckets.

wu56781234 avatar Mar 20 '23 03:03 wu56781234