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

    1.0.1 • 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',
        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

    Install

    npm i @gcommands/plugin-votes

    DownloadsWeekly Downloads

    9

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    9.38 kB

    Total Files

    8

    Last publish

    Collaborators

    • xhyrom