commando-provider-faunadb

1.0.3 • Public • Published

Commando FaunaDBProvider

About

Commando is the official framework for discord.js. To make connected your Faunadb to your bot a bit easier I "remade" the sqliteProvider from the framework to use FaunaDB.

Installation

This installs the faunadb package and this package.

# With NPM
npm install --save faunadb commando-provider-faundb

Usage

Below is an example on how to use it with faunadb (recommended).

Creating a new provider will create a new collection called guilds in your database and also create a new index guild_by_id.

  • The collection is to store all the data.
  • The index is so that we can query based on the guilds id do not have to store the id given by FaunaDB.
const { Client } = requrie('faunadb');
const FaunaProvider = require('commando-provider-faunadb');

...

client.setProvider(
  new FaunaProvider(new Client({ secret: '<you-secret-database-key>' }))
);


...

License

MIT © XanderD99

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i commando-provider-faunadb

      Weekly Downloads

      1

      Version

      1.0.3

      License

      ISC

      Unpacked Size

      9.57 kB

      Total Files

      4

      Last publish

      Collaborators

      • xanderd99