How to use the kurasuta.ShardingManager function in kurasuta

To help you get started, weā€™ve selected a few kurasuta 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 dice-discord / bot / src / index.js View on Github external
logger.note("Using Stackdriver");
    profiler.start({
      projectID: "dice-discord",
      serviceContext: {
        service: "bot",
        version: packageData.version
      }
    });
  } else {
    logger.debug("No Google Cloud environment variable was found, not using Stackdriver");
  }
} else {
  logger.debug("Not in production, not using Stackdriver");
}

const sharder = new ShardingManager(join(__dirname, "dice"), {
  token: config.discordToken,
  respawn: process.env.NODE_ENV === "production",
  development: process.env.NODE_ENV === "development",
  client: DiceClient,
  clientOptions: {
    commandPrefix: config.commandPrefix,
    owner: config.owners,
    disableEveryone: true
  }
});

sharder.on("debug", logger.debug).on("ready", () => {
  logger.success("Clusters spawned");

  const webhookLogger = logger.scope("shard manager", "ready webhook");
  // Announce version being ready
github dice-discord / bot / src / index.js View on Github external
const { join } = require("path");
const stripWebhookURL = require("./util/stripWebhookURL");
const { WebhookClient } = require("discord.js");

logger.note(`Node.js version: ${process.version}`);
logger.note(`Dice version v${packageData.version}`);

if (config.sentryDSN) {
  sentry.init({
    dsn: config.sentryDSN,
    release: packageData.version,
    environment: process.env.NODE_ENV || "development"
  });
}

const sharder = new ShardingManager(join(__dirname, "dice"), {
  token: config.discordToken,
  respawn: process.env.NODE_ENV === "production",
  development: process.env.NODE_ENV === "development",
  client: DiceClient,
  clientOptions: {
    commandPrefix: config.commandPrefix,
    owner: config.owners,
    disableEveryone: true
  }
});

sharder.on("debug", logger.debug);

sharder
  .spawn()
  .then(() => {
github AdityaTD / PenguBot / src / main.js View on Github external
const { ShardingManager } = require("kurasuta");
const { join } = require("path");
const config = require("../config.js");
const PenguClient = require("./lib/structures/PenguClient");

const status = config.patreon ? "šŸ’Ÿ Thanks For Supporting - PenguBot.com - p!help" : "ā¤ p!donate for PenguBot Premium Access āž– p!help | PenguBot.com";

const sharder = new ShardingManager(join(__dirname, "PenguBot"), {
    token: config.token,
    client: PenguClient,
    clientOptions: {
        prefix: "p!",
        commandEditing: true,
        disableEveryone: true,
        regexPrefix: /^((?:Hey |Ok )?Pengu(?:,|!| ))/i,
        typing: false,
        disabledEvents: [
            "GUILD_SYNC",
            "CHANNEL_PINS_UPDATE",
            "USER_NOTE_UPDATE",
            "RELATIONSHIP_ADD",
            "RELATIONSHIP_REMOVE",
            "USER_SETTINGS_UPDATE",
            "VOICE_STATE_UPDATE",

kurasuta

A Custom discord.js Sharding Library inspired by eris-sharder.

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Popular kurasuta functions

Similar packages