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

111
Views
¿Cómo hago que un bot de discordia que hice sea configurable por servidor?

Recientemente hice un bot de filtro de palabras de discordia y me preguntaba cómo podría configurarlo por servidor. Quiero poder hacer un comando que agregue palabras para filtrar al código y quiero que las personas puedan agregar un prefijo personalizado por servidor. También quiero que las personas puedan configurar su canal de registro por servidor. ¿Alguien puede ayudarme con esto por favor? Pasé mucho tiempo en este bot y no quiero seguir haciendo más del mismo bot para diferentes servidores. Estoy usando discord.js 12.5.3. Adjuntaré mi código a continuación.

 const Discord = require('discord.js'); const client = new Discord.Client(); client.once('ready', async () => { console.log('yay, the bot is online') client.user.setActivity('im real', {type: 'PLAYING'}) }) client.on('message', async message => { if(message.channel.type === 'dm' || message.author.bot) return; const logChannel = client.channels.cache.find(channel => channel.id === '921730444498726924') let words = [“bad”, “words”, “here”] let foundInText = false; for (var i in words) { if (message.content.toLowerCase().includes(words[i].toLowerCase())) foundInText = true; } if (foundInText) { let logEmbed = new Discord.MessageEmbed() .setDescription(<@${message.author.id}> Said a bad word) .addField('The Message', message.content) .setColor('RANDOM') .setTimestamp() logChannel.send(logEmbed) let embed = new Discord.MessageEmbed() .setDescription('That word is not allowed here') .setColor('RANDOM') .setTimestamp() let msg = await message.channel.send(embed); message.delete() msg.delete({timeout: '3500'}) } })

Intenté seguir un tutorial pero no funcionó porque necesito uno específico para mi caso. Si alguien pudiera ayudar, sería genial.

about 4 years ago · Juan Pablo Isaza
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!