radibit / js-tips-slack-bot Goto Github PK
View Code? Open in Web Editor NEW:incoming_envelope: Slack Bot for getting the latest JS Tips
License: MIT License
:incoming_envelope: Slack Bot for getting the latest JS Tips
License: MIT License
Hi!
I got this message when i try to clone this repo: "Permission denied (publickey). fatal: could not read from remote repository".
Thanks for your answer
Hey @radibit !
Right now I'm testing on my local machine and I can't send any message to Slack. Everything is fine, I can get the data from GitHub. It just won't send to Slack.
I found out that the reason is the open
event is fired when websocket connection is open and ready to communicate (which is when a bot is successfully created). And a postMessageToGroup
is bind to the open event.
bot.on( 'open', function() {
...
bot.postMessageToGroup( process.env.SLACK_GROUP, jsTipMessage, params );
} );
which is inside ghget
callback.
So, when a bot is successfully created, open
event is fired, there's still nothing binding to that event. (There's still no response from GitHub so a callback still not fired). And the open
event is never fired again because the bot is only created once.
I'm pretty sure it works just fine last night, but I don't really know why. (Maybe because Slackbot was created slower than GitHub response, I'm trying this on another network from last night.) So I'm wondering if you got the same problem as mine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.