From 88ad58c3d3412162ffdeb96f49b789e7976cad07 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Mon, 20 Feb 2023 13:58:01 -0800 Subject: minor reformatting --- bot.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bot.py') diff --git a/bot.py b/bot.py index 398e433..7679d7f 100644 --- a/bot.py +++ b/bot.py @@ -41,8 +41,8 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: hello = "Hello, this is `checkin.bot`. \n\n" \ "This is a Telegram bot with functionality similar to Foursquare Swarm, " \ "but check in and post your location to the Fediverse (Mastodon/Pleroma) instead of Twitter.\n\n" \ - "Aware of privacy concerns, this bot will not store your location data."\ - "*Be safe and cautious when sharing your real time location on the web.* \n\n"\ + "Aware of privacy concerns, this bot will not store your location data." \ + "*Be safe and cautious when sharing your real time location on the web.* \n\n" \ "Start using this bot by sharing your location using Telegram context menu to it." await update.message.reply_text(hello, parse_mode=telegram.constants.ParseMode.MARKDOWN) @@ -67,10 +67,12 @@ async def button(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: await query.answer() poi = get_loc(query.data) - mastodon_client.status_post(f"I'm at {poi['name']} in {poi['locality']}, {poi['region']}, \n[OSM]({poi['osm_url']})", - visibility="private") + status = mastodon_client.status_post( + f"I'm at {poi['name']} in {poi['locality']}, {poi['region']}, {poi['osm_url']}", + visibility="private") - await query.edit_message_text(text=f"Selected option: {poi}") + await query.edit_message_text(text=f"Selected place: {poi['name']}\nPosted to Mastodon: {status['url']}", + parse_mode=telegram.constants.ParseMode.MARKDOWN) async def help_command(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None: -- cgit v1.2.3