-
Notifications
You must be signed in to change notification settings - Fork 18
/
requirements_doc.txt
30 lines (27 loc) · 2.76 KB
/
requirements_doc.txt
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
DeltaBot Requirements Document
This is a list of DeltaBot's features. If you are confused about why a particular function or piece of code is necessary, check here to get an idea as to which feature implements. You should also check that new code works with DeltaBot's constraints.
Constraints:
1 - DeltaBot cannot store anything in a database, aside from the most recently scanned comments' ID.
2 - DeltaBot should make the fewest possible calls to PRAW while still doing its job.
3 - DeltaBot should be able to stop and restart later, using the most recently scanned comment to resume where it left off. If this does not work, start from the oldest comment. We cannot assume that it is running continuously.
Features:
1 - DeltaBot should periodically scan any new comments that have been made in its subreddit.
2 - If a comment contains a Delta Symbol, DeltaBot should award 1 point to the author of the comment's parent, unless:
2.1 - The parent is OP, DeltaBot or the awarder. WARNING: DeltaBot does not currently deal with self-awarding
2.2 - The commenter has already awarded a delta to this comment. WARNING: If DeltaBot finds replies it made that are not awarding it will delete them.
2.3 - The commenter has already awarded a delta to the parent's author at a higher point in the thread (but elsewhere in the comment tree or elsewhere in the submission's comment page are cool)
2.4 - The comment is shorter than [length]
3 - Awarding a delta to a user consists of:
3.1 - Adding 1 to the number in the user's flair or giving them a flair of "1" if they have no flair
3.2 - Checking if they have one of the top 10 scores this month. If so, update the high score chart in the sidebar to show this.
3.3 - If the user has their own wiki page, update it to show the correct number of deltas.
3.4 - If the user does not have a wiki page, create one with the correct number of deltas.
4 - DeltaBot should periodically scan its inbox to check for commands from mods.
4.1 - If there is a reply to one of DeltaBot's comments, and the reply is from the commenter DeltaBot responded to, DeltaBot will rescan the comment it replied to.
4.2 - If there is a message from a mod, it scans the message for commands
4.2.1 - If it receives the command "force add" it will perform a non-strict scan of the comment ids in the message body
4.2.2 - If it receives the command "add" it will perform a strict scan of the comment ids in the message body
4.2.3 - If it receives the command "remove" it will do nothing (TODO, fix this)
4.2.4 - If it receives the command "rescan" it will rescan the comment ids in the message body
4.2.5 - If it receives the command "reset" it will clear the before queue (unsure what this means)
4.2.6 - If it receives the command "stop" it will save the ID of its most recently scanned comment and terminate