mirror of https://github.com/thaldrin/thaldrin.git
logging
This commit is contained in:
parent
253579265a
commit
ec7199b842
12
shard.ts
12
shard.ts
|
@ -1,12 +1,22 @@
|
||||||
import { ShardingManager } from "discord.js";
|
import { ShardingManager } from "discord.js";
|
||||||
import config from "./config";
|
import config from "./config";
|
||||||
|
import figlet from "figlet"
|
||||||
let Sharder = new ShardingManager('./build/index.js', {
|
let Sharder = new ShardingManager('./build/index.js', {
|
||||||
token: config.token,
|
token: config.token,
|
||||||
totalShards: "auto"
|
totalShards: "auto"
|
||||||
})
|
})
|
||||||
|
import chalk from "chalk"
|
||||||
|
import Logger from "./src/utils/logger";
|
||||||
|
|
||||||
|
if (!config.pkg.version.includes('dev')) figlet.text("caecus", { font: "Delta Corps Priest 1" }, (error, result) => { console.log(`${chalk.hex("#DEADED")`${result}`}\n${chalk.cyan`Thaldrin`} ${chalk.redBright`v${config.pkg.version}`}`) })
|
||||||
|
|
||||||
|
|
||||||
Sharder.on("shardCreate", async (shard) => {
|
Sharder.on("shardCreate", async (shard) => {
|
||||||
console.log(`Launched Shard #${shard.id}`)
|
Logger.info({
|
||||||
|
type: "event:shardCreate",
|
||||||
|
// event: "shardCreate",
|
||||||
|
message: `Launched Shard #${shard.id}`
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
Sharder.spawn()
|
Sharder.spawn()
|
Loading…
Reference in New Issue