add position/deviceList template
This commit is contained in:
parent
d6c7c6a6c8
commit
6ff357d765
22
utils.js
22
utils.js
|
@ -10,7 +10,6 @@ https://github.com/frab1t/trackmyd-bot
|
||||||
to configure the bot.
|
to configure the bot.
|
||||||
|
|
||||||
Made with ❤️ by @frab1t`;
|
Made with ❤️ by @frab1t`;
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +20,6 @@ function templateHelp() {
|
||||||
/list - view device available.
|
/list - view device available.
|
||||||
/add - add new device.
|
/add - add new device.
|
||||||
/remove - remove device.`;
|
/remove - remove device.`;
|
||||||
|
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +30,26 @@ and run the bot on your local network. 😎`;
|
||||||
return msg;
|
return msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function templatePosition(data) {
|
||||||
|
const msg = `📲 📡 ${data.name}
|
||||||
|
-------------------------------------
|
||||||
|
- 🏔️ Altitude: ${data.position.altitude}
|
||||||
|
- ⚡️ Speed: ${data.position.speed}
|
||||||
|
- 📏 Accurancy: ${data.position.accurancy}
|
||||||
|
- 🔋 Battery: ${data.information.battery}
|
||||||
|
- ⌚️ 2019-02-18T13:44:01`;
|
||||||
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
function templateDevicesList(data) {
|
||||||
|
const msg = `📲 ${data.name}
|
||||||
|
${data._id}`;
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
module.exports.templateStart = templateStart;
|
module.exports.templateStart = templateStart;
|
||||||
module.exports.templateHelp = templateHelp;
|
module.exports.templateHelp = templateHelp;
|
||||||
module.exports.templateUnauthorizedUser = templateUnauthorizedUser;
|
module.exports.templateUnauthorizedUser = templateUnauthorizedUser;
|
||||||
|
module.exports.templatePosition = templatePosition;
|
||||||
|
module.exports.templateDevicesList = templateDevicesList;
|
||||||
|
|
Loading…
Reference in New Issue