This commit is contained in:
Flummi
2017-10-20 08:39:41 +02:00
parent 99dabe81c6
commit d99a5874d6
5 changed files with 69 additions and 7 deletions

19
src/trigger/xmr.js Normal file
View File

@ -0,0 +1,19 @@
const request = require("request");
module.exports = (lib) => {
lib.trigger.add({
name: 'xmr',
call: /^!xmr/i,
level: 100,
active: 1,
func: (e) => {
request(`https://api.coin-hive.com/stats/site/f0ck?secret=${lib.cfg.main.xmrkey}`, (error, response, body) => {
if(!error) {
body = JSON.parse(body);
e.reply(`Hashes/s: ${body.hashesPerSecond} ; Total: ${body.hashesTotal}`);
}
});
},
desc: 'muh'
});
};