MCPcopy Create free account
hub / github.com/RTByte/rtbyte / everything

Method everything

src/commands/Developer/Pieces/reload.js:44–59  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

42 }
43
44 async everything(message) {
45 const timer = new Stopwatch();
46 await Promise.all(this.client.pieceStores.map(async (store) => {
47 await store.loadAll();
48 await store.init();
49 }));
50 if (this.client.shard) {
51 await this.client.shard.broadcastEval(`
52 if (String(this.options.shards) !== '${this.client.options.shards}') this.pieceStores.map(async (store) => {
53 await store.loadAll();
54 await store.init();
55 });
56 `);
57 }
58 return message.sendLocale('COMMAND_RELOAD_EVERYTHING', [timer.stop()]);
59 }
60
61};

Callers 1

runMethod · 0.80

Calls 1

initMethod · 0.45

Tested by

no test coverage detected