Attendance taking functionality for hubot. Coffeescript and hubot teachings gratefully taken from hubot-standup, amongst other places. At present, only tested on Slack (username handling is probably Slack-centric).
Create a room (or channel on IRC) for rollcall and invite hubot to the room if necessary.
You start the rollcall by telling hubot to start one and giving it a list of users who you would like to confirm are present. Usernames must begin with a '@' or rollcall will ignore them. Rollcall will also deduplicate the username list.
jbz: hubot rollcall start @jbz @ianw @zach @jbz
hubot: Starting a rollcall for the following attendees: @jbz @ianw @zach
Tell the robot you're here.
jbz: hubot here
hubot: @jbz is here! (1/3) are here!
You can stand in for an attendee by saying 'sub for ' or 'stand-in for '.
lolo: hubot sub for @zach
hubot: @lolo is standing in for @zach! (2/3) are here!
At any time, you can ask hubot who has not yet checked in.
jbz: hubot rollcall status
hubot: Rollcall in progress. Waiting for 1 of 3 participants - @ianw
When the last person (or stand-in) checks in, the rollcall will be announced complete.
ianw: hubot present
hubot: @ianw is here!
hubot: (3/3) present or accounted for!
hubot: Attendance check COMPLETED at 07/27 14:17
Each channel/room can only have one rollcall ongoing at a time. If you try to start another before completing/canceling the first, you'll get an error message:
ianw: hubot rollcall start @jbz @zach
hubot: There is already a rollcall in progress here! Cancel it first with 'hubot rollcall cancel'
MIT License