From 6643784d3354d42408d08c11ed52215d7ac60ef2 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 5 Jul 2024 15:11:35 -0400 Subject: [PATCH] [commands] Clarify Converter.convert exception raising --- discord/ext/commands/converter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 830c58662bc4..6c559009dbae 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -126,6 +126,10 @@ async def convert(self, ctx: Context[BotT], argument: str) -> T_co: raise a :exc:`.CommandError` derived exception as it will properly propagate to the error handlers. + Note that if this method is called manually, :exc:`Exception` + should be caught to handle the cases where a subclass does + not explicitly inherit from :exc:`.CommandError`. + Parameters ----------- ctx: :class:`.Context`