Database - Paultje52/SupaBotBase GitHub Wiki

When enabling the database, you can get, set or delete keys. It's set on bot.database, in commands/events/functions on this.main.database.

Get

let result = database.get("key");

Set

database.set("key", "value");

Delete

database.delete("key");

Key names

User data: user-<ID>, on a message on message.author.settings.
Guild data: guild-<ID>, on a message on message.guild.settings.
Errors: error-<ID>
The table used is SupaBotBaseData. This can't be changed without changing the source code!

Sqlite database

Access the database itself on the property db.

database.db.prepare("SELECT key FROM `SupaBotBaseData` WHERE `key` LIKE 'error-________'").get();
⚠️ **GitHub.com Fallback** ⚠️