Botu sunucuya alan kişiyeSunucu sahibine mi mesaj gitmesini istiyorsun? Yoksa herhangi bir kanala mı?
Sunucu sahibine mi mesaj gitmesini istiyorsun? Yoksa herhangi bir kanala mı?
.Botu sunucuya alan kişiye
Embedsiz;Birisi botumu bir sunucuya aldığında dm den ona mesaj gitsin. Embed bir biçimde. Nasıl yaparım?
client.on("guildCreate", (guild) => {
guild.owner.send(`Beni sunucuna aldığın için teşekkür ederim.!`)
});
client.on("guildCreate", (guild) => {
const embed = new Discord.MessageEmbed()
.setDescription('Beni sunucuna aldığın için teşekkür ederim.!')
.setFooter('Oyuncular Şehri | Türk Oyuncu Topluluğu')
guild.owner.send(embed)
});
(node:524) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of nullEmbedsiz;
JavaScript:client.on("guildCreate", (guild) => { guild.owner.send(`Beni sunucuna aldığın için teşekkür ederim.!`) });
Embedli;
JavaScript:client.on("guildCreate", (guild) => { const embed = new Discord.MessageEmbed() .setDescription('Beni sunucuna aldığın için teşekkür ederim.!') .setFooter('Oyuncular Şehri | Türk Oyuncu Topluluğu') guild.owner.send(embed) });
@ArdaDemr(node:524) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
(node:524) 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: 1)
(node:524) [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.
ID olan yerlere baktığımda hiç sorun çıkarmayan şeyler var. Bu kodu ekledikten sonra id of null hatası vermeye başladı
Tam ekran hata ss'i atar mısın? Çünkü benim attığım kodlamadan kaynaklı değil sanırsam bu hata.
kodları mı?Tam ekran hata ss'i atar mısın? Çünkü benim attığım kodlamadan kaynaklı değil sanırsam bu hata.
Bu hata yarım. Tam hatayı atar mısın?(node:524) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
(node:524) 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: 1)
(node:524) [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.
ID olan yerlere baktığımda hiç sorun çıkarmayan şeyler var. Bu kodu ekledikten sonra id of null hatası vermeye başladı
(node:1154) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of nullBu hata yarım. Tam hatayı atar mısın?
Hatayı farklı bir kodlamanız vermekte. Bu kodlamayla alakasız.(node:1154) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of null
at Client.<anonymous> (/home/runner/ghost/index.js:55:54)
at Client.emit (events.js:326:22)
at MessageCreateAction.handle (/home/runner/ghost/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (/home/runner/ghost/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/runner/ghost/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/runner/ghost/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/runner/ghost/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/runner/ghost/node_modules/ws/lib/event-target.js:132:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/runner/ghost/node_modules/ws/lib/websocket.js:825:20)
(node:1154) 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: 1)
(node:1154) [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.
Ekli dosyayı görüntüle 4973
Oysaki çalışıyordu ve komut hala çalışıyor.
Ama hocam bu kodunuzu ekledikten sonra oldu.Hatayı farklı bir kodlamanız vermekte. Bu kodlamayla alakasız.
bu bolumde sorun gözüküyor.Ama hocam bu kodunuzu ekledikten sonra oldu.