Added round to coordinates

This commit is contained in:
Joan
2024-04-08 11:48:14 +02:00
parent c31e155c74
commit be909fc937

View File

@@ -287,8 +287,8 @@ async def continue_or_finish(update: Update, context: CallbackContext):
if last_step == 'coords':
answer = update.message.text
try:
latitude = float(answer.split(',')[0])
longitude = float(answer.split(',')[1])
latitude = round(float(answer.split(',')[0]), 4)
longitude = round(float(answer.split(',')[1]), 4)
except:
await context.bot.send_message(chat_id=update.effective_chat.id,
text='Pon las coordenadas siguiendo el ejemplo: 41.34, 0.65', reply_markup=ForceReply())