Browse Source

Fix binding error

ghorsington 5 years ago
parent
commit
c61f1c2b39
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bot/src/commands/news_aggregator.ts

+ 2 - 2
bot/src/commands/news_aggregator.ts

@@ -167,7 +167,7 @@ export class NewsAggregator {
         return (reaction.emoji.name == "✅" || reaction.emoji.name == "❌") && !user.bot && user.id != client.user.id;
     }
 
-    async collectReaction(reaction: MessageReaction, collector: Collector<string, MessageReaction>) {
+    collectReaction = async (reaction: MessageReaction, collector: Collector<string, MessageReaction>) => {
         let repo = getRepository(AggroNewsItem);
 
         let m = reaction.message;
@@ -197,7 +197,7 @@ export class NewsAggregator {
         await repo.update({ newsId: post.newsId, feedName: post.feedName }, { editMessageId: null, forumsEditPostId: null, forumsNewsPostId: post.forumsNewsPostId });
         await reaction.message.delete();
         delete this.verifyMessageIdToPost[m.id];
-    }
+    };
 
     async deleteCacheMessage(messageId: string) {
         let ch = client.channels.get(this.aggregateChannelID);