forked from nonamenix/spb_python_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.py
More file actions
66 lines (58 loc) · 1.63 KB
/
content.py
File metadata and controls
66 lines (58 loc) · 1.63 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
chat_rules_header = """
*The Zen of SPb Python Chat*
_(Inspired by "The Zen of Python, by Tim Peters")_
"""
rule_not_found = """
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name '{}'
"""
rules = [
[
["hi", "hello", "intro"], # from this import hi
['Short introduction of yourself is better than "hello".'],
],
[
["gist", "source"], # from this import gist
["Link to gist is better than source paste."],
],
[
["spam", "long_better"], # from this import long_message
["One long message is better than many short."],
],
[
["edit", "correct"], # from this import correct
["Editing the message is better than correcting via another one."],
],
[
["topic", "offtopic"], # from this import offtopic
[
"Staying on topic is better than offtopic.",
"Good topic is worth discussing though.",
"Unless it is started by a link to Habrahabr.",
],
],
[[], ["Politeness counts."]], # from this import politeness
[
[], # from this import bad_mood
["Bad mood is not a good reason to break the rules."],
],
[["ask"], ["Don't ask to ask just ask."]], # from this import ask
[
[], # from this import voice
[
"Text message is better than voice message.",
"Unless it is voice conference.",
],
],
[[], ["Git repos are one honking great idea — let's do more of those!"]],
]
help_test = """
Help on module this:
*NAME*
this
*EXAMPLES*
```
{examples}
```
"""