This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
66 lines (52 loc) · 2.65 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright (c) ChariArch 2021. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
const schedule = require('node-schedule');
const colors = require('colors');
const { iniciarClase } = require('./core/Core.js');
// Leer el archivo de configuracion
const fs = require('fs');
var cfg = JSON.parse(fs.readFileSync('config.json', 'utf-8'));
// Bienvenida al script
console.log(' _____ _____ _____ _____ _____ _____ '.magenta);
console.log('| _ \\ |_ _| | _ \\ | _ \\ / _ \\ |_ _| '.magenta);
console.log('| |_| | | | | |_| | | |_| | | | | | | | '.magenta);
console.log('| ___/ | | | _ / | _ { | | | | | | '.magenta);
console.log('| | | | | | \\ \\ | |_| | | |_| | | | '.magenta);
console.log('|_| |_| |_| \\_\\ |_____/ \\_____/ |_| '.magenta);
console.log('');
console.log(' '.bgBlack + 'Creado por Chari69#1010'.white.bgCyan);
console.log('------------------------------------------------------');
// Ranura para testeos, esto da un poco igual.
if (cfg.testmode.enabled === true) {
iniciarClase('PTR-TEST', cfg.testmode.url);
};
// HORARIO DE CLASES (por orden)
// Lunes a las 8:10 AM
const id1 = schedule.scheduleJob({ hour: 8, minute: 10, dayOfWeek: 1 }, function () {
iniciarClase('MATEMATICAS', 'https://classroom.google.com/c/MzQwNzg0ODU0MjRa');
});
// Martes a las 8:10 AM
const id2 = schedule.scheduleJob({ hour: 8, minute: 10, dayOfWeek: 2 }, function () {
iniciarClase('ORIENTACION', 'https://classroom.google.com/c/MTUwNjk5MjIyNjM3');
});
// Miercoles a las 8:10 AM
const id3 = schedule.scheduleJob({ hour: 8, minute: 10, dayOfWeek: 3 }, function () {
iniciarClase('GHC', 'https://classroom.google.com/c/MTQ5NTUwMTQwMTMw');
});
// Miercoles a las 11:35 AM
const id4 = schedule.scheduleJob({ hour: 11, minute: 35, dayOfWeek: 3 }, function () {
iniciarClase('QUIMICA', 'https://classroom.google.com/c/MTc2OTgzMTMzMDgx');
});
// Jueves a las 8:10 AM
const id5 = schedule.scheduleJob({ hour: 8, minute: 10, dayOfWeek: 4 }, function () {
iniciarClase('CASTELLANO', 'https://classroom.google.com/c/MTQ5ODQ5NTE4NDEy');
});
// Jueves a las 11:35 AM
const id6 = schedule.scheduleJob({ hour: 11, minute: 35, dayOfWeek: 4 }, function () {
iniciarClase('FISICA', 'https://classroom.google.com/c/OTExNTIyNDc3NzJa');
});
// Viernes a las 8:05 AM
const id7 = schedule.scheduleJob({ hour: 8, minute: 5, dayOfWeek: 5 }, function () {
iniciarClase('BIOLOGIA', 'https://classroom.google.com/c/MTQ1NDgyOTUyOTIw');
});
process.on('unhandledRejection', (err, p) => { }); // No mas errores pajuos