Improve code docs

This commit is contained in:
Richard Chien
2018-07-01 20:01:05 +08:00
parent 6ec3ac66f7
commit 026d83e507
9 changed files with 100 additions and 39 deletions

View File

@ -15,10 +15,16 @@ class BaseSession:
async def send(self,
message: Union[str, Dict[str, Any], List[Dict[str, Any]]],
*, ignore_failure: bool = True) -> None:
"""
Send a message ignoring failure by default.
"""
return await send(self.bot, self.ctx, message,
ignore_failure=ignore_failure)
async def send_expr(self,
expr: Union[str, Sequence[str], Callable],
**kwargs):
"""
Sending a expression message ignoring failure by default.
"""
return await send_expr(self.bot, self.ctx, expr, **kwargs)