vindimy / altcointip

Reddit ALTcointip bot gives users ability to tip each other using various cryptocurrency coins, such as Bitcoins, Litecoins, Peercoins, Namecoins, and others.
http://www.reddit.com/r/ALTcointip/wiki/index
GNU General Public License v2.0
106 stars 143 forks source link

Bot ignores tips made while it's processing #26

Closed ghost closed 10 years ago

ghost commented 10 years ago

I've noticed that the bot will completely skip any tips made while it's actively processing requests. I'm pretty sure this is due to the bot passing x checkpoint right at the time the tip request is made by the user. I'm not really sure what can be done to improve the bot's performance in catching all requests, but it seems to miss a lot of them.

vindimy commented 10 years ago

Hm, I'm not sure what you mean by "passing x checkpoint". AFAIK the bot doesn't skip any tips that make it to its inbox, since it only marks message as "read" after it processes it. Perhaps what happens is it doesn't match the tip as having valid syntax?

The bot's loop is basically: check inbox, for each unread message (process message), mark message as read, sleep, repeat.

ghost commented 10 years ago

You're right, it does sound like it should be foolproof, but copy/pasting the same syntax can work 50% of the time, especially if there are many tips within the same 10-20 seconds, for example.

I thought it might be a case of the bot needing to "catch up" to its messages, but then it has no issue with the following tips, it just skips some completely.

Another issue is that the bot will run through one loop then crash if you shut it down then don't delete the last_processed_comment_time key from the database before starting it again.

Example of tips getting ignored: http://www.reddit.com/r/litecoin/comments/1wjtdq/welcome_to_litecoin_please_take_a_look_inside_if/

vindimy commented 10 years ago

Ah, I see, these issues are specific to the subreddit scanning function. Yes, I'm actually aware that the subreddit scanning isn't perfect and depends on "luck" too much. This is why I switched to Reddit's mention feature (where each tip ends up in bot's inbox). The subreddit scanning function isn't maintained anymore since ALTcointip bot doesn't use it - it's there for historical reasons.

ghost commented 10 years ago

The bot has very minimal documentation, so I have no way of knowing how to set it up to run more effectively. How do I disable that feature or ensure that the bot uses the more correct method for handling tips?

vindimy commented 10 years ago

Yes, documentation is a bit scarce :) But, if you use the default settings in conf-sample/reddit.yml under scan section (no my_subreddits and no these_subreddits specified) then the bot will only check its inbox for incoming tips. Then all you need is to get Reddit Gold for bot's account, after which any bot username mentions (+/u/botusername) will end up in its inbox.

ghost commented 10 years ago

I see, that's a bit horrible, but I guess I can get people to donate to give the bot premium status. Thanks very much.

mathwizard1232 commented 10 years ago

Vindimy, I'll comment here since it seems like GitHub doesn't have a direct user-contact function strangely enough (I never used it enough before to notice). Would you like some help with general maintenance? I've got some idle time now and then and I particularly like 'housekeeping' like improving documentation on good (and running) code, so I think I could help out here.