mirror of https://github.com/bonobonet/botty
parent
ebe50679b7
commit
ae31c7b2c0
|
@ -56,7 +56,9 @@ public final class UrbanDict : Mod
|
|||
|
||||
if(splits.length >= 2)
|
||||
{
|
||||
writeln("Are we ongod yet? ",messageBody.indexOf(" "));
|
||||
string searchTerm = strip(messageBody[messageBody.indexOf(" ")..$]);
|
||||
writeln("search term: '"~searchTerm~"'");
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -77,6 +79,12 @@ public final class UrbanDict : Mod
|
|||
|
||||
import birchwood.protocol.formatting;
|
||||
|
||||
writeln("Def '"~definition~"'");
|
||||
writeln("Ex '"~example~"'");
|
||||
writeln("Au '"~definition~"'");
|
||||
writeln("Perm '"~permalink~"'");
|
||||
|
||||
|
||||
getBot().channelMessage(bold("Definition: ")~definition, channel);
|
||||
getBot().channelMessage(bold("Example: ")~example, channel);
|
||||
getBot().channelMessage(bold("Author: ")~author, channel);
|
||||
|
@ -102,6 +110,14 @@ public final class UrbanDict : Mod
|
|||
else
|
||||
{
|
||||
// Do nothing
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
writeln("IMM A W ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,9 +132,10 @@ public final class UrbanDict : Mod
|
|||
|
||||
|
||||
import std.stdio;
|
||||
// writeln("UB result: ", data);
|
||||
|
||||
|
||||
string data = cast(string)get(ubBase~term);
|
||||
writeln("UB result: ", data);
|
||||
JSONValue[] json = parseJSON(data)["list"].array();
|
||||
|
||||
return json;
|
||||
|
|
Loading…
Reference in New Issue