How to use the discord-giveaways.launch function in discord-giveaways

To help you get started, we’ve selected a few discord-giveaways examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Androz2091 / AtlantaBot / events / ready.js View on Github external
/* DAILY SHOP FORTNITE */
        let fortniteShop = require("../utils/fortniteShop.js");
        fortniteShop.init(client);

        /* AUTO UPDATE DOCS */
        let autoUpdateDocs = require("../utils/autoUpdateDocs.js");
        autoUpdateDocs.update(client);

        // Start the dashboard
        if(client.config.dashboard.enabled){
            client.dashboard.load(client);
        }

        // Start update of giveaways
        let giveawaysOptions = { updateCountdownEvery: 15000, ignoreIfHasPermission: [ "ADMINISTRATOR" ], storage: require("path").resolve()+"/giveaways.json" };
        giveaways.launch(client, giveawaysOptions);

        // Update the game every 20s
        const status = require("../config.js").status,
        version = require("../package.json").version;
        let i = 0;
        setInterval(function(){
            let toDisplay = status[parseInt(i, 10)].name.replace("{serversCount}", client.guilds.size)+" | v"+version;
            client.user.setActivity(toDisplay, {type: status[parseInt(i, 10)].type});
            if(status[parseInt(i+1, 10)]) i++
            else i = 0;
        }, 20000); // Every 20 seconds

    }
}
github WFCD / genesis / src / eventHandlers / Ready.js View on Github external
setupGiveaways() {
    if (!games.includes('GIVEAWAYS')) {
      this.logger.debug('No init: giveaways. Feature flag disabled.');
      return;
    }
    giveaways.launch(this.bot.client, {
      updateCountdownEvery: 5000,
      botsCanWin: false,
      ignoreIfHasPermission: [],
      embedColor: '#748BD7',
      embedColorEnd: '#FF0000',
      reaction: 'πŸŽ‰',
      storage: `${__dirname}/giveaways.json`,
    });
    this.logger.info('Giveaways initialized!');
  }

discord-giveaways

A complete framework to facilitate the creation of giveaways using discord.js

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis