Module graia.application.event.dispatcher
Expand source code
from graia.broadcast.entities.dispatcher import BaseDispatcher
from graia.broadcast.interfaces.dispatcher import DispatcherInterface
from graia.application.message.chain import MessageChain
class MessageChainCatcher(BaseDispatcher):
@staticmethod
async def catch(interface: "DispatcherInterface"):
if interface.annotation is MessageChain:
return interface.event.messageChain
Classes
class MessageChainCatcher
-
所有非单函数型 Dispatcher 的基类, 用于为参数解析提供可扩展的支持.
Expand source code
class MessageChainCatcher(BaseDispatcher): @staticmethod async def catch(interface: "DispatcherInterface"): if interface.annotation is MessageChain: return interface.event.messageChain
Ancestors
Inherited members