
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@sikora00/nestjs-slack-bot
Advanced tools
A module for Nest.js to handle incoming messages from slack as a commands.
Module for handling commands from Slack.
import { Module } from '@nestjs/common';
import { SlackBotModule } from '@sikora00/nestjs-slack-bot';
import { HelloSlackCommand } from './hello.slack-command';
@Module({
imports: [SlackBotModule.forRoot({ slackToken: 'yourSlackBotToken' })],
providers: [HelloSlackCommand],
})
export class AppModule {}
Create injectable Nestjs's service with @SlackCommandHandler decorator
import { Injectable } from '@nestjs/common';
import {
SlackCommand,
SlackCommandHandler,
SlackMessage,
SlackService,
} from '@sikora00/nestjs-slack-bot';
@SlackCommandHandler()
@Injectable()
export class HelloSlackCommand implements SlackCommand {
description: string = 'say hello to the Slack Bot';
type: string = 'hello';
constructor(private slack: SlackService) {}
async handler(command: string[], message: SlackMessage): Promise<void> {
return 'Hello! I am SlackBot';
}
}
Then send a massage with the first word hello
in any channel where the bot is invited.
Nestjs Slack Bot package has build in help
command handler. It displays list of all registered commands in format type: description
received from SlackCommandHandler class definitions.
To handle or modify incoming or response messages use SlackInterceptor.
@SlackInterceptor()
@Injectable()
export class HelloInterceptor implements ISlackInterceptor {
intercept(
message: SlackMessage,
next: CallHandler<any>
): Observable<any> | Promise<Observable<any>> {
return next.handle().pipe(
map((res) => {
if (res) {
return `Hello Maciej\n${res}`;
}
})
);
}
}
FAQs
A module for Nest.js to handle incoming messages from slack as a commands.
The npm package @sikora00/nestjs-slack-bot receives a total of 0 weekly downloads. As such, @sikora00/nestjs-slack-bot popularity was classified as not popular.
We found that @sikora00/nestjs-slack-bot 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.