var menu = new Array('The Current Menu at @smallplatesnq looks like this', 'BUTTERMILK FRIED CHICKEN w/ roasted peanut sauce\n\n CRISPY PORK CHEEK w/ smoked bacon sauce & Rekordelig mayo', 'LAMB MEATBALLS w/ tomato sauce\n\n BREADED WHITEBAIT w/ cockle ‘popcorn’, Rekorderlig mayo', 'COD CHEEK IN BEER BATTER w/ mushy peas\n\n MINI SQUID BURGERS w/ lettuce and onion', 'MARIS PIPER MASH CAKES w/ cucumber ketchup, smoked salt\n\n YORKSHIRE PUDDINGS w/ whipped blue cheese, chilli jam', 'ASPARAGUS SPEARS w/ fondue', '====== Sides (£3.00) ======', 'TRIPLE COOKED CHIPS w/ served with ketchup and mayo\n\n ONION RINGS w/ fried in beer batter', 'PORK SCRATCHINGS w/ five spice, salt and pepper');
The bot replies with the menu via direct messages to the requesting user. This stops the main feed from getting cloged up and annoying other followers who wouldn't want to see 6/7 identical tweets ever hour or so when a customer makes the menu request. However if the requesting user does not have the correct following/followed set up with the smallplates account then the messages will fail and there is no feedback mechanism for this. In the future i would like to provide a feedback tweet to the user and some auto following fixes to get round as much of this as possible.
Last but by no means least, the activity of the bot is, for the large part, un-monitored. Some reporting / logging abilities would be good so that the owner of the smallplates account could find out stats on who's been asking for
info and how many times etc etc
Bots like this are nothing new. In fact to begin with i started goggling for a pre-coded one that i could spin up on heroku or another server and just get cracking with right away. There didn't seem to be anything out there. This seems odd to me as there must be thousands of support orientated twitter accounts that i would expect to have "canned" responses for simple queries. If i get time i will try to imporve this to the point where it can track multiple user/word combinations and then promote it as a possibility for support or even just general interaction for companies social interaction.