Browse Source

add Urban Dictionary plugin

master
dennydai 5 years ago
parent
commit
853f0b2337
  1. 9
      plugins/urbandict.php

9
plugins/urbandict.php

@ -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…
Cancel
Save