
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A tiny wrapper around the Slack RTM API that provides methods to listen for and send slack messages.
A tiny wrapper around the slack RTM api.
A slack bot token and node 4.2+.
Hello World
var Tinybot = require('tinybot');
var bot = new Tinybot('mySecretSlackToken');
bot.say("Hello world"); // posts to #general by default
Basic listener
var Tinybot = require('tinybot');
var bot = new Tinybot('mySecretSlackToken');
bot.on('message', function(message) {
bot.say(`Message received: ${JSON.stringify(message)}`);
})
Filtered listeners
var Tinybot = require('tinybot');
var bot = new Tinybot('mySecretSlackToken');
// listen for only messages in a channel
bot.hears({channel: '#general'}, function() {
bot.say("I heard that!", '#general')
})
// rain on everyone's parade with regex matches
bot.hears({channel: '#general', text: /I love (.*)/}, function foo(message, matches) {
bot.say(`${matches[1]} sucks`);
})
// trolls anyone who posts in #random from an iPhone with nested matchers
bot.hears({channel: '#random', file: { name: 'Slack for iOS'}, function fooBar(message) {
bot.say("ooooh, fancy", '#random');
}})
// snooze one meeting with hearsOnce
bot.hearsOnce({channel: '#sales', text: /meeting/}, function() {
bot.say("let's circle back and put a pin in this. I'm gonna take a quick 5", '#sales');
})
bot.drop('foo*'); // deregister functions named foo and fooBar
bot.drop('*'); // deregister all listeners
FAQs
A tiny wrapper around the Slack RTM API that provides methods to listen for and send slack messages.
The npm package tinybot receives a total of 0 weekly downloads. As such, tinybot popularity was classified as not popular.
We found that tinybot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.