From 7d199660713f1719ef1b0da307791b4abbcab3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Lusseau?= <94113911+FelixLusseau@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:28:00 +0200 Subject: [PATCH] 7 caracters tag --- commands/ffplayer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/ffplayer.js b/commands/ffplayer.js index a0ea027..28436bb 100644 --- a/commands/ffplayer.js +++ b/commands/ffplayer.js @@ -9,7 +9,7 @@ async function ffplayer(bot, api, interaction, channel, tag) { details = interaction.options.getBoolean('details'); } - const regex = /\#[a-zA-Z0-9]{8,9}\b/g + const regex = /\#[a-zA-Z0-9]{7-9}\b/g if (tag.search(regex) < 0) { // Prevent the bot from crashing (not happening) if the tag is invalid functions.errorEmbed(bot, interaction, channel, "Invalid tag"); return @@ -84,4 +84,4 @@ module.exports = { async execute(bot, api, interaction) { ffplayer(bot, api, interaction, null, null); } -}; \ No newline at end of file +};