Brozy123 commited on
Commit
4aa817d
·
verified ·
1 Parent(s): e9d487d

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +44 -43
index.js CHANGED
@@ -1147,45 +1147,46 @@ if (commandName === 'broadcast' || commandName === 'removebroadcast' || commandN
1147
  return;
1148
  }
1149
 
1150
- if (commandName === 'help') {
1151
- const h = `⭐ FRIENDLYBOT OFFICIAL COMMANDS ⭐
1152
-
1153
- --- ⚽ MATCH & LINEUP MANAGEMENT ---
1154
- !friendly /friendly - Start a standard lineup vote for players to join.
1155
- !lineup /lineup - Generate the standard interactive lineup board.
1156
- !lineupimage /lineupimage - Generate a high-quality visual representation of the starting lineup.
1157
- !leaguematchimage /leaguematchimage - Generate a visual representation for a league match.
1158
- !leaguematch /leaguematch - Schedule a professional league match with an opponent, link, and time.
1159
-
1160
- --- 📈 COMPETITION & STATS ---
1161
- !top /top - 🏆 Show the Top 10 most active players in the server.
1162
- !profile /profile - 🎴 Generate a custom profile card showing your stats.
1163
- !profileimage /profileimage - 🎨 Generate a high-quality visual profile image card.
1164
- !motm /motm - 🌟 (Admin/Staff) Grant the "Man of the Match" award to a player.
1165
- !record /record - 📊 View the server's global Win/Loss/Draw record.
1166
- !win /win - (Admin/Staff) Record a victory.
1167
- !loss /loss - (Admin/Staff) Record a defeat.
1168
- !draw /draw - (Admin/Staff) Record a draw.
1169
-
1170
- --- ⚙️ SYSTEM & STAFF SETUP ---
1171
- !setup /setup - (Admin Only) Opens the interactive settings panel.
1172
- !addrole /addrole - (Admin Only) Add a role to the bot staff whitelist.
1173
- !removerole /removerole - (Admin Only) Remove a role from the bot staff whitelist.
1174
- !giverole /giverole - (Admin Only) Sync roles for members.
1175
- !friendlybotsettings /friendlybotsettings - View bot status and permitted roles.
1176
- !sync /sync - (Admin Only) Synchronize slash commands.
1177
- !reboot /reboot - (Owner Only) Restart the bot.
1178
- !ping /ping - Check bot latency.
1179
- !uptime /uptime - Show bot uptime.
1180
- !clear /clear - (Admin/Staff) Clear messages.
1181
- !lock /lock - (Admin/Staff) Lock the current channel.
1182
- !unlock /unlock - (Admin/Staff) Unlock the current channel.
1183
-
1184
- ⭐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬⭐
1185
- Tip: All commands support Discord Slash Commands (/) for a better experience!`;
1186
- await message.reply(`\`\`\`\n${h}\n\`\`\``);
1187
- return;
1188
- }
 
1189
 
1190
  if (commandName === 'lineupimage') {
1191
  if (!roleStorage.isWhitelisted(message.guildId, message.member)) return sendNoPermission(message);
@@ -1312,7 +1313,7 @@ client.on('interactionCreate', async (interaction) => {
1312
 
1313
  // Only defer ChatInputCommands to prevent conflict with Button/Menu deferUpdate()
1314
  if (interaction.isChatInputCommand()) {
1315
- const noDeferCmds = ['ping', 'friendly', 'lineup'];
1316
  if (!noDeferCmds.includes(interaction.commandName)) {
1317
  await interaction.deferReply().catch(() => { });
1318
  }
@@ -2690,16 +2691,16 @@ function createScrimLineupView(guildId) {
2690
  if (subs.length > 0) {
2691
  line += ` (Substitute: ` + subs.map(p => `<@${p}>`).join(', ') + `)`;
2692
  }
2693
- text_rotated += line + "\n\n";
2694
  } else {
2695
- text_rotated += `⬛ **${resolvedLabel}** ➔ *Open*\n\n`;
2696
  }
2697
  }
2698
 
2699
  const embed = UI.createEmbed(`⚽ SCRIMMAGE LINEUP — ${resolveEmojis(formDisplayName, guildId)}`, text, UI.colors.primary);
2700
  embed.setFooter({ text: "Left: Team A | Right: Team B (Rotated) | Click positions to join/leave" });
2701
 
2702
- const embedRotated = UI.createEmbed(`🔄 TEAM B (ROTATED)`, text_rotated, UI.colors.success);
2703
 
2704
  const rows = [];
2705
 
 
1147
  return;
1148
  }
1149
 
1150
+ if (commandName === 'help') {
1151
+ const h = `⭐ FRIENDLYBOT OFFICIAL COMMANDS ⭐
1152
+
1153
+ --- ⚽ MATCH & LINEUP MANAGEMENT ---
1154
+ !friendly /friendly - Start a standard lineup vote for players to join.
1155
+ !lineup /lineup - Generate the standard interactive lineup board.
1156
+ !scrimlineup /scrimlineup - Generate a scrimmage lineup board with two teams facing each other.
1157
+ !lineupimage /lineupimage - Generate a high-quality visual representation of the starting lineup.
1158
+ !leaguematchimage /leaguematchimage - Generate a visual representation for a league match.
1159
+ !leaguematch /leaguematch - Schedule a professional league match with an opponent, link, and time.
1160
+
1161
+ --- 📈 COMPETITION & STATS ---
1162
+ !top /top - 🏆 Show the Top 10 most active players in the server.
1163
+ !profile /profile - 🎴 Generate a custom profile card showing your stats.
1164
+ !profileimage /profileimage - 🎨 Generate a high-quality visual profile image card.
1165
+ !motm /motm - 🌟 (Admin/Staff) Grant the "Man of the Match" award to a player.
1166
+ !record /record - 📊 View the server's global Win/Loss/Draw record.
1167
+ !win /win - (Admin/Staff) Record a victory.
1168
+ !loss /loss - (Admin/Staff) Record a defeat.
1169
+ !draw /draw - (Admin/Staff) Record a draw.
1170
+
1171
+ --- ⚙️ SYSTEM & STAFF SETUP ---
1172
+ !setup /setup - (Admin Only) Opens the interactive settings panel.
1173
+ !addrole /addrole - (Admin Only) Add a role to the bot staff whitelist.
1174
+ !removerole /removerole - (Admin Only) Remove a role from the bot staff whitelist.
1175
+ !giverole /giverole - (Admin Only) Sync roles for members.
1176
+ !friendlybotsettings /friendlybotsettings - View bot status and permitted roles.
1177
+ !sync /sync - (Admin Only) Synchronize slash commands.
1178
+ !reboot /reboot - (Owner Only) Restart the bot.
1179
+ !ping /ping - Check bot latency.
1180
+ !uptime /uptime - Show bot uptime.
1181
+ !clear /clear - (Admin/Staff) Clear messages.
1182
+ !lock /lock - (Admin/Staff) Lock the current channel.
1183
+ !unlock /unlock - (Admin/Staff) Unlock the current channel.
1184
+
1185
+ ⭐▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬⭐
1186
+ Tip: All commands support Discord Slash Commands (/) for a better experience!`;
1187
+ await message.reply(`\`\`\`\n${h}\n\`\`\``);
1188
+ return;
1189
+ }
1190
 
1191
  if (commandName === 'lineupimage') {
1192
  if (!roleStorage.isWhitelisted(message.guildId, message.member)) return sendNoPermission(message);
 
1313
 
1314
  // Only defer ChatInputCommands to prevent conflict with Button/Menu deferUpdate()
1315
  if (interaction.isChatInputCommand()) {
1316
+ const noDeferCmds = ['ping', 'friendly', 'lineup', 'scrimlineup'];
1317
  if (!noDeferCmds.includes(interaction.commandName)) {
1318
  await interaction.deferReply().catch(() => { });
1319
  }
 
2691
  if (subs.length > 0) {
2692
  line += ` (Substitute: ` + subs.map(p => `<@${p}>`).join(', ') + `)`;
2693
  }
2694
+ textRotated += line + "\n\n";
2695
  } else {
2696
+ textRotated += `⬛ **${resolvedLabel}** ➔ *Open*\n\n`;
2697
  }
2698
  }
2699
 
2700
  const embed = UI.createEmbed(`⚽ SCRIMMAGE LINEUP — ${resolveEmojis(formDisplayName, guildId)}`, text, UI.colors.primary);
2701
  embed.setFooter({ text: "Left: Team A | Right: Team B (Rotated) | Click positions to join/leave" });
2702
 
2703
+ const embedRotated = UI.createEmbed(`🔄 TEAM B (ROTATED)`, textRotated, UI.colors.success);
2704
 
2705
  const rows = [];
2706