discord.py
discord.py copied to clipboard
[commands]bot.process_with_str
Summary
Add method to invoke command with context and str
What is the feature request for?
discord.ext.commands
The Problem
To run command with str(Ex: Support running multi commands by semicolons, Like "/lockdown;/purge"), it needs to edit message attribute. But with this, it will be easier to process with str.
The Ideal Solution
for command in message.content.split(";"):
await bot.process_with_str(message, command)
The Current Solution
before_content = message.content
for command in message.content.split(";"):
message.content = command
await bot.process_command(message)
message.content = before_content
Additional Context
method name is temporary.
I feel like this is quite a niche feature to have, and the current solution seems like a fine implementation if you want something like this.
Something like this was planned. Might be worth revisiting it later.