Make development with disord.js v14 easier with direct-discord-bot
Install direct-discord-bot with npm js
npm install direct-discord-bot
To deploy this project from your main index.js file use
node .
Here is the most basic and simple discord bot without any commands being registerd
const {createClient, showClientInfo, setPresence} = require('direct-discord-bot')
const path = require('node:path');
const client = createClient(process.env.TOKEN, ['Guilds', 'GuildMessages']);
client.on('ready', () => {
showClientInfo(client.user.tag, client.guilds.cache.size, client.users.cache.size);
setPresence(client, 'online', 'WATCHING', 'Direct Discord Bots');
handleCommands(client, path.join(__dirname, 'commands'));
registerSlashGlobal(process.env.TOKEN, process.env.CLIENT_ID, path.join(__dirname, 'commands'));
});
To run this project, you will need to add the following environment variables to your .env file
TOKEN
CLIENT_ID
GUILD_ID