Skip to content

2) Configuration File

Oğuzhan edited this page Jul 21, 2022 · 2 revisions

Configuration file uses JSON format.

Properties

  • errors - Errors thrown by commands/events.
    • log: boolean - If this option is enabled it will log the message property of the errors thrown by commands/events.
    • log-details: boolean - If this option is enabled
    • save-details - This feature saves errors to files.
      • enabled: boolean - This option states the save-details option.
      • directory: string - This is the directory where the errors will be saved as a file.
      • file-format: string - This is the format of the files which will be used to save errors.
      • save-format: string - This is the format of the errors which will be used to save errors.
    • prefixCommands - Prefixed commands.
      • default-prefix: string - This can be used in auto.js which determines the prefix for prefixed commands.
      • directory: string - This is the directory where the prefixed commands will be located.
      • auto-reload - Auto reload for prefixed commands.
        • enabled: boolean - This option states the auto-reload option for prefixed commands.
        • interval: integer - This will represent the time between reloads in milliseconds.
        • log: boolean - If this is enabled it will log it if something got auto-reloaded or auto-unloaded.
    • slashCommands - Slash commands.
      • directory: string - This is the directory where the slash commands will be located.
      • auto-reload - Auto reload for slash commands.
        • enabled: boolean - This option states the auto-reload option for slash commands.
        • interval: integer - This will represent the time between reloads in milliseconds.
        • log: boolean - If this is enabled it will log it if something got auto-reloaded or auto-unloaded.
    • events - Events commands.
      • directory: string - This is the directory where the event will be located.
      • auto-reload - Auto reload for event.
        • enabled: boolean - This option states the auto-reload option for event.
        • interval: integer - This will represent the time between reloads in milliseconds.
        • log: boolean - If this is enabled it will log it if something got auto-reloaded or auto-unloaded.
    • language - Languages.
      • directory: string - This is the directory where the language will be located.
      • auto-reload - Auto reload for language.
        • enabled: boolean - This option states the auto-reload option for language.
        • interval: integer - This will represent the time between reloads in milliseconds.
        • log: boolean - If this is enabled it will log it if something got auto-reloaded or auto-unloaded.
    • config - Configuration file.
      • auto-reload - Auto reload for configuration file.
        • enabled: boolean - This option states the auto-reload option for configuration file.
        • interval: integer - This will represent the time between reloads in milliseconds.
        • log: boolean - If this is enabled it will log it if something got auto-reloaded or auto-unloaded.
    • printer - Printer.
      • print: boolean - This states the visibility of the printer.print action.
      • error: boolean - This states the visibility of the printer.error action.
      • info: boolean - This states the visibility of the printer.info action.
      • notice: boolean - This states the visibility of the printer.notice action.
      • warn: boolean - This states the visibility of the printer.warn action.
      • debug: boolean - This states the visibility of the printer.debug action.
    • experimental - Experimental features which we don't prefer you to touch if not needed.
      • command-run-method: string - This can be either "file" or "eval". File option will use files to run commands/events and eval option will use eval to run commands/events.
      • file-eval-remove: boolean - If this option is disabled and the command-run-method property is set to file the temp files for it won't be deleted.
      • update-check - Checks for updates.
        • enabled: boolean - This option states the update-check.
        • provider: string - This option will be used to fetch the latest release's information.
        • readline: boolean - If this is enabled it will wait for a key to be pressed after showing the update status.
      • dns-check: string - This server will be used for checking internet connection.
    • tmp: string - This is the directory where files will be created temporarily.
    • no-crash: boolean - If this option is enabled the process won't crash and log the error.
    • hide-token: boolean - If this option is enabled when the bot logs on to the Discord it will hide the token property from config.json.
    • token: string - This will be used to log in to Discord.

Type Explanations

boolean

This type can be either true or false. true can also be represented as 1 and false as 0.

number

This type can only be numerical and should be between -(2^53 - 1) and 2^53 - 1.

integer

This type's range is same as Number but cannot be a floating point.

string

This type a text.

Default Configuration File

Click me to view the default configuration file