This commit is contained in:
parent
43f9af1d78
commit
8e4ecb04ec
@ -33,26 +33,26 @@ async def help_command(update: Update):
|
|||||||
user = update.effective_user
|
user = update.effective_user
|
||||||
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):
|
async def handle_location(update: Update):
|
||||||
"""Respond to a location message."""
|
"""Respond to a location message."""
|
||||||
location = update.message.location
|
location = update.message.location
|
||||||
if location:
|
if location:
|
||||||
await update.message.reply_text(
|
lat = location.latitude
|
||||||
message = (
|
lon = location.longitude
|
||||||
|
text = (
|
||||||
"🚀 Your Digital Twin is ready!\n\n"
|
"🚀 Your Digital Twin is ready!\n\n"
|
||||||
f"🌍 Latitude: {location.latitude}\n"
|
f"🌍 Latitude: {lat}\n"
|
||||||
f"🌍 Longitude: {location.longitude}\n\n"
|
f"🌍 Longitude: {lon}\n\n"
|
||||||
f"🔗 Access it here:\n"
|
"🔗 Access it here:\n"
|
||||||
f"https://app.polisplexity.tech/city/digital/twin/com_con/?lat={location.latitude}&long={location.longitude}\n\n"
|
f"https://app.polisplexity.tech/city/digital/twin/com_con/?lat={lat}&long={lon}\n\n"
|
||||||
"Thanks for sharing your location!"
|
"Thanks for sharing your location!")
|
||||||
)
|
await update.message.reply_text(text)
|
||||||
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
await update.message.reply_text("Please share your location.")
|
await update.message.reply_text("Please share your location.")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def respond(update, bot_name):
|
async def respond(update, bot_name):
|
||||||
"""Respond to user messages using the LangChain AI service."""
|
"""Respond to user messages using the LangChain AI service."""
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user