Module: Database - Paultje52/BananenBase GitHub Wiki

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!

Configuration

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.

Example

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
});