From 91c473db573c30005597e424aee742e4b9050dcb Mon Sep 17 00:00:00 2001 From: Stella <70153286+InterStella0@users.noreply.github.com> Date: Fri, 23 Apr 2021 14:24:09 +0800 Subject: [PATCH] [commands] Fix _HelpCommandImpl.clean_params popitem --- discord/ext/commands/help.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 9b4dbf9a6..4dd1e745e 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