Skip to content

Commit

Permalink
remove bloat related to discordjs/discord.js#9568
Browse files Browse the repository at this point in the history
Signed-off-by: RedGuy12 <paul@reid-family.org>
  • Loading branch information
cobaltt7 committed Jun 12, 2023
1 parent ea18547 commit ee9e3b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
4 changes: 1 addition & 3 deletions modules/logging/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ export async function getLoggingThread(group?: LogGroup | typeof DATABASE_THREAD
const threads = await config.channels.modlogs.threads.fetchActive();

return (
threads.threads.find(
(thread) => thread.parent?.id === config.channels.modlogs?.id && thread.name === group,
) ||
threads.threads.find((thread) => thread.name === group) ||
(await config.channels.modlogs.threads.create({
name: group,
reason: "New logging thread",
Expand Down
6 changes: 1 addition & 5 deletions modules/modInterestForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import giveXp from "./xp/giveXp.js";
if (!config.channels.admin) throw new ReferenceError("Could not find admin channel");
const threads = await config.channels.admin.threads.fetchActive();
const thread =
threads.threads.find(
(thread) =>
thread.parent?.id === config.channels.admin?.id &&
thread.name === "Moderator Interest Forms",
) ||
threads.threads.find((thread) => thread.name === "Moderator Interest Forms") ||
(await config.channels.admin.threads.create({
name: "Moderator Interest Forms",
reason: "For mod interest forms",
Expand Down
5 changes: 1 addition & 4 deletions modules/tickets/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ export async function getThreadFromMember(
return (
await asyncFilter(
threads.toJSON(),
async (thread) =>
thread.parent?.id === config.channels.tickets?.id &&
(await getUserFromTicket(thread))?.id === user.id &&
thread,
async (thread) => (await getUserFromTicket(thread))?.id === user.id && thread,
).next()
).value;
}
Expand Down

0 comments on commit ee9e3b3

Please sign in to comment.