Created
November 29, 2012 19:18
-
-
Save matthewsimo/4171215 to your computer and use it in GitHub Desktop.
Insults script for hubot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Allow Hubot to give a burn Shakespeare would approve of. | |
| # | |
| # Commands: | |
| # insult <name> - Don't have a good comeback, ask for some backup.(name parameter optional) | |
| data = [["artless","bawdy","beslubbering","bootless","churlish","cockered","clouted","craven","currish","dankish","dissembling","droning","errant","fawning","fobbing","froward","frothy","gleeking","goatish","gorbellied","impertinent","infectious","jarring","loggerheaded","lumpish","mammering","mangled","mewling","paunchy","pribbling","puking","puny","qualling","rank","reeky","roguish","ruttish","saucy","spleeny","spongy","surly","tottering","unmuzzled","vain","venomed","villainous","warped","wayward","weedy","yeasty","cullionly","fusty","caluminous","wimpled","burly-boned","misbegotten","odiferous","poisonous","fishified"],["tardy-gaited","rampallian","beef-witted","dizzy-eyed","fool-born","scurvy-valiant","brazen-faced","muddy-mettled","beetle-headed","boil-brained","clapper-clawed","folly-fallen","base-court","full-gorged","flap-mouthed","motley-minded","clay-brained","spur-galled","Basket-Cockle","half-faced","hedge-born","ill-nurtured","shard-borne","sheep-biting","whoreson","unwash'd","bunch-back'd","leaden-footed","crook-pated","dismal-dreaming","doghearted","earth-vexing","elf-skinned","fat-kidneyed","fly-bitten","guts-griping","hasty-witted","hell-hated","idle-headed","ill-breeding","pottle-deep","pox-marked","rough-hewn","swag-bellied","toad-spotted","lily-livered","common-kissing","dread-bolted","fen-sucked","knotty-pated","rude-growing","tickle-brained","weather-bitten","bat-fowling","plume-plucked","reeling-ripe","rump-fed","unchin-snouted","malmsey-nosed","Wart-necked"],["apple-john","baggage","barnacle","bladder","boar-pig","bugbear","bum-bailey","canker-blossom","clack-dish","clotpole","coxcomb","codpiece","death-token","dewberry","flap-dragon","flax-wench","flirt-gill","fustilarian","foot-licker","giglet","gudgeon","haggard","harpy","hedge-pig","joithead","lewdster","lout","maggot-pie","horn-beast","hugger-mugger","mammet","malt-worm","measle","pignut","miscreant","moldwarp","mumble-news","nut-hook","pigeon-egg","pumpion","ratsbane","skainsmate","strumpet","varlot","vassal","whey-face","wagtail","knave","popinjay","blind-worm","scullian","malcontent","devil-monk","toad","rascal","jolt-head"]] | |
| randomItem = (x) -> | |
| data[x][Math.floor((Math.random() * data[x].length)+1)] | |
| calculateInsult = (person) -> | |
| person = person || "" | |
| i0 = randomItem(0) | |
| i1 = randomItem(1) | |
| i2 = randomItem(2) | |
| "#{person}, thou art a #{i0} #{i1} #{i2}." | |
| module.exports = (robot) -> | |
| robot.respond /(insult)(\s*)?(.*)?/i, (msg) -> | |
| person = msg.match[3] || msg.message.user.name | |
| msg.send calculateInsult(person) |
Author
Author
Oops! Linked Brian's twitter handle, he's @inspectorfegter on github, fyi!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hat tip to Lance's inspirational tweet - http://mas.im/LEiw & to Brian (@misternifty) for formatting the data into json w/o even being asked!