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
.
let result = database.get("key");
database.set("key", "value");
database.delete("key");
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!
Access the database itself on the property db
.
database.db.prepare("SELECT key FROM `SupaBotBaseData` WHERE `key` LIKE 'error-________'").get();