add Urban Dictionary plugin
This commit is contained in:
parent
8fbfa63684
commit
853f0b2337
9
plugins/urbandict.php
Normal file
9
plugins/urbandict.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
PluginSet("Urban Dictionary");
|
||||
|
||||
$msg = $plugin_text;
|
||||
$plugin_urbandict_raw = json_decode(file_get_contents("http://api.urbandictionary.com/v0/define?term=".$plugin_text),true);
|
||||
foreach ($plugin_urbandict_raw['list'] as $plugin_urbandict_sublist) {
|
||||
$msg .= "\n------------------\n".$plugin_urbandict_sublist['definition']."\n\n".$plugin_urbandict_sublist['permalink'];
|
||||
}
|
||||
$BOT->msg($plugin_sendto, $msg);
|
Loading…
Reference in New Issue
Block a user