mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 22:05:10 +00:00
fix: istg
This commit is contained in:
parent
33b7bab78c
commit
576ff5d0f7
1 changed files with 45 additions and 41 deletions
86
src/index.ts
86
src/index.ts
|
|
@ -49,10 +49,54 @@ app.nocodb = new Api({
|
|||
});
|
||||
attachDB(db);
|
||||
watchMem(app);
|
||||
|
||||
|
||||
// app.client.cha
|
||||
const cmdLoader = new Loader(app, path.join(__dirname, "commands"));
|
||||
// this is temp i swear
|
||||
cmdLoader.runQuery();
|
||||
|
||||
function handleError(e: any) {
|
||||
console.error(e);
|
||||
try {
|
||||
Sentry.captureException(e);
|
||||
} catch (e) {
|
||||
console.error(`rip sentry (died while tryna report an error)`);
|
||||
}
|
||||
try {
|
||||
app.client.chat.postMessage({
|
||||
channel: `D07LBMXD9FF`,
|
||||
text: `**Error:**\n\`\`\`${e.stack}\`\`\``,
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
process.on("unhandledRejection", handleError);
|
||||
process.on("unhandledException", handleError);
|
||||
|
||||
// cron might be eating the cpu
|
||||
setupOverallCron(app);
|
||||
// im going parinoiddd
|
||||
// cron.schedule(
|
||||
// "30 21 * * *",
|
||||
// async () => {
|
||||
// try {
|
||||
// await howWasYourDay(app);
|
||||
// } catch (e: any) {
|
||||
// // uh guess what this doesnt run because this cron doesnt run ...
|
||||
// app.client.chat.postMessage({
|
||||
// channel: `C07R8DYAZMM`,
|
||||
// text: `So i was supposed to say How was your day neon right?? well guess what neon broke my damn code!! so he gets to deal with this shitty error: \`\`\`\n${e.stack}\`\`\``,
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// { name: "howwasmyday" },
|
||||
// );
|
||||
app.start(process.env.PORT || 3000).then(async (d) => {
|
||||
console.log(`App is UP (please help)`);
|
||||
watchForWhenIUseHacktime(app);
|
||||
try {
|
||||
watchWS(app);
|
||||
} catch (e) {}
|
||||
setInterval(() => {
|
||||
try {
|
||||
function r() {
|
||||
|
|
@ -76,44 +120,4 @@ app.start(process.env.PORT || 3000).then(async (d) => {
|
|||
PrivateDNS(app, process.env.HACKCLUB_NEXTDNS, `C07TWGJKK98`);
|
||||
// grab spotify cache from db
|
||||
resetSpotifyCache(app);
|
||||
});
|
||||
|
||||
// app.client.cha
|
||||
const cmdLoader = new Loader(app, path.join(__dirname, "commands"));
|
||||
// this is temp i swear
|
||||
cmdLoader.runQuery();
|
||||
|
||||
function handleError(e: any) {
|
||||
console.error(e);
|
||||
try {
|
||||
Sentry.captureException(e);
|
||||
} catch (e) {
|
||||
console.error(`rip sentry (died while tryna report an error)`);
|
||||
}
|
||||
try {
|
||||
app.client.chat.postMessage({
|
||||
channel: `D07LBMXD9FF`,
|
||||
text: `**Error:**\n\`\`\`${e.stack}\`\`\``,
|
||||
});
|
||||
} catch (e) {}
|
||||
}
|
||||
// cron might be eating the cpu
|
||||
setupOverallCron(app);
|
||||
// im going parinoiddd
|
||||
// cron.schedule(
|
||||
// "30 21 * * *",
|
||||
// async () => {
|
||||
// try {
|
||||
// await howWasYourDay(app);
|
||||
// } catch (e: any) {
|
||||
// // uh guess what this doesnt run because this cron doesnt run ...
|
||||
// app.client.chat.postMessage({
|
||||
// channel: `C07R8DYAZMM`,
|
||||
// text: `So i was supposed to say How was your day neon right?? well guess what neon broke my damn code!! so he gets to deal with this shitty error: \`\`\`\n${e.stack}\`\`\``,
|
||||
// });
|
||||
// }
|
||||
// },
|
||||
// { name: "howwasmyday" },
|
||||
// );
|
||||
process.on("unhandledRejection", handleError);
|
||||
process.on("unhandledException", handleError);
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue