rename announcement role assign function
Compile the repository / compile (pull_request) Successful in 16s Details
Run unit tests / test (pull_request) Successful in 15s Details

This commit is contained in:
kenobi 2023-11-21 22:42:50 +01:00
parent f83f54749d
commit 88061c361c
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,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 }) }) .catch(error => { logger.error(`Could not find announcement_role with id ${config.bot.announcement_role}. Error: ${error}`, { requestId, guildId: guild.id }) })
} }
public async manageAnnouncementRoles(guild: Guild, reaction: MessageReaction, requestId: string) { public async assignAnnouncementRolesFromReactions(guild: Guild, reaction: MessageReaction, requestId: string) {
const guildId = guild.id const guildId = guild.id
logger.info("Managing roles", { guildId, requestId }) logger.info("Managing roles", { guildId, requestId })

View File

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