diff --git a/backend/src/plugins/Logs/types.ts b/backend/src/plugins/Logs/types.ts index 2eb8043a..54aeffa6 100644 --- a/backend/src/plugins/Logs/types.ts +++ b/backend/src/plugins/Logs/types.ts @@ -52,8 +52,6 @@ export interface LogsPluginType extends BasePluginType { onMessageDeleteFn; onMessageDeleteBulkFn; onMessageUpdateFn; - - excludedUserProps: string[]; }; } diff --git a/backend/src/plugins/Logs/util/log.ts b/backend/src/plugins/Logs/util/log.ts index 37d779d0..828fb960 100644 --- a/backend/src/plugins/Logs/util/log.ts +++ b/backend/src/plugins/Logs/util/log.ts @@ -5,6 +5,8 @@ import { TextChannel } from "eris"; import { createChunkedMessage, noop } from "src/utils"; import { getLogMessage } from "./getLogMessage"; +const excludedUserProps = ["user", "member", "mod"]; + export async function log(pluginData: PluginData, type: LogType, data: any) { const logChannels: TLogChannelMap = pluginData.config.get().channels; const typeStr = LogType[type]; @@ -17,7 +19,7 @@ export async function log(pluginData: PluginData, type: LogType, // If this log entry is about an excluded user, skip it // TODO: Quick and dirty solution, look into changing at some point if (opts.excluded_users) { - for (const prop of pluginData.state.excludedUserProps) { + for (const prop of excludedUserProps) { if (data && data[prop] && opts.excluded_users.includes(data[prop].id)) { continue logChannelLoop; }