Sealed Bidding Bot

We like to use this for auctions but the idea is fairly general: Someone in the channel announces something they want input on and names the participants. Everyone then responds without their responses showing up in the channel. When the last person has responded, all the responses are revealed.

You could use it to get independent estimates of how long something will take to implement. Or just use it to play Schelling’s coordination game. [1]

Here’s a slightly more technical description:

One person initiates an auction by @-mentioning the participants in a slash command. Then the bot privately gets everyone’s bids (which can be arbitrary strings).

Anyone can repeat the slash command with no args for the status, which is announced publicly, eg, “got bids from {@alice}, still waiting on {@bob, @carol}”. That can serve to remind stragglers to add their bids.

Since Slack bots can whisper replies to slash commands, DMs aren’t needed. Everyone can just do the slash command in the channel to place their bids.

Finally, when the last @-mentioned user submits a bid, the auction is done and the bot posts everyone’s latest bid to the channel. (And for good measure — namely, dreeves’s and bee’s craziness —  it flips a biased coin and reports whether 10X payments should happen.)


 

Footnotes

[1] Apparently this isn’t a very googlable thing. It’s where someone names a category like “books” or “colors” or “famous historical figures” or “places” or “integers” or any crazy set you can imagine, and then everyone writes down the most focal element of the category. You get a point for each other person who wrote down the same thing as you. It’s fun.


 

 

Original spec, from which we diverged a bit

If you do “/bid” followed by a string with at least one person @-mentioned, that means start a new auction with those participants. We call the string after “/bid” the urtext and repeat it when giving results or the status of the auction. You can say “/bid” without any arguments to get the status of the current auction. The auction ends automatically when the last person responds but if you want to end early, say “/bid ABORT”. If you say “/bid” followed by anything else (not “ABORT”, no @-mentions) then that’s your bid. People who weren’t @-mentioned can add bids too, they just get added to the list as if they’d been @-mentioned at the start. Finally, you can replace your bid with a new one at any time if the auction hasn’t ended.

To spell that out, here are all the possible types of commands, and whether they happen when an auction is active or not. (Shouting means the bot replies publicly in the channel; whispering means only the person who typed the slash command sees it. Also, iff the bot replies by whispering then the slash command that the user typed isn’t visible to others either.)

command            auc?  action
-----------------  ----  ---------------------------
/bid stuff_with_@  NO    set auc = true; shout $STAT
/bid               NO    whisper $NOSTAT
/bid stuff         NO    whisper $NOSTAT
/bid ABORT         NO    shout $NOABRT [or whisper, whatever]
/bid stuff_with_@  YES   whisper $NOATS
/bid               YES   shout $STAT
/bid stuff         YES   set user's bid = stuff; whisper $STAT
/bid ABORT         YES   set auc = false; shout $ABORT

$NOATS  = "No @-mentions allowed in bids! 
           Do '/bid ABORT' to abort current auction or '/bid' to check status."
$NOSTAT = "No current auction! @-mention people to start one."
$STAT   = "Got bids from {...}, still waiting on {...}"
$NOABRT = "No current auction!"
$ABORT  = "[list bids so far]\nABORTED."

Technical note for Slack: you can whisper a response to a slash command by not specifying “in_channel”.

Then all that’s left is spitting out the bids when the last person’s bid is received. By default with Slack bots, if they’re whispering a response then the slash command is not echoed; if shouting then it is. So it’s sort of weird how the last person’s bid is echoed before the results are announced but hopefully not too confusing.

Original implementation

Here’s how @aaronpk implemented it (with contributions from @dreev): https://github.com/aaronpk/zenircbot-bid


 

SCRATCH AREA

Maybe it’s too magical to use @-mentions as the trigger for starting an auction? I think it’s ok though. Because it makes sense to disallow @-mentions in an actual bid since that’s confusing. If you’re @-mentioning someone then you expect them to see it, but they can’t if it’s part of your bid, so just disallow that. And no such thing as starting an auction without saying who it’s with.

Basically it’s a little magical but it’s super streamlined for the common case of “/bid with @bee for putting kids to bed” and then both people say “/bid $X” and the results immediately appear. No syntax to remember other than “/bid” itself.

What about starting an auction with “@here” or “@channel”? Might be cool for the bot to expand those into the full list of users. It should probably at least fail gracefully in the meantime if someone tries that. I guess without handling that case you’d just have to abort the auction.