> For the complete documentation index, see [llms.txt](https://ephf.gitbook.io/discord-short/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ephf.gitbook.io/discord-short/terminal-commands-creating-a-bot/events.md).

# Events

Discord.Short comes with special events. These include:

* `MONGOCONNECT` -  When bot connects to MongoDB
* `IDLEPING` -  Whenever the Heroku anti-idle pings the server
* `ANTIIDLEREADY` -  When the anti-idle dummy server is online

you can add a function to an event like this:

```javascript
ds.on('EVENT', function() {
    // callback
});
```

you can also add Discord.js events by using the `bot` object:

```javascript
ds.bot.on('EVENT', function() {
    // callback
});
```
