-
Notifications
You must be signed in to change notification settings - Fork 106
Bot replies to same Tweet every time script runs #8
Comments
Can I see your whole script?
|
Sure thing! #!/usr/bin/env ruby
require 'rubygems'
require 'chatterbot/dsl'
verbose
replies do |tweet|
reply "Hi #USER#, thanks for your interest.", tweet
end |
When you run this, do you get any errors? Also, are you using a database to store your config or is it in a YAML file? |
I don't get any errors. I'm not storing my config anywhere - should I? |
Yeah, I'm actually confused as to what is happening here. I just tested your code, and it runs fine with a proper config (see https://twitter.com/echoes_bot/status/247765604021465088 for the tweet). I would recommend that you run chatterbot-register and create a new bot from scratch, and see if that helps. |
@muffinista I have this same problem. I assume it's because the bot's config isn't written to file or DB like you said above. How would I configure that? (Sorry if this is a standard Ruby thing - not new to programming, but new to Ruby) EDIT: Got it working. In case anyone in the future is in my position, here's what worked.
You should see some output like "storing config to database -- you don't need local file anymore" (Note that you'll still need the .yml file to tell it the db_uri, otherwise it'll prompt for API_KEY and such all over again) |
Glad you got it working! I actually removed db support in the 2.0 version of chatterbot -- it was difficult to use and maintain. |
@muffinista Neat! Does it persist to the YML file in 2.0? I'd actually prefer that IMHO, just couldn't see how to get that working. |
How do I make sure the bot doesn't reply to the same tweet every time?
The following loop replies to tweets it has already replied to each time the script runs.
The text was updated successfully, but these errors were encountered: