Configuration options

Customize spark's behaviour.

Configuration for your bot

With configuration we mean configurating either the global behaviour, like for example default prefix(es).

We can also mean customizable options for certain servers only.

Editing the configurations

There are multiple ways to change the configuration file, the first one is to change options in your bot file:

    const Spark = require("sparkbots")
    Spark.start({
    prefix: "!",
    token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    option1: "value1" })

Another option is to edit it directly into the core (client.config.<property>)

You can also change it for 1 guild only, like this:

New: V0.1
guild.customConfig.prefix = ["!", "+"]

Or:

    var data = client.customConfig.get("id")
    data.prefix = ["!", "!!!"]
    client.customConfig.set("id", data)
  

Properties

You can also add your own properties, these are just the ones having built-in support

  • prefix

    beforehand in-code custom
    Type Array ( String )
  • ignoreBots

    beforehand in-code custom
    Type boolean
  • token

    beforehand in-code custom Required
    Type String
  • disabled

    beforehand in-code custom
    Type disableCache
  • clientOptions

    beforehand in-code custom
  • ownerID

    beforehand in-code custom
    Type Snowflake
    Default Bot app creator's id
  • embedColor

    beforehand in-code custom
    Type hexadecimal
    Default 0xffe13f
  • ignoreUpdate

    beforehand in-code custom
    Type Boolean / Array (string)
    Default null
  • first

    beforehand in-code custom
    Type boolean

Important

- The first property is only for internal usage, changing this could cause unexpected results.

- The prefix property can not be a string.

- EmbedColor means the color we used for the pre-built help and info commands, if you plan to override those, you can just leave them blank.

Methods

  • setPrefix( Prefix )

    beforehand in-code custom
    • Prefix

      Type String / Array( String )
  • clearPrefix()

    beforehand in-code custom
  • disable( Type, Name )

    beforehand in-code custom
  • enable( Type, Name )

    beforehand in-code custom