Update componentBuilders.js
button update
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
// src/utils/componentBuilders.js
|
||||
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
||||
|
||||
function createMatchActionRow(matchId) {
|
||||
function createMatchActionRow(gameName) {
|
||||
// Encode the game name for the URL
|
||||
const encodedGameName = encodeURIComponent(gameName);
|
||||
const matchhubUrl = `https://www.vrbattles.gg/games/${encodedGameName}`;
|
||||
|
||||
return new ActionRowBuilder()
|
||||
.addComponents(
|
||||
new ButtonBuilder()
|
||||
.setLabel('View Match Details')
|
||||
.setLabel('View Matchhub')
|
||||
.setStyle(ButtonStyle.Link)
|
||||
.setURL(`https://www.vrbattles.gg/matches/${matchId}`),
|
||||
.setURL(matchhubUrl),
|
||||
new ButtonBuilder()
|
||||
.setLabel('Join VRBattles Discord')
|
||||
.setStyle(ButtonStyle.Link)
|
||||
|
||||
Reference in New Issue
Block a user