Çözüldü Discord.JS V13 Mesaj Yazdırma

Bu konu çözüldü olarak işaretlenmiştir. Çözülmediğini düşünüyorsanız konuyu rapor edebilirsiniz.
Node.JS ile nasıl v12'yi kurabilirim peki?
Bash:
Hocam aynı sayılır.
JavaScript:
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('messageCreate', message => {
  if (message.content === 'ping') {
    message.channel.send('pong');
  }
});

client.login('<place token here>');
 
Bash:
Hocam aynı sayılır.
JavaScript:
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('messageCreate', message => {
  if (message.content === 'ping') {
    message.channel.send('pong');
  }
});

client.login('<place token here>');

Hocam buradakiler kafamı karıştırmıştı. v12 ile devam ediyorum.
 

Hocam buradakiler kafamı karıştırmıştı. v12 ile devam ediyorum.
Orası / komutlarını da anlatmış.
V13 geçseydiniz keşke. / ve buton desteği vardı.
 
Orası / komutlarını da anlatmış.
V13 geçseydiniz keşke. / ve buton desteği vardı.

Kod:
(node:16764) UnhandledPromiseRejectionWarning: ReferenceError: AbortController is not defined
    at RequestHandler.execute (C:\vivabot\node_modules\discord.js\src\rest\RequestHandler.js:172:15)
    at RequestHandler.execute (C:\vivabot\node_modules\discord.js\src\rest\RequestHandler.js:176:19)
    at RequestHandler.push (C:\vivabot\node_modules\discord.js\src\rest\RequestHandler.js:50:25)
    at async WebSocketManager.connect (C:\vivabot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:128:9)
    at async Client.login (C:\vivabot\node_modules\discord.js\src\client\Client.js:245:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:16764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:16764) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Böyle bir hata aldım.
 

Yeni konular

Geri
Yukarı