]> code.communitydata.science - coldcallbot-discord.git/blob - README
Merge branch 'master' of code.communitydata.science:coldcallbot-discord
[coldcallbot-discord.git] / README
1 Setting up the Discord Bot
2 ======================================
3
4 I run the Discord bot from my laptop. It requires the discord Python
5 module available in PyPi and installable like:
6
7     $ pip3 install discord
8
9 Setting up the Bot
10 =====================================
11
12 The documentation for the `discord` python package
13 (https://discordpy.readthedocs.io/en/latest/discord.html) does a good
14 job explaining how to set up a Discord bot with your server. Follow
15 the steps there, with one important exception:
16
17 1. On the "Bot" tab in the discord application configuration page you
18 need to enable both "Privileged Gateway Intents."  This allows the bot
19 to see who is present and active in the channel.
20
21 Finally, you need to copy your bot'ss Token (also found on the "Bot" tab)
22 into coldcallbot.py. Pass it as the argument to `ccb.run()`.
23
24
25
26 Using the Cold Call Bot
27 ======================================
28
29 1. All students must have the role "Student" in Discord. If they do
30    not have the roll, they will not be called upon.
31
32 2. The "classroom" is the "Classroom Voice" channel. This is currently
33    hard coded.
34
35 3. The bot has only one command: "$next" which calls a person and
36    records this information in the logs. You can run this command in
37    any channel that the bot has access to (e.g., #bot-commands) but I
38    do it a public channel called "#classroom-questions" so that
39    students can watch it operate.
40
41
42 Daily Process
43 ======================================
44
45 You need to start the bot from the laptop each day. I do that by:
46
47   $ ./coldcallbot.py
48
49 The bot will run in the terminal, print out data as it works including
50 detailed weights as it goes, and it will record data into files in the
51 /data/ directory.
52
53
54 After class, you will have two new files created that will be named
55 like this (with today's date):
56
57     attendance-2020-10-05.tsv
58     call_list-2020-10-05.tsv
59
60 Each day, you need to open up "call_list-YYYY-MM-DD.tsv" and edit the
61 final two columns. The first columns `answered` means that the person
62 responded and answered the question (i.e., they were present in the
63 room but away from their computer and unresponsive). This is almost
64 always TRUE but would be FALSE if the student were missing.
65
66 The final column `assessment` is GOOD, FAIR, or BAD in my rubric. I've
67 detailed what that means on this page:
68
69 https://wiki.communitydata.science/User:Benjamin_Mako_Hill/Assessment#Rubric_for_case_discussion_answers
70
71 I take notes on student answers on paper during class (typically I
72 only note down non "GOOD" answers) and then add these to the sheet
73 immediately after class.
74
75 I keep my entire data directory in git and I'd recommend that you do
76 too.
77
78 I don't expect that these will necessary work without
79 modification. It's a good idea to go line-by-line through these to
80 make sure they are doing what *you* want and that you agree with the
81 assessment logic built into this.
82
83 Assessment and Tracking
84 ======================================
85
86 These scripts rely on a file in this repository called
87 `data/student_information.csv` which I have set to be downloaded
88 automatically from a Google form using a 1-line wget command.
89
90 For reference, that file has the following column labels (this is the
91 full header, in order):
92
93     Timestamp
94     Your UW student number
95     Name you'd like to go by in class
96     Your Wikipedia username
97     Your username on the class Discord server
98     Preferred pronouns
99     Anything else you'd like me to know?
100
101 The scripts in this directory are meant to be run or sourced *from*
102 the data directory. As in:
103
104     $ cd ../data
105     $ R --no-save < ../assessment_and_tracking/track_participation.R
106
107 There are three files in that directory:
108
109 track_enrolled.R:
110
111     This file keeps track of who is in Discord, who is enrolled for
112     the class, etc. This helps me remove people from the
113     student_informaiton.csv spreadsheet who are have dropped the
114     class, deal with users who change their Discord name, and other
115     things that the scripts can't deal with automatically.
116
117     This all need to be dealt with manually, one way or
118     another. Sometimes by modifying the script, sometimes by modifying
119     the files in the data/ directory.
120
121     This requires an additional file called
122     `myuw-COM_482_A_autumn_2020_students.csv` which is just the saved
123     CSV from https://my.uw.edu which includes the full class list. I
124     download this one manually.
125
126 track_participation.R:
127
128     This file generates histograms and other basic information about
129     the distribution of participation and absences. I've typically run
130     this weekly after a few weeks of the class and share these images
131     with students at least once or twice in the quarter.
132
133     This file is also sourced by compute_final_case_grades.R.
134
135 compute_final_case_grades.R:
136
137     You can find a narrative summary of my assessment process here:
138
139     https://wiki.communitydata.science/User:Benjamin_Mako_Hill/Assessment#Overall_case_discussion_grade
140
141     This also requires the registration file (something like
142     `myuw-COM_482_A_autumn_2020_students.csv`) which is described
143     above.
144
145     To run this script, you will need to create the following subdirectories:
146
147     data/case_grades
148     data/case_grades/student_reports
149
150
151 One final note: A bunch of things in these scripts assumes a UW 4.0
152 grade scale. I don't think it should be hard to map these onto some
153 other scale, but that's an exercise I'll leave up to those that want
154 to do this.

Community Data Science Collective || Want to submit a patch?