diff --git a/server/events/autoCreateVoteByWPEvent.ts b/server/events/autoCreateVoteByWPEvent.ts index 323556d..fab0844 100644 --- a/server/events/autoCreateVoteByWPEvent.ts +++ b/server/events/autoCreateVoteByWPEvent.ts @@ -1,5 +1,4 @@ import { GuildScheduledEvent, Message, MessageCreateOptions, TextChannel } from "discord.js"; -import { ScheduledTask } from "node-cron"; import { v4 as uuid } from "uuid"; import { client, yavinJellyfinHandler } from "../.."; import { config } from "../configuration"; @@ -11,8 +10,6 @@ import { Emotes, NONE_OF_THAT } from "../constants"; export const name = 'guildScheduledEventCreate' - - export async function execute(event: GuildScheduledEvent) { const requestId = uuid() diff --git a/server/helper/dateHelper.ts b/server/helper/dateHelper.ts index dd9c5b2..8fdab45 100644 --- a/server/helper/dateHelper.ts +++ b/server/helper/dateHelper.ts @@ -1,4 +1,4 @@ -import { format, isToday, toDate } from "date-fns"; +import { format, isToday } from "date-fns"; import { utcToZonedTime } from "date-fns-tz" import { GuildScheduledEvent } from "discord.js"; import { logger } from "../logger"; diff --git a/server/helper/roleFilter.ts b/server/helper/roleFilter.ts index 02df4da..af65678 100644 --- a/server/helper/roleFilter.ts +++ b/server/helper/roleFilter.ts @@ -1,4 +1,4 @@ -import { Collection, Guild, GuildMember, Role, User } from "discord.js" +import { Collection, Guild, GuildMember, Role } from "discord.js" import { ChangedRoles, Maybe, PermissionLevel } from "../interfaces" import { logger } from "../logger" import { config } from "../configuration" diff --git a/server/helper/vote.controller.ts b/server/helper/vote.controller.ts index 9ddfd5b..d56d009 100644 --- a/server/helper/vote.controller.ts +++ b/server/helper/vote.controller.ts @@ -2,7 +2,6 @@ import { Message, MessageReaction, User } from "discord.js" import { client } from "../.." import { NONE_OF_THAT } from "../constants" import { logger } from "../logger" -import { messageIsVoteMessage } from "./messageIdentifiers" import { getMembersWithRoleFromGuild } from "./roleFilter" import { config } from "../configuration" @@ -15,7 +14,7 @@ export default class VoteController { logger.info("ROLE MEMBERS " + JSON.stringify(watcherRoleMember), { requestId, guildId }) const watcherRoleMemberCount = watcherRoleMember.size logger.info(`MEMBER COUNT: ${watcherRoleMemberCount}`, { requestId, guildId }) - let noneOfThatReactions = messageReaction.message.reactions.cache.get(NONE_OF_THAT)?.users.cache.filter(x => x.id !== client.user?.id).size ?? 0 + const noneOfThatReactions = messageReaction.message.reactions.cache.get(NONE_OF_THAT)?.users.cache.filter(x => x.id !== client.user?.id).size ?? 0 const memberThreshold = (watcherRoleMemberCount / 2) logger.info(`Reroll ${noneOfThatReactions} > ${memberThreshold} ?`, { requestId, guildId })