V0.4.2 - Fix reaction system to not react to self
This commit is contained in:
parent
b4e16f6c56
commit
08a2b375a3
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue