Fix
This commit is contained in:
parent
c006a4a474
commit
b5cf54aa89
1 changed files with 2 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ import "dotenv/config";
|
||||||
import { Client, GatewayIntentBits } from "discord.js";
|
import { Client, GatewayIntentBits } from "discord.js";
|
||||||
|
|
||||||
const TARGET_USER_ID = "541298246971162636";
|
const TARGET_USER_ID = "541298246971162636";
|
||||||
const LINK_PATTERN = /(?:https?:\/\/|www\.)\S+/i;
|
const LINK_PATTERN = /(?:https?:\/\/|www\.|discord\.gg\/|discord\.com\/invite\/|\[[^\]]+\]\([^\)]+\))/i;
|
||||||
const WARNING_MESSAGE =
|
const WARNING_MESSAGE =
|
||||||
"Alerte: Ce lien a été envoyé par Nesta. Ne cliquez SURTOUT PAS s'il y a des gens autour de vous.";
|
"Alerte: Ce lien a été envoyé par Nesta. Ne cliquez SURTOUT PAS s'il y a des gens autour de vous.";
|
||||||
|
|
||||||
|
|
@ -15,6 +15,7 @@ const client = new Client({
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on("messageCreate", async (message) => {
|
client.on("messageCreate", async (message) => {
|
||||||
|
console.log(`Received message from ${message.author.tag}: ${message.content}`);
|
||||||
if (message.author.bot) {
|
if (message.author.bot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue