Comments (4)
I'd argue because it's not possible to do this automatically with any reliability that trying to do it automatically will create a very confusing user experience -- "why hasn't the bot updated the conversion when I edited my comment but it did for another comment I saw? How do I make it update?".
The problem of edited comments is meaningful enough to try and solve, but I don't think it's a big enough problem to justify the introduction of a solution that has so many caveats.
Given the bot already has support for receiving Private Messages which trigger an action, perhaps an additional trigger for updating a reply would be the correct approach as it would provide a consistent experience for all users. A "refresh reply" link in the footer of each reply to a new message where the subject is "refresh" and the body is the comment ID that any user can send to the bot when they notice a mismatched comment/conversion.
I would like to try implementing that solution if there aren't any problems I've missed -- is rate limiting important to prevent malicious users from crashing the bot by sending lots of refresh requests? Does the reddit API have limits that will prevent the bot from updating comments?
from metric_units_reddit_bot.
Given the limitations of the reddit API, I agree, I don't think we can come up with a foolproof automated solution. Perhaps a human-solution is the way to go. I like the idea of a link that says "refresh"! I feel like we might have to cut down on number of links in the footer though (maybe source and hacktoberfest can go) ... but I digress, that's a completely different issue.
It'd be awesome if you could pick up this issue @citricsquid! Assigning to you :)
So, from my past research: the reddit API limits bot scripts to ~100 requests per minute, and it allows for periods of "burstiness" of up to 200 requests per minute. Right now the bot is doing a maximum of maybe ~10 requests per minute (since polling for new comments is "free", from an unauthenticated endpoint). I don't forsee API limits being an issue for a delete link
BUT if you do go over the limit, reddit puts your bot on "cool down" for 10 minutes where it ignores your request. If your bot goes rogue (consistently going over the rate limit) reddit might start permanently rejecting your user agent string to prevent abuse. It's easy to change its user agent string though, so you can release the next version of your bot (with the rate limit problem fixed, hopefully) and reddit will start accepting your requests again
from metric_units_reddit_bot.
Simplest solution might be to re-check last, say 100 comments, so that would probably make sure any edited comments within 10 minutes of creation or so have a correct response.
from metric_units_reddit_bot.
The "edit" functionality is working now, pretty sweet! I also give it a little "edit" prefix.
There was a messed up thing in the base get
call that unwrapped responses & caused problems (heh, my bad).
from metric_units_reddit_bot.
Related Issues (20)
- Refactor number parsing HOT 1
- Bug report: Add ignore keywords to "cups" for gaming sub reddits
- Feature request: Add unit `qt` = 1/4 gallon HOT 3
- Range conversion "30-50lb" converted to "30 lb50 lb ≈ 1423 kg"
- Scan the r/homebrewing thread and post constructive feedback in r/metric_units HOT 2
- Move documentation to /docs folder HOT 5
- bot off HOT 1
- Discussion - Discussions HOT 2
- Handle commas better HOT 16
- Always add L/100km conversion
- "oz" is not being converted to "troy oz" in subreddit /r/Pmsforsale HOT 27
- Ignore all nba subreddits for mpg HOT 10
- Ignore "cup" measurements over 100 HOT 2
- Feature request: Convert lbs/inch to kg/mm and N/m HOT 4
- Handle close numbers better HOT 1
- Conversions architecture overhaul
- Modify pressureMap to convert 10^5 pa to bar HOT 4
- Improve rounding HOT 4
- Bot should sass users who edit their comments to remove values HOT 7
- change footer links and text HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metric_units_reddit_bot.