1.0.3 • Published 4 years ago

commando-provider-faunadb v1.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

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