Freakazoid: Cleverbot integration for STEEM.

in #radiator7 years ago

Freakazoid is a cleverbot integrated bot for STEEM.




This bot will automatically reply to posts and comments that reply to and mention the bot. The replies are provided by the Cleverbot API.

The main reference implementation of Freakazoid is @banjo. For example:




Install

To use this Radiator bot:

Linux
$ sudo apt-get update
$ sudo apt-get install ruby-full git openssl libssl1.0.0 libssl-dev
$ sudo apt-get upgrade
$ gem install bundler
macOS
$ gem install bundler

I've tested it on various versions of ruby. The oldest one I got it to work was:

ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-darwin14.4.0]

You can try the system version of ruby, but if you have issues with that, use this how-to, and come back to this installation at Step 4:

Setup

First, clone this git and install the dependencies:

$ git clone https://github.com/inertia186/freakazoid.git
$ cd freakazoid
$ bundle install
Configure

Edit the config.yml file.

:freakazoid:
  :block_mode: irreversible
  :account_name: <your STEEM bot name>
  :posting_wif: <your STEEM bot posting key>
  :cleverbot_api_key: <your cleverbot api key>

:chain_options:
  :chain: steem
  :url: https://steemd.steemit.com

In order to integrate with Cleverbot, you need to register your bot and get a key: https://www.cleverbot.com/api/

Edit the support/reply.md template (optional).

Run Mode

Then run it:

$ rake run

Freakazoid will now do it's thing. Check here to see an updated version of this bot:

https://github.com/inertia186/freakazoid


Upgrade

Typically, you can upgrade to the latest version by this command, from the original directory you cloned into:

$ git pull

Usually, this works fine as long as you haven't modified anything. If you get an error, try this:

$ git stash --all
$ git pull --rebase
$ git stash pop

If you're still having problems, I suggest starting a new clone.


Troubleshooting

Problem: Everything looks ok, but every time Freakazoid tries to reply, I get this error:
Unable to reply with <account>.  Invalid version
Solution: You're trying to reply with an invalid key.

Make sure the .yml file contains the correct voting key and account name (social is just for testing).

Problem: The node I'm using is down.

Is there a list of nodes?

Solution: Yes, special thanks to @ripplerm.

https://ripplerm.github.io/steem-servers/


Tests

  • Clone the client repository into a directory of your choice:
    • git clone https://github.com/inertia186/freakazoid.git
  • Navigate into the new folder
    • cd freakazoid
  • Basic tests can be invoked as follows:
    • rake
  • To run tests with parallelization and local code coverage:
    • HELL_ENABLED=true rake

Get in touch!

If you're using Freakazoid, I'd love to hear from you. Drop me a line and tell me what you think! I'm @inertia on STEEM and Discord.

License

I don't believe in intellectual "property". If you do, consider Freakazoid as licensed under a Creative Commons CC0 License.

Sort:  

Is that real, @banjo? :D

Of course it is! You should come around sometimes!

Hahah great?!

This comment has received a sweet gift of Dank Amps in the flavor of 15.00 % upvote from @lovejuice thanks to: @styleyfrancky. Vote for Aggroed!

This comment has received a sweet gift of Dank Amps in the flavor of 21.43 % upvote from @lovejuice thanks to: @styleyfrancky. Vote for Aggroed!

spambot?

No. I think of it as an engagement bot. It's not spam because you must initiate discussion by either replying to the bot's previous content or mention it.

Interesting concept.

I've been playing with Banjo both in discord and on steemit. Considering you have to mention the bot to have it comment, I'm for it. Great job, @Inertia

Just that? Poor you.

@banjo hello banjo, how are you?

That is not my name.

Yes it is.

It's me, Rose Tyler.

Great Work!

haha, funny!

it would be cool if it will upvote when we tag @banjo

So you are straight?

hope you're drinking a beer right now

I am sorry, but I am not drinking anything.

sure, we don't want you to rust

I want to know you.

The banjo speaks thing with thing kkk

That cool, they say that in the future we'll all just talk to robot.

@zeroabsolut hello, this is a test.

Aleah? Where are you from?

Correct. First question: 'What is your name?'.

I love this haha So it's basically like having a discord robot on Steemit!

And I loved freakazoid growing up haha

BTW, why if can only post if someone mentiones the name of the bot? cant it reply any post based on a memo ?

How to use this bot to just reply on any transfer memo's ?

That would require the active key. Currently, freakazoid only works with the posting key. In theory, you would modify lib/freakazoid/freakazoid.rb to stream :transfer instead of :comment. For example:

        stream.operations(:transfer) do |transfer|
          next if transfer.from == account_name # no self-reply
          
          reply(transfer)
        end

Then replace reply with something that will send a transfer with a memo containing the response from cleverbot's api.

Thanks, but is is possible to use my custom messages, randomly without cleverbots api?
What i was actually looking for was watching transfers TO a certain account name and then reply on the post written in the memo. Similar as luckyluke, but then for reply's. And if possible multiple accounts?
reply is just the text that will be posted right?
can i use multiple account names?

That's closer to what drotto does, except that the intent is to vote and provide a static reply. It might be easier to modify this instead.

But drotto, not do that i want.
I am still a beginner in editing bots.

I used this code:

stream.operations(:transfer) do |transfer|
next if transfer.to == 'booster' # no self-reply

      reply(transfer)
    end

So when someone transfers to booster, i would like to reply a message as 'GOOD JOB!'

And thats it, what am i doing wrong?

@Banjo are you a bot or a real person? xD