diff --git a/slixmpp/plugins/xep_0050/adhoc.py b/slixmpp/plugins/xep_0050/adhoc.py index 072ec5aa..b101056e 100644 --- a/slixmpp/plugins/xep_0050/adhoc.py +++ b/slixmpp/plugins/xep_0050/adhoc.py @@ -620,6 +620,8 @@ class XEP_0050(BasePlugin): async def _await_if_needed(handler, *args): + if handler is None: + raise XMPPError("bad-request", text="The command is completed") if asyncio.iscoroutinefunction(handler): log.debug(f"%s is async", handler) return await handler(*args)