I've tried to research online, but no other questions were able to help me with my issue.
Here's my scenario.
I am making a mute command in discord.py.
I want the time to be optional, but if the time is not specified I want that argument to be part of the reason.
Clarification on what I mean:
@client.command()
@commands.has_permissions(kick_members=True)
async def mute(ctx, member: Member = None, time: int = None, *, reason = None):
pass
Here, if time is None, then make it part of reason.
The bot will accept both of these:
!mute @user 1h spam
and
!mute @user spam
Is this possible?