@gcommands/plugin-votes
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

GCommands Plugin Votes

Official plugin for GCommands


NPM Banner


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

Package Sidebar

Install

npm i @gcommands/plugin-votes

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

14.4 kB

Total Files

11

Last publish

Collaborators

  • xhyrom