I'm trying to make a withdraw command in by economy bot, but python won't let me use "with" as the name. I think the reason why is that with is a built in python function. Can someone tell me how I can make "with" the command name in async def with(ctx, amount=None):?
async def with(ctx, amount=None):
Code:
@client.command() async def with(ctx, amount = None):
Error:
File "main.py", line 363 async def with(ctx, amount = None): ^ SyntaxError: invalid syntax
with is a reserved keyword in Python. Override the command name like
with
@client.command(name='with') async def _with(ctx, amount = None):
2.1m questions
2.1m answers
60 comments
57.0k users