Skip to content

Rate limit :latex#434

Draft
thebeanogamer wants to merge 8 commits intomasterfrom
bugfix/rate-limit-latex
Draft

Rate limit :latex#434
thebeanogamer wants to merge 8 commits intomasterfrom
bugfix/rate-limit-latex

Conversation

@thebeanogamer
Copy link
Member

Helps with #429, needs @anonguy to look at if this will work for the inline LaTeX.

@github-actions github-actions bot added the maths Changes to the maths cog label May 5, 2020
@thebeanogamer
Copy link
Member Author

This doesn't work on inline

@Sh3llcod3 Sh3llcod3 mentioned this pull request May 28, 2020
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

@github-actions github-actions bot added the stale Inactive topics label Jun 28, 2020
@thebeanogamer thebeanogamer removed the stale Inactive topics label Sep 24, 2020
@ghost
Copy link

ghost commented Dec 22, 2020

Yeah this will only rate limit the command, we need to add a rate limit to the bit of code that does the inline latex. This can be done by importing discord.py cooldowns.

@ghost
Copy link

ghost commented Dec 22, 2020


cd_mapping = CooldownMapping.from_cooldown(3, 60, BucketType.member)

bucket = self.cd_mapping.get_bucket(message)
            retry_after = bucket.update_rate_limit()
            if retry_after:
                user is rate limited, return and maybe send a error msg
            else:
                Do the inline stuff as normal

@jerbob jerbob removed their assignment Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maths Changes to the maths cog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants