foxwells.vinboard: fix webhook var ref
This commit is contained in:
		
							parent
							
								
									4011ef0387
								
							
						
					
					
						commit
						cb032899b8
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
					@ -276,7 +276,7 @@ async function processReaction(msg, user, reaction) {
 | 
				
			||||||
    if (trueCount == 0) {
 | 
					    if (trueCount == 0) {
 | 
				
			||||||
      logger.verbose("vinboard", `Deleting entry for "${msg.id}"`);
 | 
					      logger.verbose("vinboard", `Deleting entry for "${msg.id}"`);
 | 
				
			||||||
      if (dbEntry.board_id) {
 | 
					      if (dbEntry.board_id) {
 | 
				
			||||||
        await webhook.deleteMessage(
 | 
					        await vinboard_webhook.deleteMessage(
 | 
				
			||||||
          dbEntry.board_id,
 | 
					          dbEntry.board_id,
 | 
				
			||||||
          "[Vinboard] Message has 0 reactions now."
 | 
					          "[Vinboard] Message has 0 reactions now."
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
| 
						 | 
					@ -297,7 +297,7 @@ async function processReaction(msg, user, reaction) {
 | 
				
			||||||
        await setBoardEntry(msg.id, trueCount, dbEntry.board_id);
 | 
					        await setBoardEntry(msg.id, trueCount, dbEntry.board_id);
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
 | 
					        logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
 | 
				
			||||||
        const boardMessage = await webhook.execute(
 | 
					        const boardMessage = await vinboard_webhook.execute(
 | 
				
			||||||
          await createBoardMessage(msg, trueCount)
 | 
					          await createBoardMessage(msg, trueCount)
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        await setBoardEntry(msg.id, trueCount, boardMessage.id);
 | 
					        await setBoardEntry(msg.id, trueCount, boardMessage.id);
 | 
				
			||||||
| 
						 | 
					@ -305,7 +305,7 @@ async function processReaction(msg, user, reaction) {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
 | 
					    logger.verbose("vinboard", `Creating entry for "${msg.id}"`);
 | 
				
			||||||
    const boardMessage = await webhook.execute(
 | 
					    const boardMessage = await vinboard_webhook.execute(
 | 
				
			||||||
      await createBoardMessage(msg, trueCount)
 | 
					      await createBoardMessage(msg, trueCount)
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    await setBoardEntry(msg.id, trueCount, boardMessage.id);
 | 
					    await setBoardEntry(msg.id, trueCount, boardMessage.id);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue