Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

304
Visualizações
how would i make this embed the the roblox link

The code I use:

const token = "";
let discord = require("discord.js");
client.on(`message`, (message) => {
    if (message.author.bot) return;
    if (!message.guild) return;
    if (message.content.startsWith("https://roblox.com")) {
        const msgLog = `[MESSAGE] [${message.guild.name}] [#${message.channel.name}] ${message.author.username}#${message.author.discriminator}: ${message.content}\n`;
        client.channels.get(`CHANNEL ID`).send(msgLog);
        return;
    }
});
client.login(token);

How would I make this have this embed and log in a certain channel

const embed = new Discord.RichEmbed()
.setTitle("64 Games")
.setColor(0x00AE86)
.setDescription("A Game Has been found!!!")
.setThumbnail("https://yagami.xyz/content/uploads/2018/11/discord-512-1.png")
.setTimestamp()
message.channel.send({embed})
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Operating under the assumption that you are using discord.js v12, there are two things you need to watch out for:

  1. Getting the channel and sending the message

In your code, you send the message in a channel by doing:

client.channels.get(`channel ID`).send(msgLog);

However, client.channels does not have the get method, you have to first use the cache property which then returns a Collection you can go through. So you should replace that with:

client.channels.cache.get(`channel ID`).send(msgLog);
  1. Setting up the embed

Your code declares the embed like so:

const embed = new Discord.RichEmbed()

However, you need to lowercase the Discord (since you initially set discord to the discord.js module, and not Discord). In addition, RichEmbed is discontinued as of discord.js v12, you should use MessageEmbed instead, like this:

const embed = new discord.MessageEmbed()
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda