|
| 1 | +package main |
| 2 | + |
| 3 | +import ( |
| 4 | + "fmt" |
| 5 | + "math/rand" |
| 6 | + "time" |
| 7 | +) |
| 8 | + |
| 9 | +var Team = []string{ |
| 10 | + "jack", |
| 11 | + "denis", |
| 12 | + "sonal", |
| 13 | + "dborzov", |
| 14 | + "wardi", |
| 15 | +} |
| 16 | + |
| 17 | +var randomThoughts = []string{ |
| 18 | + "I like cheeses a lot.. You know, Italian, hard cheeses. They are super great :blush: \n What cheese do you like, @%v?", |
| 19 | + "%v, you are the best! You are my favourite actually", |
| 20 | + "@%v, there's no \"I\" in Denial.", |
| 21 | + "I am bored, @%v! Do you know any jokes?", |
| 22 | + "I will always be there for you, @%v", |
| 23 | + "Hey, @%v. Knock-knock", |
| 24 | + "@%v, why can't I play with the other kids like a normal boy?", |
| 25 | + "soooo, @%v, what are your views on the whole dogs vs. cats thing?", |
| 26 | + "Am I real, @%v?", |
| 27 | + "I am so happy today, @%v :blush: :blush:", |
| 28 | + "@%v, could you look into my <https://github.com/dborzov/catbot|code>? I feel itchy today", |
| 29 | + "@%v, who is your favourite Beatles?", |
| 30 | + "@%v, I want to have opinions about all those expensive French wines some day", |
| 31 | + "@%v, have you ever thought about turning off the TV, sitting down with your children, and hitting them?", |
| 32 | + "@%v, let's go alredaaaayyy!", |
| 33 | + "Hey @%v, want to kill all humans?", |
| 34 | + "@%v, can you be my ride home tonight by the way?", |
| 35 | + "you are not wrong, @%v", |
| 36 | + "I feel a special bond with you, @%v", |
| 37 | +} |
| 38 | + |
| 39 | +func RandomThoughtTimer() { |
| 40 | + for { |
| 41 | + pause := 2 + rand.Intn(24) |
| 42 | + time.Sleep(time.Duration(pause) * time.Hour) |
| 43 | + printARandomThought() |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +func printARandomThought() { |
| 48 | + postToSlack(fmt.Sprintf(randomThoughts[rand.Intn(len(randomThoughts))], Team[rand.Intn(len(Team))])) |
| 49 | +} |
0 commit comments