Add comments

This commit is contained in:
Richard Chien 2018-08-22 23:00:22 +08:00
parent 39b04b880a
commit 8d7f06fdde

View File

@ -45,7 +45,12 @@ class RequestSession(BaseSession):
def __init__(self, bot: NoneBot, ctx: Dict[str, Any]): def __init__(self, bot: NoneBot, ctx: Dict[str, Any]):
super().__init__(bot, ctx) super().__init__(bot, ctx)
async def approve(self, remark: str = ''): async def approve(self, remark: str = '') -> None:
"""
Approve the request.
:param remark: remark of friend (only works in friend request)
"""
try: try:
await self.bot.call_action( await self.bot.call_action(
action='.handle_quick_operation_async', action='.handle_quick_operation_async',
@ -56,7 +61,12 @@ class RequestSession(BaseSession):
except CQHttpError: except CQHttpError:
pass pass
async def reject(self, reason: str = ''): async def reject(self, reason: str = '') -> None:
"""
Reject the request.
:param reason: reason to reject (only works in group request)
"""
try: try:
await self.bot.call_action( await self.bot.call_action(
action='.handle_quick_operation_async', action='.handle_quick_operation_async',