Dismord is a simple but awesome NodeJs build tool.
It can help you create a DiscordJs project quickly and faster.
With npm:
$ npm create dismordWith yarn:
$ yarn create dismordWith pnpm:
$ pnpm create dismordInstall and answer the questions at the terminal.
Change the path to your project:
$ cd PROJECTPATHInstall the packages your project needs:
$ npm installEnter bot ID and TOKEN in .env file:
ID=123456789012345678
TOKEN=IWILLNERVERSHOWYOUMYTOKENLOLRun your bot:
$ npm run botCreate myname.js file in cmds folder.
Require slashCommandBuilder:
// 13.6.0
const { SlashCommandBuilder } = require('@discordjs/builders');
// 14.4.0
const { SlashCommandBuilder } = require('discord.js');Add module.exports:
// 13.6.0
const { SlashCommandBuilder } = require('@discordjs/builders');
// 14.4.0
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
};Create a new slashCommandBuilder, then set its name and description:
// 13.6.0
const { SlashCommandBuilder } = require('@discordjs/builders');
// 14.4.0
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder().setName('myname').setDescription('what is my name')
};Add an interaction:
// 13.6.0
const { SlashCommandBuilder } = require('@discordjs/builders');
// 14.4.0
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder().setName('myname').setDescription('what is my name'),
async execute(interaction) {
}
};Reply the user.tag of asker:
// 13.6.0
const { SlashCommandBuilder } = require('@discordjs/builders');
// 14.4.0
const { SlashCommandBuilder } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder().setName('myname').setDescription('what is my name'),
async execute(interaction) {
interaction.reply({ content: interaction.user.tag });
}
};You can just delete myname.js file in cmds folder.