Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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(() => {
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",