forked from ratbeard/bingbot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bragbot.coffee
66 lines (54 loc) · 1.31 KB
/
bragbot.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
irc = require 'irc'
bot = new irc.Client('irc.freenode.net', 'bangbot',
debug: true,
channels: ['#coolkidsusa']
)
bot.addListener 'error', (message) ->
console.error 'fuk:', message
bot.addListener 'message', (from, to, message) ->
console.log('%s => %s: %s', from, to, message)
randomInt = (low, high) ->
return low + Math.floor(Math.random() * (high - low))
verb = [
'ravaged',
'grilled',
'attacked',
'raped',
'brutally fucked',
'damaged',
'toyed with',
'teased'
]
noun = [
'Ford F350 with 12 burners',
'Elevator Shaft',
'Desk',
'Starbucks Table',
'@theRealWJJs couch',
'Porche 911s hood',
'Swamp Marsh'
]
thing = [
'Snake',
'Duncan',
'@theRealWJJ',
'Homeless Guy',
'School Teacher',
'Children',
'Camp Counselor'
]
getVerb = ->
number = randomInt(0, verb.length)
return verb[number]
getNoun = ->
number = randomInt(0, noun.length)
return noun[number]
getThing = ->
number = randomInt(0, thing.length)
return thing[number]
if Math.floor( Math.random() * 50) == 0
msg = "camsnap jlo gets #{getVerb()} on #{getNoun()} by #{getThing()}"
bot.say to, msg
if message.match /bangbot/
msg = "camsnap jlo gets #{getVerb()} on #{getNoun()} by #{getThing()}"
bot.say to, msg