From 5071ba88232619b99afe428e8f12efe21cf97bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joscha=20G=C3=B6tzer?= Date: Wed, 27 Dec 2017 23:20:28 +0100 Subject: [PATCH] Updated Types of Handlers (markdown) --- Types-of-Handlers.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Types-of-Handlers.md b/Types-of-Handlers.md index afcad7f..fc0b913 100644 --- a/Types-of-Handlers.md +++ b/Types-of-Handlers.md @@ -21,7 +21,8 @@ def start_callback(bot, update, args): ... -dispatcher.add_handler(CommandHandler("start", start_callback, pass_args=True))``` +dispatcher.add_handler(CommandHandler("start", start_callback, pass_args=True)) +``` Sending "/start Hello World!" to your bot will now split everything after /start separated by the space character into a list of words and pass it on to the `args` parameter of `start_callback`: `["Hello", "World!"]`. We join these chunks together by calling `" ".join(args)` and echo the resulting string back to the user.