We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 721b260 commit af8c9c2Copy full SHA for af8c9c2
1 file changed
cloudbot/hook.py
@@ -1,12 +1,30 @@
1
import inspect
2
import re
3
import collections
4
+from enum import Enum, unique
5
6
from cloudbot.event import EventType
7
8
valid_command_re = re.compile(r"^\w+$")
9
10
11
+@unique
12
+class Priority(Enum):
13
+ LOWEST = -128
14
+ LOW = -64
15
+ NORMAL = 0
16
+ HIGH = 63
17
+ HIGHEST = 127
18
+
19
20
21
+class Action(Enum):
22
+ """Defines the action to take after executing a hook"""
23
+ HALTTYPE = 0 # Once this hook executes, no other hook of that type should run
24
+ HALTALL = 1 # Once this hook executes, No other hook should run
25
+ CONTINUE = 2 # Normal execution of all hooks
26
27
28
class _Hook:
29
"""
30
:type function: function
0 commit comments