mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 05:16:48 +08:00
Rearrange some code
This commit is contained in:
parent
d88eda7c66
commit
78d48fb163
@ -288,14 +288,6 @@ class CommandSession(BaseSession):
|
||||
def is_first_run(self) -> bool:
|
||||
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
|
||||
def current_arg_text(self) -> str:
|
||||
"""
|
||||
@ -318,6 +310,14 @@ class CommandSession(BaseSession):
|
||||
]
|
||||
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:
|
||||
"""
|
||||
Refill the session with a new message context.
|
||||
|
Loading…
Reference in New Issue
Block a user