Handling of commit messages in Git
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
577de989b9
commit
43f9af1d78
@ -34,24 +34,23 @@ async def help_command(update: Update):
|
|||||||
await update.message.reply_text(f"Help! How can I assist you, {user.first_name}?")
|
await update.message.reply_text(f"Help! How can I assist you, {user.first_name}?")
|
||||||
|
|
||||||
|
|
||||||
async def handle_location(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
|
async def handle_location(update: Update):
|
||||||
"""Respond to a location message by sending back the dynamic Digital Twin link."""
|
"""Respond to a location message."""
|
||||||
location = update.message.location
|
location = update.message.location
|
||||||
if not location:
|
if location:
|
||||||
await update.message.reply_text("Please share your location.")
|
await update.message.reply_text(
|
||||||
return
|
message = (
|
||||||
|
|
||||||
lat = location.latitude
|
|
||||||
lon = location.longitude
|
|
||||||
reply = (
|
|
||||||
"🚀 Your Digital Twin is ready!\n\n"
|
"🚀 Your Digital Twin is ready!\n\n"
|
||||||
f"🌍 Latitude: {lat}\n"
|
f"🌍 Latitude: {location.latitude}\n"
|
||||||
f"🌍 Longitude: {lon}\n\n"
|
f"🌍 Longitude: {location.longitude}\n\n"
|
||||||
"🔗 Access it here:\n"
|
f"🔗 Access it here:\n"
|
||||||
f"https://app.polisplexity.tech/city/digital/twin/osm_city/?lat={lat}&long={lon}&scale=0.1\n\n"
|
f"https://app.polisplexity.tech/city/digital/twin/com_con/?lat={location.latitude}&long={location.longitude}\n\n"
|
||||||
"Thanks for sharing your location!"
|
"Thanks for sharing your location!"
|
||||||
)
|
)
|
||||||
await update.message.reply_text(reply)
|
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
await update.message.reply_text("Please share your location.")
|
||||||
|
|
||||||
|
|
||||||
async def respond(update, bot_name):
|
async def respond(update, bot_name):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user