mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-07-17 03:20:54 +00:00
change rule and event handle
This commit is contained in:
@ -2,6 +2,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
class IgnoredException(Exception):
|
||||
"""
|
||||
Raised by event_preprocessor indicating that
|
||||
the bot should ignore the event
|
||||
"""
|
||||
|
||||
def __init__(self, reason):
|
||||
"""
|
||||
:param reason: reason to ignore the event
|
||||
"""
|
||||
self.reason = reason
|
||||
|
||||
|
||||
class PausedException(Exception):
|
||||
"""Block a message from further handling and try to receive a new message"""
|
||||
pass
|
||||
|
Reference in New Issue
Block a user