diff --git a/webhook.php b/webhook.php
index 7945b57..9313e34 100644
--- a/webhook.php
+++ b/webhook.php
@@ -167,7 +167,17 @@ function arch_wiki()
}
$url = "https://wiki.archlinux.org/api.php?action=opensearch&format=json&search=" . urlencode($search_query);
$a = json_decode(file_get_contents($url));
- send_html("" . $a[1][0] . "");
+ $names = $a[1];
+ $urls = $a[3];
+ if (count($names) == 0) {
+ send_text("No result found", true);
+ return false;
+ }
+ $text = "Results\n";
+ for ($i = 0 ; $i < count($names) ; $i++){
+ $text .= "" . $names[$i] . "\n";
+ }
+ send_html($text);
}
function coin()