From 17719e6f041474de85dcbbf7045cd605e2d48469 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sun, 6 Jan 2019 01:27:09 +0530 Subject: [PATCH] Add /commands --- webhook.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webhook.php b/webhook.php index 95e53df..ea74d7a 100644 --- a/webhook.php +++ b/webhook.php @@ -359,6 +359,10 @@ function help() { send_html('Help Page'); } +function commands() { + send_text(file_get_contents('command_list.txt')); +} + // Get JSON from post, store it and decode it. $var = file_get_contents('php://input'); $decoded = json_decode($var); @@ -458,6 +462,10 @@ $modules = array( array( "command" => "/rate", "function" => "rate();" + ), + array( + "command" => "/commands", + "function" => "commands()" ) );