diff options
| author | 2024-09-19 14:44:33 +0800 | |
|---|---|---|
| committer | 2024-09-19 14:44:33 +0800 | |
| commit | e9a780496f7ce067e0d8d51ce1d62e48c9f2a8d9 (patch) | |
| tree | a3e31e07fd001baa1cfce9ceebcdfed58b50bcda /hrc/event.py | |
| parent | 9e18d7ebf7a17bb7d7d169da3a3cefde0956a9f9 (diff) | |
| download | HydroRollCore-e9a780496f7ce067e0d8d51ce1d62e48c9f2a8d9.tar.gz HydroRollCore-e9a780496f7ce067e0d8d51ce1d62e48c9f2a8d9.zip | |
feat(core): Implement Service class and related functionalities
Co-authored-by: yuzhe <YUZHEthefool@users.noreply.github.com>
Diffstat (limited to 'hrc/event.py')
| -rw-r--r-- | hrc/event.py | 16 |
1 files changed, 1 insertions, 15 deletions
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, |
