This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Module: Database
Paul edited this page Jul 17, 2020
·
3 revisions
With the database module, you can add a database system to your Discord bot!
In this database, you can store your author and guild settings!
The options that the database module wants needs to be in an object
Key | Required | Default | Value type | Description |
---|---|---|---|---|
name | Yes | X | String | The name of the database, without an extention |
development | No | false | Boolean | When it's true, the module uses a JSON database for easy editing. In the public bot, you should set this to "false" for a sqlite version |
guildSettings | No | {} | Object | The default settings for each guild |
userSettings | No | {} | Object | The default settings for a user |
inMemory | No | false | Boolean | If the databases needs to be loaded in the memory. When it is, the bot is faster, but for large bots, it can course issues. |
Addes the database module with the options
myBot.addModule("database", {
name: "database",
development: true, // JSON database for easy development
guildSettings: {
prefix: "!", // Works with command handler
restrictedChannel: false
},
userSettings: {
balance: 100
},
inMemory: true // Makes it faster for small bots
});
©BananenBot 2017-2020 - all rights saved