mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-23 17:47:27 +00:00
remove uneeded console.log's
This commit is contained in:
parent
dec14ffe3a
commit
39c19da3b9
2 changed files with 5 additions and 7 deletions
|
@ -2,7 +2,7 @@ let needle = require('needle');
|
||||||
let config = require('config');
|
let config = require('config');
|
||||||
let hasHashBotChannels = require('../helpers.js').hasHashBotChannels;
|
let hasHashBotChannels = require('../helpers.js').hasHashBotChannels;
|
||||||
let inPrivate = require('../helpers.js').inPrivate;
|
let inPrivate = require('../helpers.js').inPrivate;
|
||||||
let ChannelID = config.get('hashbot').mainchannel;
|
let ChannelID = config.get('hashbot').mainchannel;
|
||||||
exports.commands = [
|
exports.commands = [
|
||||||
"hash" // command that is in this file, every command needs it own export as shown below
|
"hash" // command that is in this file, every command needs it own export as shown below
|
||||||
]
|
]
|
||||||
|
@ -15,7 +15,7 @@ exports.timedhash = function(bot) {
|
||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
sendMiningInfo(bot);
|
sendMiningInfo(bot);
|
||||||
}, 6 * 60 * 60 * 1000);
|
}, 6 * 60 * 60 * 1000);
|
||||||
|
|
||||||
function sendMiningInfo(bot) {
|
function sendMiningInfo(bot) {
|
||||||
needle.get('https://explorer.lbry.io/api/v1/status', function(error, response) {
|
needle.get('https://explorer.lbry.io/api/v1/status', function(error, response) {
|
||||||
if (error || response.statusCode !== 200) {
|
if (error || response.statusCode !== 200) {
|
||||||
|
@ -69,7 +69,6 @@ exports.hash = {
|
||||||
words = suffix.trim().split(' ').filter( function(n){return n !== "";} );
|
words = suffix.trim().split(' ').filter( function(n){return n !== "";} );
|
||||||
profitcommand = words[0];
|
profitcommand = words[0];
|
||||||
myhashrate = words[1];
|
myhashrate = words[1];
|
||||||
console.log(suffix)
|
|
||||||
if (profitcommand == "power") {
|
if (profitcommand == "power") {
|
||||||
sendProfitInfo(bot, msg, suffix);
|
sendProfitInfo(bot, msg, suffix);
|
||||||
return
|
return
|
||||||
|
@ -77,7 +76,7 @@ exports.hash = {
|
||||||
sendMiningInfo(bot, msg, suffix);
|
sendMiningInfo(bot, msg, suffix);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMiningInfo(bot, msg, suffix) {
|
function sendMiningInfo(bot, msg, suffix) {
|
||||||
if(!inPrivate(msg) && !hasHashBotChannels(msg)){
|
if(!inPrivate(msg) && !hasHashBotChannels(msg)){
|
||||||
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to hash bot.');
|
msg.channel.send('Please use <#' + ChannelID + '> or DMs to talk to hash bot.');
|
||||||
|
@ -115,7 +114,7 @@ exports.hash = {
|
||||||
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
"icon_url": "https://i.imgur.com/yWf5USu.png"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
msg.channel.send({ embed });
|
msg.channel.send({ embed });
|
||||||
return
|
return
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -143,7 +142,7 @@ exports.hash = {
|
||||||
"1 Hour = **" + LBC.toFixed(4) + "** \n" +
|
"1 Hour = **" + LBC.toFixed(4) + "** \n" +
|
||||||
"1 Day = **" + LBC24.toFixed(2) + "** \n" +
|
"1 Day = **" + LBC24.toFixed(2) + "** \n" +
|
||||||
"1 Week = **" + LBC1w.toFixed(4) + "** \n" +
|
"1 Week = **" + LBC1w.toFixed(4) + "** \n" +
|
||||||
"1 Month = **" + LBC1m.toFixed(4) + "** \n"
|
"1 Month = **" + LBC1m.toFixed(4) + "** \n"
|
||||||
const embed = {
|
const embed = {
|
||||||
"description": message,
|
"description": message,
|
||||||
"color": 7976557,
|
"color": 7976557,
|
||||||
|
|
|
@ -108,7 +108,6 @@ exports.welcome = {
|
||||||
usage: "<@username>",
|
usage: "<@username>",
|
||||||
description: "send welcome message to specified user",
|
description: "send welcome message to specified user",
|
||||||
process: function(bot, msg, suffix) {
|
process: function(bot, msg, suffix) {
|
||||||
console.log(suffix);
|
|
||||||
if (inPrivate(msg)) {
|
if (inPrivate(msg)) {
|
||||||
msg.channel.send("command cannot be used in a DM");
|
msg.channel.send("command cannot be used in a DM");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue