Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore_extra option for commands.Bot #5940

Open
sevenc-nanashi opened this issue Oct 17, 2020 · 2 comments
Open

ignore_extra option for commands.Bot #5940

sevenc-nanashi opened this issue Oct 17, 2020 · 2 comments
Labels
feature request This is a feature request.

Comments

@sevenc-nanashi
Copy link
Contributor

The Problem

Problem that I have to write ignore_extra=False in all commands when I want to raise Too many arguments.

The Ideal Solution

ignore_extra option in commands.Bot.
Like:

bot = commands.Bot(command_prefix="!", ignore_extra=False)

The Current Solution

write ignore_extra=False to all @bot.command(or @commands.command)
or change the lib.(core.py line 230)

(Maybe not right sentence, sorry. I'm Japanese)

@sevenc-nanashi sevenc-nanashi added the feature request This is a feature request. label Oct 17, 2020
@Vexs
Copy link
Contributor

Vexs commented Oct 17, 2020

This is pretty niche and would be best accomplished by writing your own decorator that wrapped the commands.command deco, ala

def mydeco(func):
    return commands.command(ignore_extra=False)(func)

@mydeco
async def mycommand...

Should work

@Rapptz
Copy link
Owner

Rapptz commented Oct 17, 2020

Commands can be created without a bot object at all so it's improbable to configure them in such a way currently without resorting to a merge trick upon the command object being added. If this feature were to be implemented it'd have to be using command_attrs=dict(ignore_extra=False) instead. I'm unsure how feasible this is though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This is a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants