edi deviceList/position template

This commit is contained in:
Francesco Esposito 2019-02-21 12:58:28 +01:00
parent c3cf83c977
commit 85967afb3a
1 changed files with 10 additions and 8 deletions

View File

@ -31,19 +31,21 @@ and run the bot on your local network. 😎`;
} }
function templatePosition(data) { function templatePosition(data) {
const msg = `📲 📡 ${data.name} const msg = `📲 📡 *${data.name}*
-------------------------------------
- 🏔 Altitude: ${data.position.altitude} 🏔 _Altitude_: *${data.position.altitude} m.*
- Speed: ${data.position.speed} _Speed_: *${data.position.speed} m/h*
- 📏 Accurancy: ${data.position.accurancy} 📏 _Accurancy_: *${data.position.accurancy} m.*
- 🔋 Battery: ${data.information.battery} 🔋 _Battery_: *${data.information.battery}%*
- 2019-02-18T13:44:01`;
2019-02-18T13:44:01`;
return msg; return msg;
} }
function templateDevicesList(data) { function templateDevicesList(data) {
const msg = `📲 ${data.name} const msg = `📲 *${data.name}*
----
${data._id}`; ${data._id}`;
return msg; return msg;
} }