From 6105e3982175bc4a8e358e13a6d10b2638cc95eb Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Sun, 22 Nov 2020 15:20:45 -0500 Subject: [PATCH] [+] Add test command --- src/bot.py | 2 +- src/commands.md | 1 + src/commands.py | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bot.py b/src/bot.py index b94df8f..0ef7815 100644 --- a/src/bot.py +++ b/src/bot.py @@ -26,7 +26,7 @@ if __name__ == '__main__': dispatcher = updater.dispatcher # Register commands - commands = [start, ls, touch, rm, nano, interval, enable, disable] + commands = [start, ls, touch, rm, nano, test, interval, enable, disable] [dispatcher.add_handler(createCommand(cmd)) for cmd in commands] # Start bot diff --git a/src/commands.md b/src/commands.md index 0fd058f..088582b 100644 --- a/src/commands.md +++ b/src/commands.md @@ -3,6 +3,7 @@ ls - List the http requests you've created touch - Create a http request rm - Delete a http request nano - Edit a http request +test - Test a http request interval - Change the interval between the updates of a http request enable - Start listening to a http request disable - Stop listening to a http request diff --git a/src/commands.py b/src/commands.py index be8264c..1c9651d 100644 --- a/src/commands.py +++ b/src/commands.py @@ -13,10 +13,10 @@ Welcome! This bot monitors http changes! /ls - List the http requests you've created /touch - Create a http request /rm - Delete a http request -/mv - Rename a http request *Configuration Commands* /nano - Edit a http request +/test - Test a http request /interval - Change the interval between the updates of a http request *Start/Stop Commands* @@ -107,6 +107,11 @@ def nano(update, context): user = database.checkUser(chat.id) +def test(update, context): + chat = update.effective_chat + user = database.checkUser(chat.id) + + def interval(update, context): chat = update.effective_chat user = database.checkUser(chat.id)