diff --git a/config.example.ts b/config.example.ts index 0c6309e..e61a79f 100644 --- a/config.example.ts +++ b/config.example.ts @@ -1,6 +1,6 @@ export const config = { 'name': 'Sweeper Bot', // Name of the bot - 'version': '0.4.1', // Version of the bot + 'version': '0.4.2', // Version of the bot 'token': 'the_bot_token', // Discord API Token for this bot 'localtoken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token" 'prefix': 's!', // Prefix for all commands diff --git a/src/events/reactionAdd.ts b/src/events/reactionAdd.ts index f114541..0a2e127 100644 --- a/src/events/reactionAdd.ts +++ b/src/events/reactionAdd.ts @@ -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);