diff --git a/main.py b/main.py index 87db849..b93a549 100644 --- a/main.py +++ b/main.py @@ -49,7 +49,7 @@ async def on_ready(): @bot.command() -async def grant_role(ctx, study_group_name: str, ukco: int): +async def grant_role(ctx, study_group_name: str, ukco: str): """ Grant a role to the user based on the study group and UKCO. :param ctx: The context of the command. @@ -63,7 +63,7 @@ async def grant_role(ctx, study_group_name: str, ukco: int): return # Check UKCO format - if not (1000_0000 < ukco < 9999_9999): + if not ukco.isdigit() or not len(ukco) == 8: await reply_error(ctx, 'Invalid UKCO format.') await reply(ctx, HELP_MESSAGE) return