
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.
@diamondbot/core
Advanced tools
This is the starting point for creating awesome Discord bots.
npm install @diamondbot/core
Just instantiate the bot, make it login with your discord token and you are done!
// index.js
import { Bot } from '@diamondbot/core';
const bot = new Bot();
bot.login('YOUR_DISCORD_TOKEN');
The bot by itself has no commands. Take a look at our ever-expanding list of commands that you can add to the bot, or if you want some custom stuff you can easily build your own!
Let's make a command to get cat images (this is just an example, we already have a command for cats)
// commands/cat.js
import { ChatCommand } from '@diamondbot/core';
export default class CatCommand extends ChatCommand {
constructor () {
super({
name: 'cat', // This will be used as the name to invoke the command, eg: !cat
alias: 'cats' // As the name says it, this is an alias for the command, eg: !cats
});
}
async run ({channel}, [count]) { // Our command will be able to accept a parameter, eg: !cat 3
count = Number(count);
count = count > 1 ? count : 1;
for (let i = 0; i < count; i++) {
await channel.send('https://cataas.com/cat');
}
}
}
Done! Our command is created, now we have to tell about it to our bot, let's go back to our index.js file.
// index.js
import { Bot } from '@diamondbot/core';
import CatCommand from './commands/cat.js';
const bot = new Bot();
bot.addCommand(CatCommand);
bot.login('YOUR_DISCORD_TOKEN');
Now our bot is ready to fill our channels with cats!
Contributions are always welcome! Feel free to fix any bug you find or propose commands to add to the bot.
If you use this package please consider starring it :)
FAQs
Modular library to easily build discord bots
We found that @diamondbot/core 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.