> For the complete documentation index, see [llms.txt](https://titon-design.gitbook.io/bubble-engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://titon-design.gitbook.io/bubble-engine/get-started/readme.md).

# Installation

### Downloading NPM package

First, download Bubble-engine NPM package using this command:

```bash
npm install -g bubble-engine
```

{% hint style="info" %}
**Note:** Please install Bubble globally as showed above to make sure that everything will work properly.
{% endhint %}

After installing package, create file named `bubble-config.js` in your project root folder and paste this code:

```javascript
module.exports = {
    PROJECT_DIR : __dirname
}
```

### Configuration

Use `bubble config` to configure bot and download required files. If "bubble" is not recognized as command in your terminal, try:

* check if package is installed globally
* type `npm link bubble-engine`
* reinstall package
* if you are still getting this error, please open issue on GitHub.

### bubble config

After using this command you should see a Bubble Engine Config in terminal. Please fill all required fields (bot name and token is required, others are optional). After successful configuration in terminal will appear question: `Do you want to proceed installation? (Y/n)`

* Click ENTER or Y on keyboard to save configuration and continue installing files
* Click N to abort configuration

If you choose to continue, Bubble created `src` folder in your project root directory (your root directory is defined by `bubble-config.js` location). You should see something like this:

```javascript
src
> cmds
> > ping.cmd.js
> events
> > ready.event.js
> config
> > config.js
```

Everything is ready! Use `bubble start` to start your bot. Test your bot using default installed command `ping`.

**Note:** If you are getting error: `DiscordAPIError: cannot send empty message` install older discord.js version (below v.13 - we recommend v.12.5.3) using this command:

```bash
npm install discord.js@12.5.3
```

We will try rewrite Bubble Engine to latest discord.js as soon as possible.
