Skip to content

Commit c082323

Browse files
Amrou BellalounaAmrou Bellalouna
authored andcommitted
add collection of keywords per rule
In reference to issue #2108, this commit aims to add an initial set of keywords per rule. These keywords will be later in the "rule" bot command in order to make rule identification easier
1 parent fa2a41e commit c082323

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

pydis_site/apps/api/views.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,35 +124,44 @@ def get(self, request, format=None): # noqa: D102,ANN001,ANN201
124124

125125
return Response([
126126
(
127-
f"Follow the {pydis_coc}."
127+
f"Follow the {pydis_coc}.",
128+
{"coc", "conduct", "code"}
128129
),
129130
(
130-
f"Follow the {discord_community_guidelines} and {discord_tos}."
131+
f"Follow the {discord_community_guidelines} and {discord_tos}.",
132+
{"guidelines", "discord_tos"}
131133
),
132134
(
133-
"Respect staff members and listen to their instructions."
135+
"Respect staff members and listen to their instructions.",
136+
{"staff", "instructions"}
134137
),
135138
(
136139
"Use English to the best of your ability. "
137-
"Be polite if someone speaks English imperfectly."
140+
"Be polite if someone speaks English imperfectly.",
141+
{"english", "language"}
138142
),
139143
(
140144
"Do not provide or request help on projects that may break laws, "
141-
"breach terms of services, or are malicious or inappropriate."
145+
"breach terms of services, or are malicious or inappropriate.",
146+
{"infraction", "tos", "breach", "malicious", "inappropriate"}
142147
),
143148
(
144-
"Do not post unapproved advertising."
149+
"Do not post unapproved advertising.",
150+
{"ads", "advertising"}
145151
),
146152
(
147153
"Keep discussions relevant to the channel topic. "
148-
"Each channel's description tells you the topic."
154+
"Each channel's description tells you the topic.",
155+
{"off-topic", "topic", "relevance"}
149156
),
150157
(
151158
"Do not help with ongoing exams. When helping with homework, "
152-
"help people learn how to do the assignment without doing it for them."
159+
"help people learn how to do the assignment without doing it for them.",
160+
{"exams", "assignment", "assignments", "homework"}
153161
),
154162
(
155-
"Do not offer or ask for paid work of any kind."
163+
"Do not offer or ask for paid work of any kind.",
164+
{"work", "money"}
156165
),
157166
])
158167

0 commit comments

Comments
 (0)