diff options
author | clarkzjw <[email protected]> | 2023-02-22 11:43:10 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-22 11:43:10 -0800 |
commit | b3786171167337685c21d64f4eed4a7cc1c5b130 (patch) | |
tree | 8d1f31958930f4cc3628c8d5e31ad239bfb4857b /command.py | |
parent | eab21831cf13c9afdafc59adde32c85b9716e76b (diff) | |
download | swarm2fediverse-b3786171167337685c21d64f4eed4a7cc1c5b130.tar.gz |
more code formatting
Diffstat (limited to 'command.py')
-rw-r--r-- | command.py | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -7,14 +7,7 @@ from config import * | |||
7 | 7 | ||
8 | 8 | ||
9 | async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: | 9 | async def start_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: |
10 | hello = "Hello, this is `checkin.bot`. \n\n" \ | 10 | await update.message.reply_text(PROMPT_START, parse_mode=ParseMode.MARKDOWN) |
11 | "This is a Telegram bot with functionality similar to Foursquare Swarm, " \ | ||
12 | "but check in and post your location to the Fediverse (Mastodon/Pleroma) instead of Twitter.\n\n" \ | ||
13 | "Aware of privacy concerns, this bot will not store your location data." \ | ||
14 | "*Be safe and cautious when sharing your real time location on the web.* \n\n" \ | ||
15 | "Start using this bot by sharing your location using Telegram context menu to it." | ||
16 | |||
17 | await update.message.reply_text(hello, parse_mode=ParseMode.MARKDOWN) | ||
18 | await update.message.reply_text(PROMPT_CHOOSE_ACTION, reply_markup=MAIN_MENU) | 11 | await update.message.reply_text(PROMPT_CHOOSE_ACTION, reply_markup=MAIN_MENU) |
19 | 12 | ||
20 | return WAIT_LOCATION | 13 | return WAIT_LOCATION |
@@ -25,7 +18,7 @@ async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> No | |||
25 | 18 | ||
26 | 19 | ||
27 | async def cancel_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: | 20 | async def cancel_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> int: |
28 | for prompt in [PROMPT_LOCATION_KEYWORD, PROMPT_CHOOSE_POI_FROM_LIST, PROMPT_ADD_COMMENT, PROMPT_ADD_MEDIA]: | 21 | for prompt in [PROMPT_LOCATION_KEYWORD, PROMPT_WAIT_LOCATION_CONFIRMATION, PROMPT_ADD_COMMENT, PROMPT_ADD_MEDIA]: |
29 | try: | 22 | try: |
30 | if context.user_data.get(prompt): | 23 | if context.user_data.get(prompt): |
31 | await context.bot.delete_message(chat_id=update.message.chat_id, | 24 | await context.bot.delete_message(chat_id=update.message.chat_id, |