Discord.js kod hata veriyor

(node:9744) DeprecationWarning: Passing strings for MessageEmbed#setAuthor is deprecated. Pass a sole object instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
D:\txn bot\node_modules\discord.js\src\rest\RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);
^

DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (D:\txn bot\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (D:\txn bot\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async TextChannel.send (D:\txn bot\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:175:15) {
method: 'post',
path: '/channels/936888598576390155/messages',
code: 50006,
httpStatus: 400,
requestData: {
json: {
content: undefined,
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined
},
files: []
}
}

Şimdi de böyle diyor?
Embeddaki .setAuthor kısmını şöyle düzelt :

.setAuthor({ name: 'txn bot'}) bunu dener misin?
 
Dostum beni yanlış anlama ama, aldığın hataları google'lamalısın. Eğer her aldığın hatada insanlardan yardım alman gerekirse iyi bir yazılımcı olamazsın.

Unutma ki, iyi google'lama da hafife alınmaması gereken bir yetenektir.
MessageEmbed#setAuthor is deprecated
olarak bir arama yaptığım anda karşıma, kendi koduna implemente edebileceğin bir çok çözüm geldi.
 

Technopat Haberler

Geri
Yukarı