update game urls and embed info
This commit is contained in:
@@ -1,9 +1,19 @@
|
|||||||
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
||||||
|
|
||||||
|
// Define exact game URLs
|
||||||
|
const GAME_URLS = {
|
||||||
|
"Big Ballers VR": "https://www.vrbattles.gg/games/Big%20Ballers%20VR",
|
||||||
|
"Blacktop Hoops": "https://www.vrbattles.gg/games/Blacktop%20Hoops",
|
||||||
|
"Breachers": "https://www.vrbattles.gg/games/Breachers",
|
||||||
|
"Echo Arena": "https://www.vrbattles.gg/games/Echo%20Arena",
|
||||||
|
"Echo Combat": "https://www.vrbattles.gg/games/Echo%20Combat",
|
||||||
|
"Gun Raiders": "https://www.vrbattles.gg/games/Gun%20Raiders",
|
||||||
|
"Nock": "https://www.vrbattles.gg/games/Nock",
|
||||||
|
"VAIL": "https://www.vrbattles.gg/games/VAIL"
|
||||||
|
};
|
||||||
|
|
||||||
function createMatchActionRow(gameName) {
|
function createMatchActionRow(gameName) {
|
||||||
// Encode the game name for the URL
|
const matchhubUrl = GAME_URLS[gameName] || "https://www.vrbattles.gg/games";
|
||||||
const encodedGameName = encodeURIComponent(gameName);
|
|
||||||
const matchhubUrl = `https://www.vrbattles.gg/games/${encodedGameName}`;
|
|
||||||
|
|
||||||
return new ActionRowBuilder()
|
return new ActionRowBuilder()
|
||||||
.addComponents(
|
.addComponents(
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// src/utils/embedBuilders.js
|
|
||||||
const { EmbedBuilder } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
|
|
||||||
function createMatchRequestEmbed(matchData) {
|
function createMatchRequestEmbed(matchData) {
|
||||||
@@ -6,16 +5,16 @@ function createMatchRequestEmbed(matchData) {
|
|||||||
const formattedDateTime = matchDateTime.toLocaleString();
|
const formattedDateTime = matchDateTime.toLocaleString();
|
||||||
|
|
||||||
return new EmbedBuilder()
|
return new EmbedBuilder()
|
||||||
.setColor('#00ff00')
|
.setColor('#00ff00') // Green for new match requests
|
||||||
.setTitle('🎮 New Match Request')
|
.setTitle('🎮 New Match Request')
|
||||||
.setDescription(`A new match has been requested for ${matchData.game_name}`)
|
.setDescription(`A new match has been requested for ${matchData.game_name}`)
|
||||||
.addFields(
|
.addFields(
|
||||||
{
|
{
|
||||||
name: 'Game Details',
|
name: 'Game Details',
|
||||||
value: [
|
value: [
|
||||||
`🎮 **Game:** ${matchData.game_name}`,
|
|
||||||
`📋 **Match Type:** ${matchData.match_type}`,
|
`📋 **Match Type:** ${matchData.match_type}`,
|
||||||
`👥 **Team Size:** ${matchData.team_size}v${matchData.team_size}`,
|
`👥 **Team Size:** ${matchData.team_size}v${matchData.team_size}`,
|
||||||
|
`🎯 **Class:** ${matchData.match_class}`
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
inline: false
|
inline: false
|
||||||
},
|
},
|
||||||
@@ -23,7 +22,6 @@ function createMatchRequestEmbed(matchData) {
|
|||||||
name: 'Match Settings',
|
name: 'Match Settings',
|
||||||
value: [
|
value: [
|
||||||
`🌍 **Region:** ${matchData.region}`,
|
`🌍 **Region:** ${matchData.region}`,
|
||||||
`🎯 **Class:** ${matchData.match_class}`,
|
|
||||||
`📅 **Date & Time:** ${formattedDateTime}`,
|
`📅 **Date & Time:** ${formattedDateTime}`,
|
||||||
].join('\n'),
|
].join('\n'),
|
||||||
inline: false
|
inline: false
|
||||||
@@ -35,7 +33,7 @@ function createMatchRequestEmbed(matchData) {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.setTimestamp()
|
.setTimestamp()
|
||||||
.setFooter({ text: `Match Request ID: ${matchData.game_id}` });
|
.setFooter({ text: 'VRBattles Match System' });
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Reference in New Issue
Block a user