mirror of
https://github.com/LBRYFoundation/lbry-wunderbot.git
synced 2025-08-23 17:47:27 +00:00
disable claim bot
This commit is contained in:
parent
61dbeb8fe8
commit
267128b3ee
1 changed files with 0 additions and 19 deletions
|
@ -6,7 +6,6 @@ let config = require('config');
|
||||||
let channels = config.get('claimbot').channels;
|
let channels = config.get('claimbot').channels;
|
||||||
const Discord = require('discord.js');
|
const Discord = require('discord.js');
|
||||||
const request = require('request');
|
const request = require('request');
|
||||||
let lastProcessedBlock = 0;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
init: init
|
init: init
|
||||||
|
@ -22,24 +21,6 @@ function init(discordBot_) {
|
||||||
discordBot.channels.get(channels[0]).send('activating claimbot');
|
discordBot.channels.get(channels[0]).send('activating claimbot');
|
||||||
}
|
}
|
||||||
|
|
||||||
function announceClaims() {
|
|
||||||
let currentBlock = lastProcessedBlock;
|
|
||||||
getClaimsForLastBlock()
|
|
||||||
.then(claims => {
|
|
||||||
claims.forEach(c => {
|
|
||||||
if (c.height <= lastProcessedBlock) return;
|
|
||||||
currentBlock = Math.max(currentBlock, c.height);
|
|
||||||
|
|
||||||
//filter claims that we don't want to announce
|
|
||||||
if (c.bid_state === 'Expired' || c.bid_state === 'Spent') return;
|
|
||||||
|
|
||||||
discordPost(embedFromClaim(c));
|
|
||||||
});
|
|
||||||
lastProcessedBlock = currentBlock;
|
|
||||||
})
|
|
||||||
.catch(console.error);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {Object} claim
|
* @param {Object} claim
|
||||||
|
|
Loading…
Add table
Reference in a new issue