
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Niboh is a library that provides powerful collectors for Discord Bots made using Discord.js library.
Niboh is a library that provides powerful collectors for Discord Bots made using Discord.js library.
It allows you to collect almost every type of information, from a ButtonInteraction to a TextInput (message sent in the specified channel)
yarn add niboh
npm install niboh
pnpm install niboh
import { ButtonSelectCollector } from 'niboh'
const messageComponents = [
new ActionRowBuilder<ButtonBuilder>().setComponents(
new ButtonBuilder()
.setCustomId('cool-id')
.setLabel('Confirm')
.setButtonStyle(ButtonStyle.Success)
)
]
const message = await someCoolInteraction.reply({
fetchReply: true,
components: messageComponents
})
const buttonSelectCollector = new ButtonSelectCollector({
location: message.channel,
target: someCoolInteraction.user
})
const buttonInteraction = await buttonSelectCollector.setProps({ message }).run()
if (buttonInteraction) {
buttonInteraction.reply({ content: 'Confirmed!' })
}
Make sure to understand that the only part of the library that is actually being used is here
const buttonSelectCollector = new ButtonSelectCollector({
location: message.channel,
target: someCoolInteraction.user
})
const buttonInteraction = await buttonSelectCollector.setProps({ message }).run()
if (buttonInteraction) {
buttonInteraction.reply({ content: 'Confirmed!' })
}
the rest is only a example of message sent with some components to be collected :)
You can combine collectors to run at the same time, but how can it be useful? You might want to run a ButtonCollector with a TextInputCollector, for example, imagine you want to ask a user to confirm an operation, so the user can confirm by clicking or writing a specific text.
import { ButtonSelectCollector, TextInputCollector, CombineCollectors } from 'niboh'
const buttonSelectCollector = new ButtonSelectCollector({
location: message.channel,
target: someCoolInteraction.user
}).setProps({ message })
const textInputCollector = new TextInputCollector({
location: message.channel,
target: someCoolInteraction.user
}).setProps({ pattern: /^confirm$/ })
const combinedCollectors = new CombineCollectors([
buttonSelectCollector,
textInputCollector
])
const result = await combinedCollectors.run()
if (result.isButtonSelectInteraction()) {
const buttonInteraction = result.value
// ^ ? = ButtonInteraction | null
}
if (result.isTextInput()) {
const textInput = result.value
// ^ ? = string | null
}
FAQs
Niboh is a library that provides powerful collectors for Discord Bots made using Discord.js library.
We found that niboh 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.