Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resteem others' posts with this API? #6

Closed
antoncoding opened this issue Feb 20, 2018 · 12 comments · May be fixed by #18
Closed

Resteem others' posts with this API? #6

antoncoding opened this issue Feb 20, 2018 · 12 comments · May be fixed by #18
Assignees

Comments

@antoncoding
Copy link

I've been developing a bot with this package for a while, but I can't figure out how to resteem a user's post. I'm currently doing it with another Python Script, is there any chance I can integrate the two into one script?
Thanks for helping ;)

@TwinkieWInkie
Copy link
Collaborator

TwinkieWInkie commented Feb 20, 2018

I'm doing it through steemjs myself. Wouldn't be too hard to add this to the response object.

`
			const action = JSON.stringify(['reblog', {
				account: user.username,
				author: item.author,
				permlink: item.permlink
			}])
			global.steem.broadcast.customJson(
				wif,
				[],
				[user.username],
				'follow',
				action,
				function (err, res) {
					console.log(err)
					console.log(res)
				}
                        )
`

@p0o
Copy link
Owner

p0o commented Mar 15, 2018

As @TwinkieWInkie said, you can always use SteemJS for custom usecases not supported by this package. However, I think it's a useful function that can be embedded in SteemBot too. I will try to add the feature soon.

@AdyWasHere
Copy link

Anychance you could tell me exactly where to place that and how to call it, for some reason I can't make it work, I want to have a community bot that once he upvotes a post he will resteem it, I tryed to add that inside the voting code, so once he votes, he will resteem after but I could not make it work.
Thanks in advance.

@TwinkieWInkie
Copy link
Collaborator

Library is called SteemJS.

AND JESUS FUCKING INFO PLEASE.
Oh shit does not work doesn't fucking cut it
@AdyWasHere

@AdyWasHere
Copy link

Why so angry out of nowhere? I was just asking where should place the code you wrote above, inside @p0o 's code to make the resteem option available. I never used JS before, I tried making a function inside randowhale.js and call it after but that did not work, I tried adding it inside the responder.js and call it after the vote in randowhale.js but that did not work either.

@TwinkieWInkie
Copy link
Collaborator

I'll give you this courtesy, once.

Show us the errors and your script, and we'll show you how wrong it is :)

@TwinkieWInkie
Copy link
Collaborator

TwinkieWInkie commented Apr 15, 2018

If you want to make modifications to steem-bot:
git clone ..
cd ffs
npm install
do modifications in /src,
npm run build
Push to your own repo and npm install yourrepo in your project

@p0o
Copy link
Owner

p0o commented Apr 15, 2018

@AdyWasHere You can use his code inside any handler functions from SteemBot. You just need to know what event you need to trigger with SteemBot and do whatever you want inside the handler functions. Just make sure to install the steem package from npm and put this on top of your code:

import steem from 'steem';

Do so and if you had error put your full code with errors here so someone can help.

@TwinkieWInkie
Copy link
Collaborator

@p0o You can assign me on this one

@p0o p0o assigned p0o and unassigned p0o Apr 15, 2018
@p0o
Copy link
Owner

p0o commented Apr 15, 2018

@TwinkieWInkie Sure. I added you as a collaborator but cannot find your name in Assignees list. I think you need to create the issue yourself, or be a previous contributor. Strange tho...

@TwinkieWInkie
Copy link
Collaborator

I'll commit in a bit

@TwinkieWInkie
Copy link
Collaborator

TwinkieWInkie commented Apr 15, 2018

@p0o
FYI, Untested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants