Skip to content

Instantly share code, notes, and snippets.

@kaecyra
Created June 30, 2016 17:51
Show Gist options
  • Save kaecyra/63266e8cb27c4be830a40ad1b7964cd8 to your computer and use it in GitHub Desktop.
Save kaecyra/63266e8cb27c4be830a40ad1b7964cd8 to your computer and use it in GitHub Desktop.
<?php
if ($state->have(['spit', 'hot', 'fire'], true)) {
$emotes = [
'(celeryman)',
'(banks)',
'(dance)',
'(gangnamstyle)',
'(danceman)',
'(boom)',
'(rockon)'
];
$str = '';
$j = mt_rand(8, 15);
for ($i = 0; $i < $j; $i++) {
$emote = array_rand($emotes);
$str .= $emotes[$emote].' ';
$repeatChance = mt_rand(0,100);
if ($repeatChance < 20) {
$str .= $emotes[$emote].' ';
$str .= $emotes[$emote].' ';
}
}
$str .= " (dealwithit)";
Jarvis::respond($messageEvent, $str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment