Added round to coordinates
This commit is contained in:
@@ -287,8 +287,8 @@ async def continue_or_finish(update: Update, context: CallbackContext):
|
|||||||
if last_step == 'coords':
|
if last_step == 'coords':
|
||||||
answer = update.message.text
|
answer = update.message.text
|
||||||
try:
|
try:
|
||||||
latitude = float(answer.split(',')[0])
|
latitude = round(float(answer.split(',')[0]), 4)
|
||||||
longitude = float(answer.split(',')[1])
|
longitude = round(float(answer.split(',')[1]), 4)
|
||||||
except:
|
except:
|
||||||
await context.bot.send_message(chat_id=update.effective_chat.id,
|
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())
|
text='Pon las coordenadas siguiendo el ejemplo: 41.34, 0.65', reply_markup=ForceReply())
|
||||||
|
|||||||
Reference in New Issue
Block a user