1
0
mirror of https://github.com/Burn-E99/SweeperBot.git synced 2026-06-04 07:53:50 -04:00

V0.4.2 - Fix reaction system to not react to self

This commit is contained in:
Ean Milligan (Bastion)
2022-09-10 11:53:46 -04:00
parent b4e16f6c56
commit 08a2b375a3
2 changed files with 5 additions and 1 deletions

View File

@@ -2,12 +2,16 @@ import config from '../../config.ts';
import {
// Discordeno deps
Bot,
botId,
} from '../../deps.ts';
import { ReactionAdd } from '../types/eventTypes.ts';
import utils from '../utils.ts';
import functions from '../functions/_index.ts';
export const reactionAdd = async (bot: Bot, payload: ReactionAdd) => {
// Ignore self
if (botId === payload.userId) return;
if (config.pollChannels.includes(payload.channelId)) {
try {
const message = await bot.helpers.getMessage(payload.channelId, payload.messageId);