[O] Update command return message implementations
This commit is contained in:
+2
-4
@@ -26,17 +26,15 @@ def start(update, context):
|
|||||||
chat = update.effective_chat
|
chat = update.effective_chat
|
||||||
database.checkUser(chat.id)
|
database.checkUser(chat.id)
|
||||||
|
|
||||||
# Send help
|
return helpMsg
|
||||||
context.bot.send_message(chat_id=chat.id, text=helpMsg, parse_mode="markdown")
|
|
||||||
|
|
||||||
|
|
||||||
def ls(update, context):
|
def ls(update, context):
|
||||||
chat = update.effective_chat
|
chat = update.effective_chat
|
||||||
database.checkUser(chat.id)
|
database.checkUser(chat.id)
|
||||||
|
|
||||||
requests = database.userRequests[chat.id]
|
requests = database.userRequests[chat.id]
|
||||||
|
|
||||||
context.bot.send_message(chat_id=update.effective_chat.id, text="Your requests: " + toJson(requests))
|
return "Your requests: " + toJson(requests)
|
||||||
|
|
||||||
|
|
||||||
def touch(update, context):
|
def touch(update, context):
|
||||||
|
|||||||
+2
-2
@@ -17,8 +17,8 @@ def createCommand(method):
|
|||||||
data = method(update, context)
|
data = method(update, context)
|
||||||
|
|
||||||
# Send back data if not null
|
# Send back data if not null
|
||||||
if data is not None and data is not '':
|
if data is not None and data != '':
|
||||||
context.bot.send_message(chat_id=update.effective_chat.id, text=data)
|
context.bot.send_message(chat_id=update.effective_chat.id, text=data, parse_mode="markdown")
|
||||||
|
|
||||||
# Create handler for the wrapper command
|
# Create handler for the wrapper command
|
||||||
return CommandHandler(method.__name__, command, run_async=True)
|
return CommandHandler(method.__name__, command, run_async=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user