Skip to content

Commit 41ce2ea

Browse files
committed
Use * in command parameter
1 parent cd94027 commit 41ce2ea

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cogs/utility.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ async def add_perms(self, ctx):
883883

884884
@add_perms.command(name='command')
885885
@checks.has_permissions(PermissionLevel.OWNER)
886-
async def add_perms_command(self, ctx, command: str, user_or_role: Union[User, str]):
886+
async def add_perms_command(self, ctx, *, command: str, user_or_role: Union[User, str]):
887887
"""Add a user, role, or everyone permission to use a command."""
888888
if command not in self.bot.all_commands:
889889
embed = Embed(
@@ -912,7 +912,7 @@ async def add_perms_command(self, ctx, command: str, user_or_role: Union[User, s
912912

913913
@add_perms.command(name='level', aliases=['group'])
914914
@checks.has_permissions(PermissionLevel.OWNER)
915-
async def add_perms_level(self, ctx, level: str, user_or_role: Union[User, str]):
915+
async def add_perms_level(self, ctx, *, level: str, user_or_role: Union[User, str]):
916916
"""Add a user, role, or everyone permission to use commands of a permission level."""
917917
if level.upper() not in PermissionLevel._member_names_:
918918
embed = Embed(
@@ -949,7 +949,7 @@ async def remove_perms(self, ctx):
949949

950950
@remove_perms.command(name='command')
951951
@checks.has_permissions(PermissionLevel.OWNER)
952-
async def remove_perms_command(self, ctx, command: str, user_or_role: Union[User, str]):
952+
async def remove_perms_command(self, ctx, *, command: str, user_or_role: Union[User, str]):
953953
"""Remove a user, role, or everyone permission to use a command."""
954954
if command not in self.bot.all_commands:
955955
embed = Embed(
@@ -978,7 +978,7 @@ async def remove_perms_command(self, ctx, command: str, user_or_role: Union[User
978978

979979
@remove_perms.command(name='level', aliases=['group'])
980980
@checks.has_permissions(PermissionLevel.OWNER)
981-
async def remove_perms_level(self, ctx, level: str, user_or_role: Union[User, str]):
981+
async def remove_perms_level(self, ctx, *, level: str, user_or_role: Union[User, str]):
982982
"""Remove a user, role, or everyone permission to use commands of a permission level."""
983983
if level.upper() not in PermissionLevel._member_names_:
984984
embed = Embed(
@@ -1014,7 +1014,7 @@ async def get_perms(self, ctx):
10141014

10151015
@get_perms.command(name='command')
10161016
@checks.has_permissions(PermissionLevel.OWNER)
1017-
async def get_perms_command(self, ctx, command: str):
1017+
async def get_perms_command(self, ctx, *, command: str):
10181018
"""View the currently-set permissions for a command."""
10191019
if command not in self.bot.all_commands:
10201020
embed = Embed(
@@ -1050,7 +1050,7 @@ async def get_perms_command(self, ctx, command: str):
10501050

10511051
@get_perms.command(name='level', aliases=['group'])
10521052
@checks.has_permissions(PermissionLevel.OWNER)
1053-
async def get_perms_level(self, ctx, level: str):
1053+
async def get_perms_level(self, ctx, *, level: str):
10541054
"""View the currently-set permissions for commands of a permission level."""
10551055
if level.upper() not in PermissionLevel._member_names_:
10561056
embed = Embed(
@@ -1086,7 +1086,7 @@ async def get_perms_level(self, ctx, level: str):
10861086

10871087
@commands.command(hidden=True, name='eval')
10881088
@checks.has_permissions(PermissionLevel.OWNER)
1089-
async def eval_(self, ctx, *, body):
1089+
async def eval_(self, ctx, *, body: str):
10901090
"""Evaluates Python code"""
10911091

10921092
env = {

0 commit comments

Comments
 (0)