Skip to content

Commit 3b9ac54

Browse files
committed
fix: x replacement check for text based channels
1 parent a6f3d0c commit 3b9ac54

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/events/on_message/_advise.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1+
import { type Message, hideLinkEmbed, codeBlock } from 'discord.js';
12
import urlRegex from 'url-regex';
2-
import {
3-
type Message,
4-
ChannelType,
5-
hideLinkEmbed,
6-
codeBlock,
7-
} from 'discord.js';
83

94
export default async function mutate_content(message: Message) {
10-
if (message.channel.type != ChannelType.GuildText) return;
5+
if (message.channel.isTextBased()) return;
116

127
const links = message.content
138
.match(urlRegex())

0 commit comments

Comments
 (0)