mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-27 08:11:38 +00:00
Rearrange some code
This commit is contained in:
@ -288,14 +288,6 @@ class CommandSession(BaseSession):
|
|||||||
def is_first_run(self) -> bool:
|
def is_first_run(self) -> bool:
|
||||||
return self._last_interaction is None
|
return self._last_interaction is None
|
||||||
|
|
||||||
@property
|
|
||||||
def argv(self) -> List[str]:
|
|
||||||
"""
|
|
||||||
Shell-like argument list, similar to sys.argv.
|
|
||||||
Only available while shell_like is True in on_command decorator.
|
|
||||||
"""
|
|
||||||
return self.state.get('argv', [])
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_arg_text(self) -> str:
|
def current_arg_text(self) -> str:
|
||||||
"""
|
"""
|
||||||
@ -318,6 +310,14 @@ class CommandSession(BaseSession):
|
|||||||
]
|
]
|
||||||
return self._current_arg_images
|
return self._current_arg_images
|
||||||
|
|
||||||
|
@property
|
||||||
|
def argv(self) -> List[str]:
|
||||||
|
"""
|
||||||
|
Shell-like argument list, similar to sys.argv.
|
||||||
|
Only available while shell_like is True in on_command decorator.
|
||||||
|
"""
|
||||||
|
return self.state.get('argv', [])
|
||||||
|
|
||||||
def refresh(self, ctx: Context_T, *, current_arg: str = '') -> None:
|
def refresh(self, ctx: Context_T, *, current_arg: str = '') -> None:
|
||||||
"""
|
"""
|
||||||
Refill the session with a new message context.
|
Refill the session with a new message context.
|
||||||
|
Reference in New Issue
Block a user