add emoji plugin

This commit is contained in:
dennydai 2016-08-10 09:03:40 +08:00
parent 76bf36938b
commit fa558b25f7

9
plugins/emoji.php Normal file
View File

@ -0,0 +1,9 @@
<?php
PluginSet("Search Emoji");
$plugin_emoji_json = json_decode(file_get_contents("http://emoji.getdango.com/api/emoji?q=".rawurlencode($plugin_text)),true);
$msg = '';
foreach ($plugin_emoji_json['results'] as $plugin_emoji_json_result) {
$msg .= $plugin_emoji_json_result['text']." Score: ".$plugin_emoji_json_result['score']."\n";
}
$BOT->msg($plugin_sendto, substr($msg,0,strlen($msg)-1));