Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rate limit :latex #434

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Rate limit :latex #434

wants to merge 8 commits into from

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