Skip to content

Commit

Permalink
Merge pull request #24 from BF3RM/feat/No-Event
Browse files Browse the repository at this point in the history
Update sunday-events.task.ts
  • Loading branch information
paulhobbel authored Jul 15, 2024
2 parents afdfd60 + e81dd4d commit c3e34db
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 104 deletions.
14 changes: 1 addition & 13 deletions src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import {
import {
getBotToken,
getServerListScheduleRule,
getSundayEventScheduleRule,
getFridayEventScheduleRule,
} from "./config";
import {
Command,
Expand All @@ -25,7 +23,7 @@ import {
} from "./core";
import { LoggerFactory } from "./logger.factory";
import { runMigrations, SchedulerService } from "./services";
import { ServerListJob, SundayEventScheduleJob } from "./tasks";
import { ServerListJob } from "./tasks";

const logger = LoggerFactory.getLogger("Bot");

Expand Down Expand Up @@ -168,8 +166,6 @@ export class Bot {

private scheduleJobs() {
const serverListScheduleRule = getServerListScheduleRule();
const sundayEventScheduleRule = getSundayEventScheduleRule();
const fridayEventScheduleRule = getFridayEventScheduleRule();

if (serverListScheduleRule) {
SchedulerService.schedule(
Expand All @@ -178,14 +174,6 @@ export class Bot {
new ServerListJob()
);
}

if (sundayEventScheduleRule) {
SchedulerService.schedule(
"SundayEvent",
sundayEventScheduleRule,
new SundayEventScheduleJob()
);
}
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,3 @@ export const getCommunityEventRoleId = () =>
getRequiredEnvVariable("COMMUNITY_EVENT_ROLE_ID");
export const getCommunityEventChannelId = () =>
getRequiredEnvVariable("COMMUNITY_EVENT_CHANNEL_ID");
export const getSundayEventScheduleRule = () =>
getEnvVariable("SUNDAY_EVENT_SCHEDULE_RULE");
export const getFridayEventScheduleRule = () =>
getEnvVariable("FRIDAY_EVENT_SCHEDULE_RULE");
1 change: 0 additions & 1 deletion src/tasks/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from "./serverlist.task";
export * from "./sunday-events.task";
86 changes: 0 additions & 86 deletions src/tasks/sunday-events.task.ts

This file was deleted.

0 comments on commit c3e34db

Please sign in to comment.