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