Leaf
6.0
6.0
  • Welcome
  • Placeholders
    • Standard
    • Custom
  • Commands
    • Overview
    • Basic Types
      • Info
  • Discord
    • Bot
    • Embeded Message
Powered by GitBook
On this page
Edit on GitHub
  1. Commands

Overview

PreviousCustomNextBasic Types

Last updated 3 months ago

Dont want a command? Delete it from the file and run /leafreload. I mean, you can even remove the reload command if you want.

Things you can add to any command!

# [OPTIONAL] → Command Identifier
# You can remove any command from the configuration to disable it.
# The identifier will not affect the command, it can be named anything! :D
command_identifier:

    # [REQUIRED] → Command Type
    # The command type determines how the command will work.
    type: "info"
    
    # [OPTIONAL] → Command Toggle
    # Disable or enable the command.
    # The value defaults to true.
    enabled: true
    
    # [REQUIRED] → Command Name
    # The name of the command, for example:
    # /[name] [arguments]
    name: "name"
    
    # [OPTIONAL] → Command Aliases
    # Every command can have unlimited aliases.
    # Aliases are alternative command names that will execute the same command.
    aliases: ["name2", "name3"]
    
    # [OPTIONAL] → Command Syntax
    # Lets you override the default syntax.
    # The syntax is shown to the player when they input the
    # incorred arguments.
    syntax: "/[name]"
    
    # [OPTIONAL] → Command Description
    # The commands description. Mainly used
    # when the command is registered with a 
    # discord bot.
    description: "Used to run /[name]"

    # [OPTIONAL] → Command Permission
    # Every command can have permission to execute the command.
    # When this is not set, it will default to everyone.
    permission: "leaf.name"
    
    # [OPTIONAL] → Command Requirements
    # Add a permission requirement for different servers.
    require:
      # The requirements identifier.
      # This can be anything.
      "identifier":
        # The required permission.
        permission: "leaf.bypass"
        # The servers that the permission is required on.
        servers:
        - "ServerName"
    
    # [OPTIONA:] → Player Limit
    # Limit the number of times players can
    # execute the command. This feature requires
    # the database to be enabled.
    # No limit = -1.
    limit: -1
    
    # [OPTIONA:] → Player Cooldown
    # Add a command cooldown, to stop players from spamming
    # commands. This feature requires
    # the database to be enabled.
    # No cooldown = -1.
    # Cooldown is in milliseconds.
    cooldown: -1
😌
Page cover image