@gcommands/plugin-votes
v1.0.4
Published
Check if user has vote
Downloads
9
Maintainers
Readme
GCommands Plugin Votes
Official plugin for GCommands
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
})