Compare commits

..

No commits in common. "45ffed60e277ef5368d713411082eb13bb43d4d3" and "1144e0b21782933fe1b09f2e2afa2ec986a9f90a" have entirely different histories.

2 changed files with 0 additions and 53 deletions

View File

@ -6,7 +6,6 @@ coin - Tosses a coin
wiki - Search Wikipedia wiki - Search Wikipedia
arch_wiki - Search the Arch wiki arch_wiki - Search the Arch wiki
insult - As expected, insults insult - As expected, insults
weebify - Weebifies the given text
is - Is <your question> is - Is <your question>
are - Are <your question> are - Are <your question>
can - Can <your question> can - Can <your question>

View File

@ -363,54 +363,6 @@ function commands() {
send_text(file_get_contents('command_list.txt')); send_text(file_get_contents('command_list.txt'));
} }
function weebify() {
global $decoded;
global $command_list;
if(count($command_list) <= 1){
send_text("Need text to weebify. Send /weebify text", true);
return;
}
$letters = array(
"a" => "",
"b" => "",
"c" => "",
"d" => "",
"e" => "",
"f" => "",
"g" => "",
"h" => "",
"i" => "",
"j" => "",
"k" => "",
"l" => "",
"m" => "",
"n" => "𠘨",
"o" => "",
"p" => "",
"q" => "",
"r" => "",
"s" => "",
"t" => "",
"u" => "",
"v" => "",
"w" => "",
"x" => "",
"y" => "",
"z" => ""
);
$chars = str_split(preg_replace('/^\/[^ ]+ /', '', strtolower($decoded->{"message"}->{"text"})));
$text = "";
foreach($chars as $char){
if(key_exists($char, $letters)) {
$text .= $letters[$char];
}
else {
$text .= $char;
}
}
send_text($text, true);
}
// Get JSON from post, store it and decode it. // Get JSON from post, store it and decode it.
$var = file_get_contents('php://input'); $var = file_get_contents('php://input');
$decoded = json_decode($var); $decoded = json_decode($var);
@ -514,10 +466,6 @@ $modules = array(
array( array(
"command" => "/commands", "command" => "/commands",
"function" => "commands();" "function" => "commands();"
),
array(
"command" => "/weebify",
"function" => "weebify();"
) )
); );