Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

250
Vistas
Connect to game server using Discord Embed

I am trying to send a message to a channel when a client executes a specific slash command. The command should send a embed that will contain a field. I want to make that field "clickable" so that people can join.

I want them to join a steam game server (CS:GO) that uses the protocol steam://connect/ip:port/password to connect.

I tried the following to send the message:

const { SlashCommandBuilder } = require('@discordjs/builders');
const { MessageEmbed } = require('discord.js');

module.exports = {
    data: new SlashCommandBuilder()
        .setName('stackoverflow')
        .setDescription('Question to stackoverflow'),

    async execute(interaction) {
        const embed = new MessageEmbed()
            .setColor('#ff0000')
            .setTitle('test')
            .setAuthor({ 
                name: 'Test'
            })
            .setDescription('Testing')
            .addField('Click below to join the server', '[Click here](steam://node1.spirtshop.cf:6002/TestesNexus!2022)')
            .addFields(
                { name: '\u200b', value: '[Join the server](steam://node1.spirtshop.cf:6002/TestesNexus!2022)'},
                { name: 'Connect through the console', value: 'connect node1.spirtshop.cf:6002; password TestesNexus!2022'}
            )
            .setTimestamp()
            .setFooter({
                 text: 'Just testing'
            });
        await interaction.reply({embeds: [embed]});
    },
};

Unfortunately, this doesn't work: (output) -> https://i.imgur.com/D4xCCVm.png

I've found some bots written in python, however, I couldn't take that into NodeJS. In my interpretation Discord just recognizes as a "clickable link" if I send it as the protocol(?).

The expected result is something like this: https://i.imgur.com/efAENqq.png

From that screen shot, I just want to replace the steam://.... with some text.

Any idea of how I can make this?

(using nodejs v17.4.0, discordjs v13.6.0)

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda