feat/40-reroll-on-disinterest #54
@ -85,6 +85,16 @@ export class ExtendedClient extends Client {
|
||||
logger.info(`Error refreshing slash commands: ${error}`)
|
||||
}
|
||||
}
|
||||
/**
|
||||
kenobi marked this conversation as resolved
Outdated
|
||||
* Fetches all messages from the provided channel collection.
|
||||
* This is necessary for announcementChannels, because 'old' messages don't receive
|
||||
* messageReactionAdd Events, only messages that were sent while the bot is online are tracked
|
||||
* automatically.
|
||||
* To prevent the need for a dedicated 'Collector' implementation which would listen on specific
|
||||
* it's easiest to just fetch all messages from the backlog, which automatically makes the bot track them
|
||||
* again.
|
||||
* @param {Collection<string, TextChannel>} channels - All channels which should be fecthed for reactionTracking
|
||||
*/
|
||||
private async fetchAnnouncementChannelMessage(channels: Collection<string, TextChannel>): Promise<void> {
|
||||
channels.each(async ch => {
|
||||
ch.messages.fetch()
|
||||
|
Loading…
Reference in New Issue
Block a user
why is this necessary?
It's complicated. I put in some JSDoc comments:
Figured something like that. Thanks for the comment