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

163
Views
¿Código de webhook simple 'shardCount' en error de cadena?

Estoy tratando de hacer y comenzar a aprender a codificar una oferta con API, pero tengo este error realmente molesto ... Mi código es

 const Discord = require('discord.js') const webhookID = '888151030620106792'; const webhookToken = 'token-here'; const webhook = new Discord.WebhookClient(webhookID, webhookToken); webhook.send('I am here')

Y el error que sale si es:

 PS C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api> node webhooks.js C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api\node_modules\discord.js\src\util\Util.js:336 given[key] = def[key]; ^ TypeError: Cannot create property 'shardCount' on string 'zFutoKYe-OfZrfPdh0UE5yCk2wMOe-B84Xcs_Af6a76DXTx6bt3WB48qZwH-KvUriqtI' at Function.mergeDefault (C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api\node_modules\discord.js\src\util\Util.js:336:20) at new BaseClient (C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api\node_modules\discord.js\src\client\BaseClient.js:20:25) at new WebhookClient (C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api\node_modules\discord.js\src\client\WebhookClient.js:26:5) at Object.<anonymous> (C:\Users\jonat\Desktop\Api Dev\Discord and Rest Api\webhooks.js:9:25) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) at node:internal/main/run_main_module:17:47

Recibo el mismo error cuando hago esto:

 const Discord = require('discord.js'); const webhook = new WebhookClient('888151030620106792', 'zFutoKYe-OfZrfPdh0UE5yCk2wMOe-B84Xcs_Af6a76DXTx6bt3WB48qZwH-KvUriqtI') webhook.send('Hello World;)')`
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

const discord = require('discord.js'); const data = { id: 'idhere', token: 'tokenhere' } const webhook = new discord.WebhookClient(data); webhook.send('hello');

También tuve este problema hoy, pero al enviar los datos del webhook como un objeto funcionó para mí, espero que esto ayude 👍

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!