How to use kurasuta - 3 common examples

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 9 months ago

Package Health Score

61 / 100
Full package analysis

Popular kurasuta functions

Similar packages