TDHandler
  • 👋TDHandler Guide
  • 🚀Get Started
  • Classes
    • ðŸ“ĶTDInstance
  • Methods
    • ✅init()
    • ðŸĪ–getClient
    • ðŸ—ĢïļgetChannel()
    • 📑log()
    • 📚createEmbed()
    • 🔃loadingVariables
    • 🔘getButton()
  • Organisation
    • 📄Changelog
    • 📋To-Do
  • Handling Files
    • ❗Commands
    • 🧑‍ðŸĶēContext Menus
    • 🔘Buttons
    • ⛹Events
  • 🔘Sending Buttons
Powered by GitBook
On this page
Edit on GitHub
  1. Handling Files

Commands

The Properties a command-file can have

File structure: Commands Folder -> Category Folder -> -> Command File

module.exports = {
    // The command-name
    name: "ping",
    // The command-description
    description: "pingi",
    // The command-options
    options: null,
    // Whether the command is in development or not
    development: false,
    // The cooldown of the command in seconds, default is 1 second
    cooldown: 1,
    // The permissions required by the client to perform that command
    clientPermissions: ["SEND_MESSAGES", "VIEW_CHANNEL"],
    // The permissions required by the user to perform that command
    userPermissions: ["VIEW_CHANNEL"],
    // This allows you to ignore the file in the loading process
    ignoreLoading: false,
    
    // The code to run that command
    run: ({interaction, client, tdhandler, user, member}) => {
        interaction.reply({
            content: "hi commander sir commander",
        })
    }
}
PreviousTo-DoNextContext Menus

Last updated 3 years ago

❗