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

Buttons

The properties a button-file can have

File structure: Buttons Folder -> Category Folder -> -> Button File

module.exports = {
    // The MessageButton Options, customId is going to be its name
    button: {
        label: "help",
        customId: "help",
        style: "PRIMARY",
        disabled: false
    },
    // The permissions required by the client to click that button
    clientPermissions: null,
    // The permissions required by the client to click that button
    userPermissions: null,
    // This allows you to ignore the file in the loading process
    ignoreLoading: false,
    
    // The code to run that button
    run: ({interaction, client, tdhandler, user, member}) => {
        interaction.reply({
            content: "help I am under the water",
        })
    }
}
PreviousContext MenusNextEvents

Last updated 3 years ago

🔘