mirror of
https://github.com/danbulant/Shasha
synced 2026-05-19 03:58:38 +00:00
cancelled reowrk!
This commit is contained in:
parent
68fba58d9c
commit
a2d7f8d3f5
4 changed files with 6 additions and 6 deletions
2
Main.js
2
Main.js
|
|
@ -21,6 +21,7 @@ const { join } = require('path');
|
|||
const getColor = require("./resources/getColor");
|
||||
const requireAll = require("require-all");
|
||||
const { chatAnswer } = require("./resources/shaChat");
|
||||
const { init } = require("./cmds/moderation/src/createSchedule");
|
||||
|
||||
const lgr = requireAll({ dirname: join(__dirname, "resources/eventsLogger"), recursive: true });
|
||||
client.functions = requireAll({ dirname: join(__dirname, "resources"), recursive: true });
|
||||
|
|
@ -51,6 +52,7 @@ client.on('ready', async () => {
|
|||
//console.log(`Member in ${shaGuild.length} guilds.`);
|
||||
//const statusChannel = client.channels.cache.get(configFile.statusChannel);
|
||||
console.log(client.user.tag + ' logged in!');
|
||||
init(client);
|
||||
});
|
||||
|
||||
client.on("message", async msg => {
|
||||
|
|
|
|||
|
|
@ -52,4 +52,4 @@ async function init(client) {
|
|||
jobManager.start();
|
||||
}
|
||||
|
||||
module.exports = { createSchedule }
|
||||
module.exports = { createSchedule, init }
|
||||
|
|
@ -3,8 +3,7 @@
|
|||
const Bree = require("bree");
|
||||
const cabin = require("cabin");
|
||||
const { Client } = require("discord.js");
|
||||
const { errLog, trySend } = require("./functions"),
|
||||
{ schedulerLog } = require("../config.json");
|
||||
const { errLog } = require("./functions");
|
||||
|
||||
/**
|
||||
* @param {Client} client
|
||||
|
|
@ -13,9 +12,7 @@ const { errLog, trySend } = require("./functions"),
|
|||
*/
|
||||
function scheduler(client, jobs = []) {
|
||||
return new Bree({
|
||||
logger: (data) => {
|
||||
return trySend(client, schedulerLog, data);
|
||||
},
|
||||
// logger: new cabin,
|
||||
root: false,
|
||||
jobs: jobs,
|
||||
workerMessageHandler: ({ message }) => {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ Structures.extend("Guild", u => {
|
|||
console.log(r.timedPunishments[U]);
|
||||
const tr = new TimedPunishment(r.timedPunishments[U]);
|
||||
tr.setDataDuration(tr.duration.invoked, tr.duration.until);
|
||||
timedPunishments.set(this.id + "/" + tr.userID + "/" + tr.type);
|
||||
}
|
||||
r.infractions = infractions;
|
||||
r.timedPunishments = timedPunishments;
|
||||
|
|
|
|||
Loading…
Reference in a new issue