Skip to content

Commit

Permalink
oh
Browse files Browse the repository at this point in the history
  • Loading branch information
cobaltt7 committed Nov 27, 2022
1 parent bfb8e0f commit 944ae79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion common/automod.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,12 @@ async function checkString(toCensor, message) {
}
}

const baseChannel=getBaseChannel(message.channel)
const parentChannel = baseChannel&&baseChannel.isDMBased()?baseChannel:baseChannel?.parent

if (
!badWordsAllowed(message.channel) &&
CONSTANTS.channels.info?.id !== getBaseChannel(message.channel)?.parent.id &&
(CONSTANTS.channels.info?.id !== parentChannel?.id) &&
!message.author?.bot
) {
const botLinks = toCensor.match(/discord(?:app)?\.com\/(api\/)?oauth2\/authorize/gi);
Expand Down
2 changes: 1 addition & 1 deletion common/xp.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default async function giveXp(to, amount = NORMAL_XP_PER_MESSAGE) {
`\n\n*This week, ${
weekly.length
} people chatted, and ${activeCount} people were active. Alltogether, people gained ${weekly.reduce(
(a, b) => a + b,
(a, b) => a + b.xp,
0,
)} XP this week.*`,
});
Expand Down
2 changes: 1 addition & 1 deletion events/thread/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type Event from "../../common/types/event";

const event: Event<"threadUpdate"> = async function event(oldThread, newThread) {
if (newThread.guild.id !== CONSTANTS.guild.id) return;
if (!shouldLog(newMessage.channel)) return;
if (!shouldLog(newThread)) return;

if (newThread.parent?.id === CONSTANTS.channels.suggestions?.id) {
suggestionsDatabase.data = suggestionsDatabase.data.map((suggestion) =>
Expand Down

0 comments on commit 944ae79

Please sign in to comment.