hangops / hangops-jobbot

A bot for Hangops #job_board channel
6 stars 10 forks source link

Disable spammy commands #43

Closed claytono closed 7 years ago

claytono commented 7 years ago

At a minimum disable public help. It should go to a private message. Probably should also turn off things like pugbomb and corgibomb.

cite-reader commented 7 years ago

It turns out that most commands aren't part of the codebase proper; they're modules, registered in external-scripts.json. That means that to turn off or rate-limit corgi bomb (for example), we'll need to pull the plugin in question into our scripts directory and write the patch ourselves.

sntxrr commented 7 years ago

In the currently running bot, I yanked most of them out.

I think the rate limiting probably ought to be a middleware layer - possibly storing things in the redis "brain".

sntxrr commented 7 years ago

We already patch the middleware (due to a bug) https://github.com/rrxtns/hangops-jobbot/blob/master/cookbooks/hangops-jobbot/recipes/default.rb#L60 - we could easily build in some rate limiting.. I took a crack at it and failed miserably earlier this week. 😭

cite-reader commented 7 years ago

UM

sntxrr commented 7 years ago

@rnelson0 submitted a PR that was approved that should make the bot trigger less often. I also started a PR on rate limiting commands: https://github.com/rrxtns/hangops-jobbot/pull/52

All of the unnecessary fluff has been yanked already. Leaving this open until we implement rate limiting properly.

sntxrr commented 7 years ago

The PR I mentioned above is now what the "prod" bot is running. Going to close in favor of https://github.com/rrxtns/hangops-jobbot/issues/55