Skip to content
This repository was archived by the owner on Dec 24, 2021. It is now read-only.

Commit f4404a4

Browse files
authored
update sqlite db example in docs (#365)
1 parent 614dd95 commit f4404a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/general/first-steps.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ client.registry
3838
Commando has built-in command prefix configuration per-guild, as well as enabling and disabling commands per-guild.
3939
In order for this to persist across restarts, you should use a [SettingProvider](https://discord.js.org/#/docs/commando/master/class/SettingProvider).
4040
There is a built-in SQLiteProvider that comes with Commando, which stores all settings in an SQLite3 database.
41-
To use it, install the `sqlite` module with NPM (`npm install --save sqlite`). Then, set the provider on the client:
41+
To use it, install the `sqlite` and the `sqlite3` module with NPM (`npm install --save sqlite sqlite3`). Then, set the provider on the client:
4242

4343
```javascript
4444
const sqlite = require('sqlite');
45+
const sqlite3 = require('sqlite3');
4546

4647
client.setProvider(
47-
sqlite.open(path.join(__dirname, 'settings.sqlite3')).then(db => new Commando.SQLiteProvider(db))
48+
sqlite.open({ filename: 'database.db', driver: sqlite3.Database }).then(db => new Commando.SQLiteProvider(db))
4849
).catch(console.error);
4950
```
5051

0 commit comments

Comments
 (0)