Brozy123 commited on
Commit
5ce32d5
·
verified ·
1 Parent(s): 15331cf

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +38 -2
index.js CHANGED
@@ -446,7 +446,25 @@ client.on('messageCreate', async (message) => {
446
  }
447
  }
448
 
449
- if (['profile', 'giverole'].includes(commandName)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  await message.reply(`🖌️ **Feature Migration in Progress!**\nThe \`${commandName}\` feature is currently being updated to Next-Gen graphics. Check back shortly!`);
451
  }
452
 
@@ -689,7 +707,25 @@ client.on('interactionCreate', async (interaction) => {
689
  }
690
  }
691
 
692
- if (interaction.commandName === 'profile' || interaction.commandName === 'giverole') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
693
  await interaction.reply({ content: `🖌️ **Feature Migration in Progress!**\nThe \`${interaction.commandName}\` feature is currently being updated to Next-Gen graphics. Check back shortly!`, ephemeral: true });
694
  }
695
  }
 
446
  }
447
  }
448
 
449
+ if (commandName === 'profile') {
450
+ const target = message.mentions.users.first() || message.author;
451
+ const stats = storage.data.stats[target.id] || { matches: 0, goals: 0, mvps: 0 };
452
+
453
+ const embed = new EmbedBuilder()
454
+ .setTitle(`🎴 PLAYER PROFILE — ${target.username.toUpperCase()}`)
455
+ .setThumbnail(target.displayAvatarURL({ dynamic: true }))
456
+ .addFields(
457
+ { name: '🏟️ Matches', value: `\`${stats.matches || 0}\``, inline: true },
458
+ { name: '⚽ Goals', value: `\`${stats.goals || 0}\``, inline: true },
459
+ { name: '🌟 MOTM Awards', value: `\`${stats.mvps || 0}\``, inline: true }
460
+ )
461
+ .setColor(UI.colors.primary)
462
+ .setFooter({ text: 'FriendlyBot Pro Stats' });
463
+
464
+ await message.reply({ embeds: [embed] });
465
+ }
466
+
467
+ if (commandName === 'giverole') {
468
  await message.reply(`🖌️ **Feature Migration in Progress!**\nThe \`${commandName}\` feature is currently being updated to Next-Gen graphics. Check back shortly!`);
469
  }
470
 
 
707
  }
708
  }
709
 
710
+ if (interaction.commandName === 'profile') {
711
+ const target = interaction.options.getUser('user') || interaction.user;
712
+ const stats = storage.data.stats[target.id] || { matches: 0, goals: 0, mvps: 0 };
713
+
714
+ const embed = new EmbedBuilder()
715
+ .setTitle(`🎴 PLAYER PROFILE — ${target.username.toUpperCase()}`)
716
+ .setThumbnail(target.displayAvatarURL({ dynamic: true }))
717
+ .addFields(
718
+ { name: '🏟️ Matches', value: `\`${stats.matches || 0}\``, inline: true },
719
+ { name: '⚽ Goals', value: `\`${stats.goals || 0}\``, inline: true },
720
+ { name: '🌟 MOTM Awards', value: `\`${stats.mvps || 0}\``, inline: true }
721
+ )
722
+ .setColor(UI.colors.primary)
723
+ .setFooter({ text: 'FriendlyBot Pro Stats' });
724
+
725
+ await interaction.reply({ embeds: [embed] });
726
+ }
727
+
728
+ if (interaction.commandName === 'giverole') {
729
  await interaction.reply({ content: `🖌️ **Feature Migration in Progress!**\nThe \`${interaction.commandName}\` feature is currently being updated to Next-Gen graphics. Check back shortly!`, ephemeral: true });
730
  }
731
  }