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

[Prefix] Add Check to PrefixConverter to Prevent / Prefixes #37

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Once the bot is installed, run the following command in Discord:
| HidePing | 1.1.0 | <details><summary>Hidden mentions</summary>Mentions the user in a hidden ping</details> | sravan |
| Perform | 5.8.3 | <details><summary>Perform Actions like kiss, cuddle etc.</summary>The perform cog facilitates immersive roleplay experiences with commands for hugging, kissing, poking, kicking, and more, allowing users to engage in diverse interactive actions and expressions.</details> | Ari (Onii-chan#3920), sravan (@sravan_krishna) |
| Poll | 1.1.1 | <details><summary>make polls</summary>simple command to start poll using reactions</details> | sravan |
| Prefix | 1.0.4 | <details><summary>Manage guild prefixes.</summary>Manage guild prefixes more extensively.</details> | PhenoM4n4n and sravan |
| Prefix | 1.0.5 | <details><summary>Manage guild prefixes.</summary>Manage guild prefixes more extensively.</details> | PhenoM4n4n and sravan |
| Session | 1.1.1 | <details><summary>Command usage statuses</summary>aikaterna's rndstatus edited to display the number of commands used in a session as the status</details> | aikaterna and sravan |
| Timeout | 1.6.2 | <details><summary>Manage timeouts</summary>Add or remove timeout from users</details> | sravan |

Expand Down
4 changes: 4 additions & 0 deletions prefix/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ async def convert(self, ctx: commands.Context, argument: str) -> str:
raise commands.BadArgument(
f"Prefixes cannot be below {MINIMUM_PREFIX_LENGTH} in length."
)
if argument.startswith("/"):
raise commands.BadArgument(
"Prefixes cannot start with a slash (`/`) because it conflicts with Discord's slash commands."
)
return argument
2 changes: 1 addition & 1 deletion prefix/prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
class Prefix(commands.Cog):
"""Prefix management."""

__version__ = "1.0.4"
__version__ = "1.0.5"

def format_help_for_context(self, ctx):
pre_processed = super().format_help_for_context(ctx)
Expand Down
Loading