Answer the question
In order to leave comments, you need to log in
How to get command context without passing it to parameters?
There is a function to send a response:
async def Reply(ctx, text):
toSend = f"{ctx.author.mention} {text}"
await ctx.send(toSend)
@client.command()
async def test(ctx, text):
...
await Reply(ctx, text)
Answer the question
In order to leave comments, you need to log in
Well, in theory it is possible (for example, through global), but without a very strong need for that - it’s not worth it, because:
- Explicit is better than implicit.
- Simple is better than complex.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question