diff options
| author | Stella <[email protected]> | 2021-04-23 14:24:09 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-23 02:24:09 -0400 |
| commit | 91c473db573c30005597e424aee742e4b9050dcb (patch) | |
| tree | 1be1f390d242a1b90952a3c582b6aa5aca658035 | |
| parent | [commands] Fix flag detection code in get_flags (diff) | |
| download | discord.py-91c473db573c30005597e424aee742e4b9050dcb.tar.xz discord.py-91c473db573c30005597e424aee742e4b9050dcb.zip | |
[commands] Fix _HelpCommandImpl.clean_params popitem
| -rw-r--r-- | discord/ext/commands/help.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 9b4dbf9a..4dd1e745 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -216,8 +216,8 @@ class _HelpCommandImpl(Command): def clean_params(self): result = self.params.copy() try: - result.popitem(last=False) - except Exception: + del result[next(iter(result))] + except StopIteration: raise ValueError('Missing context parameter') from None else: return result |