Started work on the next version of tipbot #9
2
.gitignore
vendored
|
@ -74,3 +74,5 @@ typings/
|
|||
|
||||
# Configurations
|
||||
default.json
|
||||
|
||||
.idea/*
|
|
@ -23,7 +23,11 @@ yarn install
|
|||
```
|
||||
node index.js
|
||||
```
|
||||
|
||||
>If you want to move over accounts from the old tipbot format which used usernames as identifier, run move_helper.js:
|
||||
```
|
||||
node move_helper.js
|
||||
```
|
||||
>It will automatically move over the old accounts to the new id based system.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
|
15
index.js
|
@ -67,6 +67,10 @@ function checkTweet(tweet, msg) {
|
|||
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
case "terms":
|
||||
doTerms(tweet, msg);
|
||||
break;
|
||||
case "lbryian":
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
logger.info("Got a command with the old format, handling it...");
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
checkTweet(tweet, msg.splice(1));
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
break;
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +79,7 @@ async function doHelp(tweet, msg) {
|
|||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
let post = await T.post("statuses/update", {
|
||||
status:
|
||||
`@${tweet.user.screen_name} `+
|
||||
"All commands should be called with @ + subcommand \n" +
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
`All commands should be called with ${config.get("bot.handle")} + subcommand \n` +
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
"help - Shows this command. \n" +
|
||||
"balance - Get your balance. \n" +
|
||||
"deposit - Get address for your deposits. \n" +
|
||||
|
@ -92,6 +96,13 @@ async function doHelp(tweet, msg) {
|
|||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
}
|
||||
async function doTerms(tweet, msg){
|
||||
// ADD terms
|
||||
await T.post("statuses/update", {
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
status:
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
`@${tweet.user.screen_name} `+
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
"There are no fees to use this bot except the automatic daemon fee. \n"+
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
"In no event shall LBRY Inc be responsible in the event of lost, stolen or misdirected funds.",
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
in_reply_to_status_id: tweet.id_str
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
});
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
}
|
||||
async function doBalance(tweet, msg) {
|
||||
try {
|
||||
|
@ -162,6 +173,7 @@ async function doTip(tweet, msg) {
|
|||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
});
|
||||
}
|
||||
const userToTip = tweet.entities.user_mentions.find(u => `@${u.screen_name}` === msg[2]).id_str;
|
||||
await getAddress(id(userToTip)) // Call this to ensure user has an account.
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
if (userToTip === null) {
|
||||
return await T.post("statuses/update", {
|
||||
status: `@${tweet.user.screen_name} I could not find that user...`,
|
||||
|
@ -206,6 +218,7 @@ async function getAddress(userId) {
|
|||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
Though it would have to be tested `amount = amint.split("lbc")[0];` probably works too without having to worry too much about spaces or anything after "lbc".
Though it would have to be tested
Would probably work, want to keep it like this for now, as this function is the same in the discord tipbot :) Would probably work, want to keep it like this for now, as this function is the same in the discord tipbot :)
|
||||
function getValidatedAmount(amount) {
|
||||
amount = amount.trim();
|
||||
if you return if you return `null` how is that going to impact the originall call? Can it handle a null value? would it be better if it were `0`?
ah nevermind i just saw the null check. that works too ah nevermind i just saw the null check. that works too
|
||||
if (amount.toLowerCase().endsWith("lbc")) {
|
||||
|
|
|||
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
don't forget to change or parameterize the track value. don't forget to change or parameterize the track value.
also I'd use `let` rather than var.
3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read. 3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.
I don't think this is needed, is it? I don't think this is needed, is it?
...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries. I would suggest adding a check somewhere in-between. ...thus if the split didn't go right, there is a chance that the bot crashes on this line as the array doesn't have at least 2 entries.
I would suggest adding a check somewhere in-between.
`terms` is missing
My English isn't exceptional but I think the sentence should be changed to:
My English isn't exceptional but I think the sentence should be changed to:
`Under no circumstances shall LBRY Inc. be held responsible for lost, stolen or misdirected funds.`
`You tried tipping more than you have! You are ${amount-balanceFromUser} LBC short.`
I think it'd be nice to add a link to the explorer here (short if possible?) I think it'd be nice to add a link to the explorer here (short if possible?)
Correct, as i look through the library i can now see that it is not needed Correct, as i look through the library i can now see that it is not needed
The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet. The tipping here is internally, which means it just moves the amount between the accounts, this helps us skip fees. So the coins shows up directly in the other persons wallet.
Will fix! Will fix!
Will fix! Will fix!
Added! Added!
Check added! Check added!
|
97
move_helper.js
Normal file
|
@ -0,0 +1,97 @@
|
|||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
// This file helps with moving over accounts from the old username system to the id system.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
// It uses the same configuration files as index.js
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
// Checks for the old format, gets their id from twitter, creates new acc, moves balance.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const Twit = require("twit");
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const config = require("config");
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const winston = require("winston");
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
require("winston-daily-rotate-file");
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const Client = require("bitcoin-core");
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const lbry = new Client({
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
version: "0.12.0",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
username: config.get("lbrycrd.username"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
password: config.get("lbrycrd.password"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
port: config.get("lbrycrd.port")
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
});
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const logger = winston.createLogger({
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
level: "info",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
format: winston.format.json(),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
transports: [
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
new winston.transports.DailyRotateFile({
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
filename: "move-helper-%DATE%.log",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
dirname: "./logs",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
datePattern: "YYYY-MM-DD-HH",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
zippedArchive: true,
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
maxSize: "20m",
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
maxFiles: "14d"
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
new winston.transports.Console({
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
format: winston.format.simple(),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
level: "debug"
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
})
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
]
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
});
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let notSynced = [];
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const T = new Twit({
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
consumer_key: config.get("twitter.consumer_key"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
consumer_secret: config.get("twitter.consumer_secret"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
access_token: config.get("twitter.access_token"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
access_token_secret: config.get("twitter.access_token_secret"),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
timeout_ms: 60 * 1000, // optional HTTP request timeout to apply to all requests.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
strictSSL: true // optional - requires SSL certificates to be valid.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
});
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
async function main(){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let accs = await getAccounts();
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
logger.info(`Trying to move ${accs.length} accounts...`)
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
for (let i in accs){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
try {
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
//Get user details from twitter.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let data = await T.get('users/show', { screen_name: accs[i] });
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
//Create a account for the user by id.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let usr = data.data.id_str;
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
await getAddress(id(usr));
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
//Move over from old account to the new account
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
const balanceFromOld = await lbry.getBalance(`twttr-${accs[i]}`);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
if (balanceFromOld !== 0) {
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let res = await lbry.move(
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
`twttr-${accs[i]}`,
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
id(usr),
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
Number(balanceFromOld)
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
// If move is successful, log it!
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
if (res) logger.info(`Transferred ${balanceFromOld} LBC from twttr-${accs[i]} to ${id(usr)}!`);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}catch(e){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
logger.info(`Could not sync ${accs[i]}, error occured:`, e.allErrors);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
notSynced.push({ user: accs[i], error: e.allErrors});
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
logger.info("Could not sync these:"+JSON.stringify(notSynced));
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
// Get a list of all twitter accounts on lbrycrd.
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
async function getAccounts(){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let accs = await lbry.listAccounts();
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
accs = Object.entries(accs);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let accsArr = [];
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
for (let i in accs){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
if(accs[i][0].startsWith('twttr-')) accsArr.push(accs[i][0].substring(6));
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
return accsArr;
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
async function getAddress(userId) {
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
try {
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
let uAddresses = await lbry.getAddressesByAccount(userId);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
i'm slightly confused. Is this function supposed to generate addresses for users that were tipped but didn't yet have an account to their user? i'm slightly confused. Is this function supposed to generate addresses for users that were tipped but didn't yet have an account to their user?
That function is there to assure that the user has a tipping account in the new format, as the user needs that for the bot to be able to move over from the old account to the new account.(This function follows the new id format instead of username) That function is there to assure that the user has a tipping account in the new format, as the user needs that for the bot to be able to move over from the old account to the new account.(This function follows the new id format instead of username)
So yep, it is there to generate adresses(accounts) for users not having an account already. So yep, it is there to generate adresses(accounts) for users not having an account already.
|
||||
if (uAddresses.length > 0) return;
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
await lbry.getNewAddress(userId);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
return;
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
} catch (e) {
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
logger.error(e);
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
function id(usrId){
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
return `t-${usrId}`;
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
}
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
||||
main();
|
||||
you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere? you're catching the error here, but what happens if something doesn't go right? Will a tip go through and fail along the process somewhere?
It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account It should probably not be catched there, instead it should throw an error in the main loop, making it impossible to try and send coins over to a non existing account
|
don't forget to change or parameterize the track value.
also I'd use
let
rather than var.3 is a magic number here in the sense that I have no clue what it is. I guess that it's not a problem on webstorm if it shows the parameter name, but worth keeping in mind that from outside the IDE it might not be easy to read.