Now, let's start your bot using the ease-discord-js package in a very simple way! Pay close attention to the code comments; they will explain what is being done in each line.
import { EaseClient } from"ease-discord-js"consteaseClient=newEaseClient("YOUR_TOKEN_HERE");// Setting the paths for the commands and componentseaseClient.set("commandsPath","./_test/commands"); // OptionaleaseClient.set("componentsPath","./_test/components"); // OptionaleaseClient.set("intents", []);// Setting default values for the components, you can also set them individuallyeaseClient.setDefault("button", {style:"Primary"}) // OptionaleaseClient.setDefault("modal", {title:"New Modal"}) // Optionalconstclient=easeClient.login();client.on('ready',async (client) => {console.log(`Logged in as ${client.user.tag}!`);});
Easy, right? After the setup, your bot will be online, showing the status "online" on Discord. Now, let's introduce how to create slash commands using the package.