-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.py
34 lines (27 loc) · 963 Bytes
/
functions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from commanding import Phrase
from osu import recent, osudebug
from papergirl import paper, artist
functions = {
"recent": recent,
"osudebug": osudebug,
"paper": paper,
"artist": artist
}
commands = [
Phrase("help", ["help me"]),
Phrase("artist", ["artist", ["*img", "a"]]),
Phrase("paper", ["paper"]),
Phrase("paper", ["paper", ["~query", "a"]]),
Phrase("paper", ["paper", ["~query", "a"], "on", ["~platform", "a"]]),
Phrase("paper", ["paper", ["~query", "a"], "x", ["*number", "1"]]),
Phrase("paper", ["paper", ["~query", "a"], "x", ["*number", "1"], "on", ["~platform", "a"]]),
Phrase("recent", ["recent"]),
Phrase("recent", ["recent", ["~query", "a b c"], "-mode", ["~mode", "0"]]),
Phrase("recent", ["recent", ["~query", "a b c"]]),
Phrase("osudebug", ["osudebug"]),
]
regexes = {
"string": r"(?<=\").*?(?=\")",
"number": r"\-?[0-9]+(\.[0-9]+)?",
"img": r"\[qq:pic=(\S*)\]"
}