luinix / enriquetor Goto Github PK
View Code? Open in Web Editor NEWBetter than the original
Better than the original
Take a look here: https://github.com/luinix/enriquetor/blob/master/slack/channel.rb#L42-L58
Because we are using async, adding an active wait blocks the thread so the control never goes back to the Slack client and the message is sent. Because of that, if you sleep the typing time, nothing is sent, and everything is sent in one go when you free the thread.
Because of that, I'm using the EventMachine
timers, so I setup a "timeline" of what should be sent and when, and then free the thread as soon as I finish. But that also means that, if the enriquetor gets triggered for a reply BEFORE it finishes saying its last bullshit, it just sends both replies at the same time, mixing the messages.
We should extract the timeline to an object that belongs to the channel, and that keeps all the timing correctly.
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.