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):
1.4m articles
1.4m replys
5 comments
57.0k users