Giter Club home page Giter Club logo

porygon-bot's People

Contributors

almckinlay avatar not-an-aardvark avatar notraia avatar pkmnbumba avatar raia avatar snowphoenix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

porygon-bot's Issues

Cache user registration status

Currently, if a command requires an account to be registered, the bot has to ping NickServ every single time a user attempts to use the command. This can cause commands to be slow, or can cause commands to fail if the status check times out.

We can get around this by caching registered nicks. However, it can't be time-based, because an imposter could join immediately after a registered account quits. So the cache should only be maintained as long as the bot can confirm that the user has not logged out.

  • When a user uses a command, the bot checks if the user's nick is in the "known to be registered" cache. If so, authentication passes. Otherwise, the bot checks with NickServ as it does now, and writes to the cache if the response is successful.
  • If a user changes their nickname, the old nickname should be evicted from the cache.
  • If a user quits the network, their nickname should be evicted from the cache.
  • If a user leaves all of the channels where the bot is present, their nickname should be evicted from the cache. Note that this requires reference counting for all the users in the bot's channels.
    • Along the same lines, if a user uses a command by PM and is not in any of the bot's channels, their registration status should not be cached.
  • If the bot gets disconnected or quits the network, the cache should be cleared.

Send update when modqueue items are removed

Now that we no longer "ignore" things on modqueue, this should be reasonably easy. We keep getting people to say "r" or "a" when they do something on an item. We should ge tthe bot to do it instead.

Display the report reason

Not sure if it is doable using the reddit API, but it would be nice to have the report reason listed alongside the link to the comment/thread.

Add node module support

It would be great to allow pory bot to pull in commands from node modules.

This would allow us to more easily add commands that aren't going to be pushed into the core repository, and if you put something in that isn't published on npm it would even allow you to put secret commands that no one knows about, if anyone ever wanted to do that on a published version of pory bot. Would also allow us to pull out the reddit specific stuff and maybe turn this into a fully configurable bot more useful for more people.

Break up monoloth

I think it probably would be best if we broke it up into chunks based on feature (hi5, msg, etc). Would make it much easier to deal with.

Report/check for unflaired threads

Sometimes, threads don't get flaired due to Automod going down. We don't really have any way of knowing when this happens, unless someone reports it, or we happen to be browsing the sub.

Suggestion: Have Porybot pick up the slack so we don't have to worry about it.

If a thread is unflaired for 5 minutes, it's probably safe to assume Automod is down and isn't checking it, which means we'll have to flair it manually. We may also need to remove it for no flair set or no tag instead.

All we'd need is for Porybot to check for unflaired threads, and either notify us in IRC or report it (which will then generate an IRC notification). I'd prefer the latter, since that makes it available in modqueue if we miss the IRC notification. But the former would be alright with me too.

(This would be for both /r/pokemontrades and /r/svexchange.)

Limit tag spam

Currently, if we use the .tag command on a user with dozens of usernotes, all of them will get dumped into the IRC, but that's kinda spammy and not always needed. Sometimes we only need to check the most recent tags, and/or roughly how many total tags there are.

Suggestion: Only dump the most recent 4-5 tags into the IRC, followed by a "...and ## more usernotes. Use .tag /u/username -A to display all."

And of course, .tag /u/username -A (or some other syntax) would return all tags.


Also, on a similar note, I'd support allowing us to use the .tag command in PMs with Porybot.

Add reminder command

Possible example:

.remindme 5 hours post the thread

Questions:

  • Should people be able to set reminders for others or just themselves?
    • Semi-related: Do we treat it like a .msg in the db and just add a delivery time field for all messages, or should reminders be their own thing? (implementation detail)
  • .remindme 5 hours post the thread or .remindme in 5 hours to post the thread?

Add ability to post github issues

I'm lazy and can't be bothered coming to github to post a new issue whenever I think of one.

.issue flairhq "Add some cool new feature"
.issue porygon-bot "Add some cool new bot feature"

It will then reply with a link to the new issue.

License

I'm technically breaking the law by changing code right now. Can you add a license :-)

I would recommend Apache. If you agree with that, then just say so and I'll add it in the pull request I'm currently working on.

Hourly notifications of unanswered reports

We discussed this in IRC awhile ago. Since missed reports often go unanswered for awhile because people rely on Porybot instead of checking the modqueue manually, we might as well make it easy to catch up on missed reports the same way.

So I suggest that, every hour on the hour (or :30), the bot checks the modqueue of both /r/pokemontrades and /r/SVExchange to see if there are unanswered reports (probably excluding ignored reports). If there are, it leaves a message in IRC along the lines of:

[MODQUEUE ALERT] There are x unanswered reports in modqueue for /r/subreddit: https://www.reddit.com/r/subreddit/about/modqueue/

If both subs have unanswered reports, there'd be two lines.

Obviously, the content of the actual message doesn't matter much, as long as it gives a number of unanswered reports, and an easy link to the modqueue.

Maybe if there's only one report, it could just link to that one report instead of modqueue.

Easy modmail button

This was discussed awhile ago as well. The idea is basically a new command that looks something like:

.qmodmail "This thread is sketchy because reasons" https://www.reddit.com/r/pokemontrades/whatever

And that would generate a modmail that looks something like this: img

Authenticiation issues were brought up in IRC, but I think we could get around that by simply having it generate the modmail itself by modifying the URL and pasting that URL in IRC. Plus that way, we could add more details to the modmail or edit it before sending. The only issue there would be the fact that the URL would be pretty big, so maybe it'd have to use pastebin or something. Not sure what the best method for that would be.


Another idea that was discussed at the same time was having Porybot automatically reply to modmails containing links with a similar format to the above, which isn't a bad idea (aside from the potential infinite loops issue).

I'd probably still want the IRC command if we did that, though, so if anything I'd suggest doing both, if possible.

Send removed info posts to irc

It probably wouldn't create much more spam, and would allow us to easily approve info posts that are useful without the user having to modmail.

Add regression tests

It would be nice to not have to worry about breaking everything when making changes.

It's probably not necessary to set up a local IRC channel for this -- since the irc module exports an EventEmitter, we can probably emit events manually to spoof incoming IRC messages.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.