nonebot.notice_request
class NoticeSession(bot, event)
说明
继承自
BaseSession类,表示通知类事件的 Session。参数
bot(NoneBot)event(aiocqhttp.event.Event)
class RequestSession(bot, event)
说明
继承自
BaseSession类,表示请求类事件的 Session。参数
bot(NoneBot)event(aiocqhttp.event.Event)
async method approve(self, remark='')
说明
同意当前请求。
参数
remark(str): 好友备注,只在好友请求时有效
返回
- None
异常
CQHttpError: 发送失败时抛出,实际由 [aiocqhttp] 抛出,等价于aiocqhttp.Error
用法
await session.approve()1
async method reject(self, reason='')
说明
拒绝当前请求。
参数
reason(str): 拒绝理由,只在群请求时有效
返回
- None
异常
CQHttpError: 发送失败时抛出,实际由 [aiocqhttp] 抛出,等价于aiocqhttp.Error
用法
await session.reject()1