
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
create-discordbot-app
Advanced tools
Create a discord bot project quickly using create-discordbot-app. The project has a handler of commands, events and components of discord.js, you can choose the version of the api you want to use.
start using:
npx create-discordbot-app
Create a command just by exporting a class in the command directory
// src/client/commands/staff/manage.ts
import { Command } from "@app/base/Command";
import { config } from "@src/index";
import { ApplicationCommandType, ColorResolvable, EmbedBuilder } from "discord.js";
export default new Command({
name: "Manage",
type: ApplicationCommandType.User,
async run(interaction) {
if (!interaction.inCachedGuild()) return;
const { member } = interaction;
const embed = new EmbedBuilder({
author: {
name: member.displayName,
iconURL: member.displayAvatarURL({extension: "png"})
}
});
if (member.permissions.has("Administrator")){
embed.setColor(config.colors.success as ColorResolvable)
.setDescription("you are an admin")
} else {
embed.setColor(config.colors.danger as ColorResolvable)
.setDescription("You are not an admin")
}
interaction.reply({embeds: [embed]});
},
})
Components defined directly in the command. Create a function for a discord.js component just using the customId
// src/client/commands/common/ping.ts
export default new Command({
name: "ping",
description: "reply with pong",
type: ApplicationCommandType.ChatInput,
async run(interaction) {
interaction.reply({content: "pong", components: [
new ActionRowBuilder<ButtonBuilder>({components: [
new ButtonBuilder({customId: "ping-button", label: "pong", style: ButtonStyle.Success})
]})
]});
},
buttons: {
"ping-button":(interaction) => {
interaction.reply({content: "ping"})
}
}
})
It is possible to create scheduled tasks to repeat continuously using node-cron and Task class
// src/client/tasks/daily/good-morning.ts
import { Task } from "@app/base/Task";
export default new Task({
name: "good-morning",
enable: false, // is currently disabled
display: "Good morning message",
// This website can help you create frequencies for node cron https://crontab.guru/
frequency: "0 6 * * *",
run() {
console.log("Good morning")
},
})
FAQs
Create a discord bot app
We found that create-discordbot-app 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.