@gcommands/plugin-votes

Check if user has vote

Usage no npm install needed!

<script type="module">
  import gcommandsPluginVotes from 'https://cdn.skypack.dev/@gcommands/plugin-votes';
</script>

README

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',
    dblToken: 'your top.gg authorization token',
    webhookToken: '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