From e9a780496f7ce067e0d8d51ce1d62e48c9f2a8d9 Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Thu, 19 Sep 2024 14:44:33 +0800 Subject: feat(core): Implement Service class and related functionalities Co-authored-by: yuzhe --- hrc/event.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'hrc/event.py') diff --git a/hrc/event.py b/hrc/event.py index afdb00c..961a356 100644 --- a/hrc/event.py +++ b/hrc/event.py @@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Any, Generic, Optional, Union from typing_extensions import Self from pydantic import BaseModel, ConfigDict -from .typing import RuleT +from hrc.typing import RuleT class Event(ABC, BaseModel, Generic[RuleT]): @@ -62,20 +62,6 @@ class MessageEvent(Event[RuleT], Generic[RuleT]): max_try_times: Optional[int] = None, timeout: Optional[Union[int, float]] = None, ) -> Self: - """Get the user's reply message. - - Equivalent to `get()` of ``Bot``, the condition is that the adapter, event type and sender are the same. - - Args: - max_try_times: Maximum number of events. - timeout: timeout period. - - Returns: - Message event that the user replies to. - - Raises: - GetEventTimeout: Maximum number of events exceeded or timeout. - """ return await self.rule.get( self.is_same_sender, -- cgit v1.2.3-70-g09d2