Add some customizations and fun things.
This commit is contained in:
42
scripts/alcohol.coffee
Normal file
42
scripts/alcohol.coffee
Normal file
@@ -0,0 +1,42 @@
|
||||
# Description:
|
||||
# Needing a drink. Fast.
|
||||
#
|
||||
# Commands:
|
||||
# hubot alcohol - fetch a drink
|
||||
# hubot ALCOHOL - fetch three drinks
|
||||
# hubot ALCOHOL! - fetch a random number of drinks
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.respond /(alcohol|ALCOHOL)(!)?$/i, (msg) ->
|
||||
thebar = [
|
||||
"Beer",
|
||||
"Cider",
|
||||
"Sake",
|
||||
"Port",
|
||||
"Champagne",
|
||||
"Table wine",
|
||||
"Sangria",
|
||||
"Vermouth",
|
||||
"Sherry",
|
||||
"Absinthe",
|
||||
"Gin",
|
||||
"Rum",
|
||||
"Cava",
|
||||
"Vodka",
|
||||
"Tequila",
|
||||
"White wine",
|
||||
"Red wine",
|
||||
"Rosé wine",
|
||||
"Whisky",
|
||||
"Cognac"
|
||||
]
|
||||
|
||||
drinks = 1
|
||||
if msg.match[1] == 'alcohol'
|
||||
else
|
||||
if msg.match[2]
|
||||
drinks = Math.floor(Math.random() * 6) + 4
|
||||
else
|
||||
drinks = 3
|
||||
servings = ((msg.random thebar) for x in [1..drinks])
|
||||
msg.send servings
|
||||
9
scripts/custom.coffee
Normal file
9
scripts/custom.coffee
Normal file
@@ -0,0 +1,9 @@
|
||||
# Description:
|
||||
# Personalizations and stuff.
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.respond /[iI] love you/, (msg) ->
|
||||
msg.send "I love you too, #{msg.envelope.user.real_name}!"
|
||||
|
||||
robot.respond /say bye/, (msg) ->
|
||||
msg.send "Goodbye, cruel world!"
|
||||
24
scripts/dilbert.coffee
Normal file
24
scripts/dilbert.coffee
Normal file
@@ -0,0 +1,24 @@
|
||||
# Description:
|
||||
# Retrieve Dilbert comics for entertainment but not profit
|
||||
#
|
||||
# Commands:
|
||||
# hubot dilbert me [YYYY-MM-DD] - retrieves Dilbert comic, defaults to today's
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.hear /dilbert me\.? ?(.*)?/i, (msg) ->
|
||||
url = 'https://dilbert.com'
|
||||
if msg.match[1]?
|
||||
comicDateRegexp = /\d\d\d\d-?\d\d-?\d\d/
|
||||
if not comicDateRegexp.exec(msg.match[1])?
|
||||
msg.send("I do not understand '#{msg.match[1]}' as a date.")
|
||||
return
|
||||
url = "#{url}/strip/#{msg.match[1]}"
|
||||
msg.http(url)
|
||||
.get() (err, res, body) ->
|
||||
if err
|
||||
msg.send "Sorry, I can't do that."
|
||||
return
|
||||
rx1 = /img-responsive.*>/
|
||||
rx2 = /\/\/[^"]*/
|
||||
img = rx2.exec(rx1.exec(body)).toString()
|
||||
msg.send("https:#{img}.png")
|
||||
136
scripts/poetry.coffee
Normal file
136
scripts/poetry.coffee
Normal file
@@ -0,0 +1,136 @@
|
||||
# Description:
|
||||
# Poems and whimsical retorts
|
||||
#
|
||||
# Commands:
|
||||
# hubot read me a poem - reads a random poem from the hit game Interstate 76
|
||||
|
||||
poetry = [ """
|
||||
Looking out the window of your room onto a wet rainy day
|
||||
Main street under a slate gray afternoon sky
|
||||
The light on your face is soft and dim under the lace curtain
|
||||
And the streets are empty
|
||||
In the distance, there is a flash and a rumble
|
||||
Clouds sail the sky like giant wooden ships
|
||||
On a blackened evergreen sea
|
||||
Capped with foam
|
||||
""",
|
||||
"""
|
||||
I'm a storm torrent across a slate-gray sea
|
||||
I rush in billowed reflections a fast, fast dark sky over an Edinburgh's meadow's wet
|
||||
I bolt white high through snowfall cold
|
||||
I am lightning in the night
|
||||
I sprint like fire across a match head
|
||||
And leap across lakes of dream-stuff
|
||||
Over ancient walls
|
||||
Past armies fast as fast is
|
||||
Faster than quicksilver can fall into the sun
|
||||
I, bounding, prance unstoppable to you
|
||||
My all
|
||||
My everything dream
|
||||
""",
|
||||
"""
|
||||
It's a high pitched sound
|
||||
Hot rubber eternally pressing against a blackened pavement
|
||||
A wheel is forever
|
||||
A car is infinity times four
|
||||
""",
|
||||
"""
|
||||
From where I lie
|
||||
The oceans are deep and dry
|
||||
Empty
|
||||
The sky is black smoke bearing winter's frozen gifts
|
||||
It will snow in this land for a thousand years
|
||||
And I will sleep under it...forever
|
||||
""",
|
||||
"""
|
||||
My dream
|
||||
It takes place in the white room, in back
|
||||
The plaster walls echo sounds
|
||||
The brown wood floor is cold and solid beneath my brown, bare feet
|
||||
This place was a nursery before
|
||||
Now it is empty
|
||||
Save for the hollow sound of my voice
|
||||
""",
|
||||
"""
|
||||
This window above the Charles
|
||||
Wire embedded in cold frames the world
|
||||
Across white space to the frozen shore
|
||||
I see through curls and eddies of falling snow
|
||||
The once green field
|
||||
And a birthday on the grass
|
||||
A party for three in the Boston sun
|
||||
All now covered with snow
|
||||
""",
|
||||
"""
|
||||
Copley brought me to a monument
|
||||
Quiet before the crunch of solitary footfall through ice
|
||||
An obelisk stands in the winter city
|
||||
Its relief tells of a death and justification
|
||||
The precipitation of war
|
||||
And my own memories
|
||||
""",
|
||||
"""
|
||||
I'm silver smooth
|
||||
Bathed ten times a second in an aerosol fire
|
||||
Five thousand degrees in here
|
||||
I course with electricity from my feet to my tongue
|
||||
Where I vomit a torque-delivering spark
|
||||
""",
|
||||
"""
|
||||
It's nicked at the edges
|
||||
And leans backwards, almost reclining
|
||||
Grass grows in tufts near where it enters the earth
|
||||
Its words are worn with time
|
||||
And its stained face is drawn long with wear
|
||||
""",
|
||||
"""
|
||||
It's malleable, my design
|
||||
Things just bolt on here and there
|
||||
Real clean scraped face
|
||||
A new gasket fitted and...
|
||||
Tightened and...
|
||||
I'm done.
|
||||
""",
|
||||
"""
|
||||
She's my girl
|
||||
Pearl white, slick and sexy
|
||||
Never complains, always faithful
|
||||
She cuts the air like a charging buffalo
|
||||
In her arms, it's quiet
|
||||
Her engine whispers to me:
|
||||
"It's gonna be just fine"
|
||||
""",
|
||||
"""
|
||||
They twist like quad-coiled vipers
|
||||
Feeding on combustion's waste
|
||||
Black as ink and hot as Hades they join below
|
||||
Eternally in shadow, unless of course, I roll
|
||||
They belt a rumbling and vibrate fear
|
||||
Into the bones of my foe
|
||||
""",
|
||||
"""
|
||||
It's not a happy place, between the dusk and the dawn
|
||||
Deep below the well-lit and open spaces
|
||||
I wait under the under
|
||||
For them to come and rip me asunder
|
||||
Tearing my core until morning
|
||||
""",
|
||||
"""
|
||||
Glass, flat and forever
|
||||
It stretches out and never stops
|
||||
Unless it finds the hills whose lines rise to mountain peaks
|
||||
Far as far can be
|
||||
""",
|
||||
"""
|
||||
There is a breeze out here
|
||||
That filters through the scrub
|
||||
Over hills and down through long dry riverbeds
|
||||
Across the Texas blacktop
|
||||
It cools the skin and brings the most subtle song in the world
|
||||
To the ears of those who listen
|
||||
"""
|
||||
]
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.respond /(read me)|(how a?bout) a poem/, (msg) ->
|
||||
msg.send msg.random poetry
|
||||
28
scripts/pourhard.coffee
Normal file
28
scripts/pourhard.coffee
Normal file
@@ -0,0 +1,28 @@
|
||||
# Description:
|
||||
# None
|
||||
#
|
||||
# Dependencies:
|
||||
# None
|
||||
#
|
||||
# Configuration:
|
||||
# None
|
||||
#
|
||||
# Commands:
|
||||
# hubot pour hard - Grab me a specific beer
|
||||
#
|
||||
# Author:
|
||||
# John Sullivan
|
||||
|
||||
nitros = [
|
||||
"https://www.premiergourmet.com/media/catalog/product/cache/1/image/300x261/9df78eab33525d08d6e5fb8d27136e95/m/i/milk_stout_nitro_bottle_and_glass_795556920.png"
|
||||
"https://i.ytimg.com/vi/dY-ti2-bBG0/hqdefault.jpg"
|
||||
"http://archive.boston.com/lifestyle/food/blogs/99bottles/milk%20stout%20nitro%20005.jpg"
|
||||
"https://i.pinimg.com/originals/25/ac/b8/25acb809605474e5159d80901efcfcee.jpg"
|
||||
"https://ewscripps.brightspotcdn.com/dims4/default/4ea7cda/2147483647/strip/true/crop/640x360+0+33/resize/1280x720!/quality/90/?url=https%3A%2F%2Fmediaassets.thedenverchannel.com%2Fphoto%2F2017%2F06%2F21%2Fleft%20hand%20milk%20stout%20nitro_1498065114798_61558441_ver1.0_640_480.jpg"
|
||||
"http://thebeerrunkingsport.com/wp-content/uploads/2017/06/a782b012_MilkStoutNitro1.jpeg"
|
||||
"http://www.lefthandbrewing.com/wp/wp-content/uploads/2013/11/Nitro-3-way-pour.jpg"
|
||||
]
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.hear /.*(pour hard).*/i, (msg) ->
|
||||
msg.send msg.random nitros
|
||||
26
scripts/vodkame.coffee
Normal file
26
scripts/vodkame.coffee
Normal file
@@ -0,0 +1,26 @@
|
||||
# Description:
|
||||
# None
|
||||
#
|
||||
# Dependencies:
|
||||
# None
|
||||
#
|
||||
# Configuration:
|
||||
# None
|
||||
#
|
||||
# Commands:
|
||||
# hubot vodka me - Grab me a vodka
|
||||
#
|
||||
# Author:
|
||||
# John Sullivan
|
||||
|
||||
vodkas = [
|
||||
"https://www.thespruceeats.com/thmb/VdVFs-62QBYWppoUwTdtK8rtw-0=/3849x2524/filters:no_upscale():max_bytes(150000):strip_icc()/vodka-martini-recipe-760983-8-5b48ffe1c9e77c001a664f6e.jpg",
|
||||
"https://hips.hearstapps.com/del.h-cdn.co/assets/15/34/1439920100-vodka-drinks-cucumber-mint.jpg",
|
||||
"https://assets.punchdrink.com/wp-content/uploads/2016/03/Article-Vodka-Cocktail-Recipe-Duke-Martini-London-Giuseppe-Gonzalez-Suffolk-Arms-Espresso-Martini-NYC.jpg",
|
||||
"https://imagesvc.timeincapp.com/v3/mm/image?url=https%3A%2F%2Fcdn-image.foodandwine.com%2Fsites%2Fdefault%2Ffiles%2Fclassic-vodka-gimlet-xl-recipe2017.jpg&w=1000&c=sc&poi=face&q=70",
|
||||
"https://cdn.liquor.com/wp-content/uploads/2016/12/22114757/vodka-gimlet-720x720-recipe.jpg"
|
||||
]
|
||||
|
||||
module.exports = (robot) ->
|
||||
robot.hear /.*(vodka me).*/i, (msg) ->
|
||||
msg.send msg.random vodkas
|
||||
Reference in New Issue
Block a user