mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 16:21:28 +00:00
Add type hints for config items
This commit is contained in:
@ -247,7 +247,8 @@ class CommandSession(BaseSession):
|
||||
@property
|
||||
def is_valid(self) -> bool:
|
||||
"""Check if the session is expired or not."""
|
||||
if self._last_interaction and \
|
||||
if self.bot.config.SESSION_EXPIRE_TIMEOUT and \
|
||||
self._last_interaction and \
|
||||
datetime.now() - self._last_interaction > \
|
||||
self.bot.config.SESSION_EXPIRE_TIMEOUT:
|
||||
return False
|
||||
|
Reference in New Issue
Block a user