Skip to content

Enhancefeat: add rate limits to absolute and fridge commands#32

Merged
HyScript7 merged 3 commits intoTheCodeVerseHub:mainfrom
Saksham-official:enhance
Apr 5, 2026
Merged

Enhancefeat: add rate limits to absolute and fridge commands#32
HyScript7 merged 3 commits intoTheCodeVerseHub:mainfrom
Saksham-official:enhance

Conversation

@Saksham-official
Copy link
Copy Markdown
Contributor

Description

This PR introduces rate limits to the ?absolute and ?fridge commands to prevent them from being spammed and causing potential raids, as mentioned in the issue.

A cooldown of 1 usage per 15 seconds per user (@commands.cooldown(1, 15, commands.BucketType.user)) has been applied to both commands in cogs/fun.py.

Closes #25

Changes Made

  • Added @commands.cooldown(1, 15, commands.BucketType.user) to the fridge hybrid command.
  • Added @commands.cooldown(1, 15, commands.BucketType.user) to the absolute hybrid command.

Impact

  • Protects the server and bot by stopping possible raids through spamming these commands.
  • Improves moderation functionality without disrupting the user experience.

Checklist

  • I have tested these changes.
  • My code follows the style guidelines of this project.

@Saksham-official
Copy link
Copy Markdown
Contributor Author

Saksham-official commented Mar 29, 2026

by mistake reverted @youngcoder45 now its ready to review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds per-user cooldowns to two high-traffic “fun” hybrid commands to reduce spam/raid potential, addressing issue #25.

Changes:

  • Added a 1-use-per-15-seconds per-user cooldown to the fridge hybrid command.
  • Added a 1-use-per-15-seconds per-user cooldown to the absolute hybrid command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@youngcoder45
Copy link
Copy Markdown
Contributor

Looks good to me @Saksham-official let's see what @HyScript7 says. Thanks!

Copy link
Copy Markdown
Contributor

@HyScript7 HyScript7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the late review. All looks good to me.
I'll be merging this now. Thank you for your contribution.

@HyScript7 HyScript7 merged commit 77c58c0 into TheCodeVerseHub:main Apr 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: Rate limit in Eigen commands like absolute and fridge

4 participants