Compare commits

..

No commits in common. "ef39c6315df101186308301794e18d2a6959e84c" and "d1aacbb3d3dfde559581821e2dcabfeab3e8ae90" have entirely different histories.

4 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@ export default class RoleController {
.catch(error => { logger.error(`Could not find announcement_role with id ${config.bot.announcement_role}. Error: ${error}`, { requestId, guildId: guild.id }) })
}
public async assignAnnouncementRolesFromReaction(guild: Guild, reaction: MessageReaction, requestId: string) {
public async assignAnnouncementRolesFromReactions(guild: Guild, reaction: MessageReaction, requestId: string) {
const guildId = guild.id
logger.info("Managing roles", { guildId, requestId })

View File

@ -5,7 +5,7 @@ import { getMembersWithRoleFromGuild } from "./roleFilter"
import { config } from "../configuration"
import { VoteMessage, isVoteEndedMessage, isVoteMessage } from "./messageIdentifiers"
import { createDateStringFromEvent } from "./dateHelper"
import { Maybe, prepareVoteMessageInput } from "../interfaces"
import { Maybe, voteMessageInputInformation as prepareVoteMessageInput } from "../interfaces"
import format from "date-fns/format"
import toDate from "date-fns/toDate"
import differenceInDays from "date-fns/differenceInDays"

View File

@ -39,7 +39,7 @@ export interface JellyfinConfig {
collectionUser: string
}
export type PermissionLevel = "VIEWER" | "ADMIN" | "TEMPORARY"
export interface prepareVoteMessageInput {
export interface voteMessageInputInformation {
movies: string[],
startDate: Date,
event: GuildScheduledEvent,

View File

@ -173,10 +173,10 @@ export class ExtendedClient extends Client {
}
//logger.debug(`Message: ${JSON.stringify(message, null, 2)}`, { guildId: guild.id, requestId })
const ticketReaction = message.reactions.resolve("🎫")
const reactions = message.reactions.resolve("🎫")
//logger.debug(`reactions: ${JSON.stringify(reactions, null, 2)}`, { guildId: guild.id, requestId })
if (ticketReaction) {
this.roleController.assignAnnouncementRolesFromReaction(message.guild, ticketReaction, requestId)
if (reactions) {
this.roleController.assignAnnouncementRolesFromReactions(message.guild, reactions, requestId)
} else {
logger.error("Did not get reactions! Aborting!", { guildId: guild.id, requestId })
}