Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random delay #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Random delay #44

wants to merge 4 commits into from

Conversation

Gavitron
Copy link

@Gavitron Gavitron commented Jan 6, 2020

add an environment variable to provide a backoff for installations with a high-frequency of jargon in use.

regex = new RegExp jargon.join('|'), 'gi'

exports = module.exports = (robot) ->
robot.hear regex, (msg) ->
msg.send msg.random images
if !(Math.floor(Math.random() * frequency)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really cool @Gavitron but I think there's a typo here (extra ))... could you please update and I'll get this merged & shipped.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants