@@ -130,15 +130,13 @@ function getDateProps(
130
130
const day = newDate . getDate ( ) . toString ( ) ;
131
131
const year = newDate . getFullYear ( ) . toString ( ) ;
132
132
133
- newDate . setDate ( newDate . getDate ( ) - 1 ) ;
134
-
135
133
const newDate2 = new Date ( date2 ) ;
136
134
newDate2 . setHours ( newDate2 . getHours ( ) ) ;
137
135
const month2 = ( newDate2 . getMonth ( ) + 1 ) . toString ( ) ;
138
136
const day2 = newDate2 . getDate ( ) . toString ( ) ;
139
137
const year2 = newDate2 . getFullYear ( ) . toString ( ) ;
140
138
141
- console . log ( event , newDate , newDate2 ) ;
139
+ console . log ( "CHECKING DATE PROPS:" , event , newDate , newDate2 ) ;
142
140
143
141
// Set start and end to times, and include the date
144
142
if (
@@ -170,13 +168,8 @@ function getDateProps(
170
168
171
169
// Function to create discord event
172
170
async function createDiscordEvents ( events : Messages [ ] , client : Client ) {
173
- // Filter out all events that are not next week
174
- const nextWeekEvents = events . filter (
175
- ( event ) => event . range === "Next Week"
176
- ) ;
177
-
178
171
// Iterate through the next week events
179
- nextWeekEvents . map ( async ( event ) => {
172
+ events . map ( async ( event ) => {
180
173
// Create a guild event for each event using the discord client
181
174
for ( const guild of client . guilds . cache . values ( ) ) {
182
175
try {
@@ -413,7 +406,7 @@ export async function execute(client: Client) {
413
406
414
407
try {
415
408
// Check events on a schedule
416
- cron . schedule ( "30 9 * * *" , async ( ) => hookLogic ( client , preWebhook ) ) ;
409
+ cron . schedule ( "30 11 * * *" , async ( ) => hookLogic ( client , preWebhook ) ) ;
417
410
cron . schedule ( "0 12 * * *" , async ( ) => hookLogic ( client , webhook ) ) ;
418
411
// Catch any errors
419
412
} catch ( err : unknown ) {
0 commit comments