Config

DJS Plus has a config which can be found and edited in "client.config"

index.js
// Imports
const { Client } = require("djsplus")

// Client
let client = new Client()

// Message Event
client.on("message", (message) => {
    if(message.content === "?ping") {
        return message.reply(`Pong! ${client.ws.ping}`)
    }
})

// Config
client.config = {
    prefix: "?", // Command Prefix      
    errorMessages: true, // Error Messages (such as commandnotfound)
    cmdsDir: "cmds", // Cmd directory (for command handler)
    trackStartMessageEnabled: true, // message for track start enabled
    trackStartMessage: "Now playing $TRACK_TITLE..." // message for track start (variables: $TRACK_TITLE: track title)
}

// Login
client.login("Your bot token")

Last updated

Was this helpful?