v0.4.3 upgrade to dd16, improve reactionAdd ignore to ignore local version of self
This commit is contained in:
parent
5bc71c2767
commit
57d6b45d2e
7
deps.ts
7
deps.ts
|
@ -1,12 +1,13 @@
|
|||
// All external dependancies are to be loaded here to make updating dependancy versions much easier
|
||||
import { getBotIdFromToken } from 'https://deno.land/x/discordeno@15.0.1/mod.ts'; // https://deno.land/x/discordeno@14.0.1/mod.ts
|
||||
import { getBotIdFromToken } from 'https://deno.land/x/discordeno@16.0.1/mod.ts';
|
||||
import config from './config.ts';
|
||||
import { LOCALMODE } from './flags.ts';
|
||||
export const botId = getBotIdFromToken(LOCALMODE ? config.localtoken : config.token);
|
||||
export const sweeperBotIds = [getBotIdFromToken(config.localtoken), getBotIdFromToken(config.token)];
|
||||
|
||||
export { ActivityTypes, createBot, editBotMember, editBotStatus, getReactions, Intents, sendMessage, startBot } from 'https://deno.land/x/discordeno@15.0.1/mod.ts';
|
||||
export { ActivityTypes, createBot, editBotMember, editBotStatus, getReactions, Intents, sendMessage, startBot } from 'https://deno.land/x/discordeno@16.0.1/mod.ts';
|
||||
|
||||
export type { Bot, CreateMessage, Emoji, EventHandlers, Guild, Member, Message, User } from 'https://deno.land/x/discordeno@15.0.1/mod.ts';
|
||||
export type { Bot, CreateMessage, Emoji, EventHandlers, Guild, Member, Message, User } from 'https://deno.land/x/discordeno@16.0.1/mod.ts';
|
||||
|
||||
export { Client } from 'https://deno.land/x/mysql@v2.10.2/mod.ts';
|
||||
|
||||
|
|
2
flags.ts
2
flags.ts
|
@ -3,4 +3,4 @@ export const DEVMODE = false;
|
|||
// DEBUG is used to toggle the cmdPrompt
|
||||
export const DEBUG = false;
|
||||
// LOCALMODE is used to run a differnt bot token for local testing
|
||||
export const LOCALMODE = false;
|
||||
export const LOCALMODE = true;
|
||||
|
|
|
@ -2,7 +2,7 @@ import config from '../../config.ts';
|
|||
import {
|
||||
// Discordeno deps
|
||||
Bot,
|
||||
botId,
|
||||
sweeperBotIds,
|
||||
} from '../../deps.ts';
|
||||
import { ReactionAdd } from '../types/eventTypes.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
@ -10,7 +10,7 @@ import functions from '../functions/_index.ts';
|
|||
|
||||
export const reactionAdd = async (bot: Bot, payload: ReactionAdd) => {
|
||||
// Ignore self
|
||||
if (botId === payload.userId) return;
|
||||
if (sweeperBotIds.includes(payload.userId)) return;
|
||||
|
||||
if (config.pollChannels.includes(payload.channelId)) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue