dthiendoan / liche-bot

Based on hubot for hipchat
5 stars 4 forks source link

Gossip Haiku Feature #1

Open Ryxias opened 7 years ago

Ryxias commented 7 years ago

Feature Request

Summary

We want an enhancement to the current !gossip feature. Because it might be funny.

User Story

As an end user of bottington I expect to be able to type a new !gossip haiku command. After typing it, I expect bottington to respond with three consecutive, random gossip lines, separated by newlines, with no duplicates.

Sample behavior

User: !gossip haiku
Bottington: 
the cat can't into
because douche de lapin
You make me WET

Current (Undesirable user experience)

User: !gossip
Bottington: the cat can't into
User: !gossip
Bottington: because douche de lapin
User: !gossip
Bottington: You make me WET

Corner Case: Database has fewer than 3 Gossip entries

It is impossible to satisfy the requirements of the above when the database has fewer than 3 entries. In this case, simply output "Refrigerator" to replace the entries that cannot be satisfied:

Case 1: Zero entries

!gossip

Bottington:
Why are you haiku?
Purple fried water okay
Refrigerator

Case 2: One entry

!gossip

Bottington:
Why are you haiku?
<GOSSIP>
Refrigerator

Case 3: Two entires

!gossip

Bottington:
<GOSSIP>
<GOSSIP>
Refrigerator

Assumption: !gossip add and other related features already exist

We assume (and re-use) the implementation of such commands as !gossip add and other gossip-curating commands.

dthiendoan commented 7 years ago

What should be the exact behavior when the number of existing comments < 3 ?

Ryxias commented 7 years ago

Perhaps the command simply fails? Or since it's a haiku, just make make it barf "refrigerator" a bunch hah

Ryxias commented 7 years ago

Updated with the corner cases