Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
DiscordJS: Crear hilo para el propio mensaje del bot

Quiero que el bot cree un hilo para su propio mensaje, pero no sé cómo hacerlo. Me las arreglé para hacer que cree un hilo para el mensaje del usuario, pero eso es todo.

 client.on('messageCreate', async message => { if(message.author.bot) return; if(message.channel.id == config.suggestChannelID) { const suggestEmbed = new MessageEmbed() .setColor('#FEE75C') .setTitle(`${message.content}`) .setAuthor({ name: `${message.member.displayName}`, iconURL: `[REDACTED]`, url: `[REDACTED]` }) .setTimestamp() .setFooter({ text: 'SuggestManager', iconURL: '[REDACTED]', }); const discussThread = await message.startThread({ name: 'name', autoArchiveDuration: 60, type: 'GUILD_PUBLIC_THREAD', reason: 'test' }); await message.reply({embeds: [suggestEmbed]}).then(sentEmbed => { sentEmbed.react("👍") sentEmbed.react("👎") }); message.delete(message.id); }; });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Se agregó const threadAuthor para guardar el autor del mensaje original y se reemplazó sentEmbed con la función (mensaje)

 client.on('messageCreate', async message => { if(message.author.bot) return; if(message.channel.id == config.suggestChannelID) { //added this const threadAuthor = message.member.displayName; const suggestEmbed = new MessageEmbed() .setColor('#FEE75C') .setTitle(`${message.content}`) .setAuthor({ name: `${message.member.displayName}`, iconURL: `[REDACTED]`, url: `[REDACTED]` }) .setTimestamp() .setFooter({ text: 'SuggestManager', iconURL: '[REDACTED]', }); //changed this await message.reply({embeds: [suggestEmbed]}).then(function (message) { message.react("👍") message.react("👎") message.startThread({ name: `${threadAuthor}-${message.createdTimestamp}`, autoArchiveDuration: 60, type: 'GUILD_PUBLIC_THREAD' }); }); message.delete(message.id); }; });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!