Fix typos in examples (#1537)

This commit is contained in:
Trainer Jono 2019-10-12 02:10:21 +08:00 committed by Noam Meltzer
parent 3257148d13
commit 1d007b1b60
6 changed files with 13 additions and 13 deletions

View file

@ -30,7 +30,7 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
logger = logging.getLogger(__name__)
# Define constants the will allow us to reuse the deep-linking parameters.
# Define constants that will allow us to reuse the deep-linking parameters.
CHECK_THIS_OUT = 'check-this-out'
USING_ENTITIES = 'using-entities-here'
SO_COOL = 'so-cool'

View file

@ -26,8 +26,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
logger = logging.getLogger(__name__)
# Define a few command handlers. These usually take the two arguments bot and
# update. Error handlers also receive the raised TelegramError object in error.
# Define a few command handlers. These usually take the two arguments update and
# context. Error handlers also receive the raised TelegramError object in error.
def start(update, context):
"""Send a message when the command /start is issued."""
update.message.reply_text('Hi!')

View file

@ -27,8 +27,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
logger = logging.getLogger(__name__)
# Define a few command handlers. These usually take the two arguments bot and
# update. Error handlers also receive the raised TelegramError object in error.
# Define a few command handlers. These usually take the two arguments update and
# context. Error handlers also receive the raised TelegramError object in error.
def start(update, context):
"""Send a message when the command /start is issued."""
update.message.reply_text('Hi!')

View file

@ -36,7 +36,7 @@ def start(update, context):
# Build InlineKeyboard where each button has a displayed text
# and a string as callback_data
# The keyboard is a list of button rows, where each row is in turn
# a list (henc `[[...]]`).
# a list (hence `[[...]]`).
keyboard = [
[InlineKeyboardButton("1", callback_data=str(ONE)),
InlineKeyboardButton("2", callback_data=str(TWO))]
@ -47,7 +47,7 @@ def start(update, context):
"Start handler, Choose a route",
reply_markup=reply_markup
)
# Tell CosversationHandler that we're in State `FIRST` now
# Tell ConversationHandler that we're in state `FIRST` now
return FIRST
@ -173,7 +173,7 @@ def main():
dp = updater.dispatcher
# Setup conversation handler with the states FIRST and SECOND
# Use the pattern parameter to pass CallbackQueryies with specific
# Use the pattern parameter to pass CallbackQueries with specific
# data pattern to the corresponding handlers.
# ^ means "start of line/string"
# $ means "end of line/string"
@ -191,7 +191,7 @@ def main():
fallbacks=[CommandHandler('start', start)]
)
# Add conversationhandler to dispatcher it will be used for handling
# Add ConversationHandler to dispatcher that will be used for handling
# updates
dp.add_handler(conv_handler)

View file

@ -103,9 +103,9 @@ def precheckout_callback(update, context):
query.answer(ok=True)
# finally, after contacting to the payment provider...
# finally, after contacting the payment provider...
def successful_payment_callback(update, context):
# do something after successful receive of payment?
# do something after successfully receiving payment?
update.message.reply_text("Thank you for your payment!")

View file

@ -29,8 +29,8 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
logger = logging.getLogger(__name__)
# Define a few command handlers. These usually take the two arguments bot and
# update. Error handlers also receive the raised TelegramError object in error.
# Define a few command handlers. These usually take the two arguments update and
# context. Error handlers also receive the raised TelegramError object in error.
def start(update, context):
update.message.reply_text('Hi! Use /set <seconds> to set a timer')