fix regex

This commit is contained in:
Mylloon 2023-01-20 03:40:59 +01:00
parent 23c6b6eb48
commit afff3b5b3e
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -23,7 +23,7 @@ export default async (message: Message, client: Client) => {
/* Citation */
const regex =
"https://(?:canary\\.|ptb\\.)?discord(?:app)?\\.com/channels/(\\d{17,19})/(\\d{17,19})/(\\d{17,19})";
/https:\/\/(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(\d{17,19})\/(\d{17,19})\/(\d{17,19})/g;
const urls = message.content.match(new RegExp(regex, "g"));
// Ignore message if there is no URLs