1.0.4 • Published 2 years ago

@gcommands/plugin-votes v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Installation

Install with npm / yarn / pnpm:

npm install @gcommands/plugin-votes
yarn add @gcommands/plugin-votes
pnpm add @gcommands/plugin-votes
// index.js / LruCache Provider (recommended)
const { Plugins, GClient } = require('gcommands');
const { LruCacheProvider } = require('gcommands/dist/providers/LruCacheProvider');

const client = new GClient({
    database: new LruCacheProvider({ max: 200, maxAge: 3600000 });
})

require('@gcommands/plugin-votes').default({
    type: 'TOP.GG',
    apiKeys: 'your top.gg authorization token',
    serverAuthKey: 'random token for webhook'
})

Plugins.search(__dirname);

// command.js
const { Command } = require('gcommands');
const { VoteInhibitor } = require('@gcommands/plugin-votes');

new Command({
    inhibitors: [
        new VoteInhibitor({
            message: 'Your message if user must vote'
        })
    ]
    ...params
})

topggimage