Skip to content

Commit

Permalink
6 characters tag
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixLusseau committed Jun 18, 2024
1 parent c80e147 commit ade4925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/ffplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function ffplayer(bot, api, interaction, channel, tag) {
details = interaction.options.getBoolean('details');
}

const regex = /\#[a-zA-Z0-9]{7,9}\b/g
const regex = /\#[a-zA-Z0-9]{6,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
Expand Down
2 changes: 1 addition & 1 deletion events/messageCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
let placeholder = null

// Check if the message contains a tag and send the RoyaleAPI Profile url into the channel
const regex = /\#[a-zA-Z0-9]{7,9}\b/g
const regex = /\#[a-zA-Z0-9]{6,9}\b/g
if (message.content.search(regex) >= 0) {
console.log(`\x1b[36m[${new Date().toISOString()}]\x1b[0m Tag received:`, message.content.match(regex)[0]);
placeholder = await message.channel.send("Tag received !\nSearching... <a:Mag:1186624382982963290>") // Send a placeholder message to show that the bot is working
Expand Down

0 comments on commit ade4925

Please sign in to comment.