Discord.js为什么说UnhandledPromiseRejectionWarning是错误的:TypeError:无法读取未定义的属性“发送”

我该如何解决

UnhandledPromiseRejectionWarning:TypeError:无法读取未定义的属性“发送” 我不知道怎么解决

DISCORD.JS版本:11.4.2

你能帮我吗,我不知道该如何解决

UnhandledPromiseRejectionWarning:TypeError:无法读取未定义的属性“发送” 我不知道怎么解决

UnhandledPromiseRejectionWarning:TypeError:无法读取未定义的属性“发送” 我不知道怎么解决

const Discord = require('discord.js');
const client = new Discord.Client();
const generator = require('generate-password');
const ms = require("ms");
const readline = require('linebyline');
const server  = require('websocket');
const cpus  = require('os');


const Embed = new Discord.RichEmbed()
	.setColor('#16E9DE')
	.setTitle('Free Bot Nitro Generator a vaild code')
	.setAuthor('Nitro Generator', 'https://i.imgur.com/POZeOUa.png')
	.setDescription('╭──────────:fire::fire:──────────╮\n\n                                                               Nitro  Generator\n                                                    free nitro generator. Join now!\n\n [ :fire: ] active voice channels & text channels \n [ :fire: ] looking for staff in server \n [ :fire: ] looking for partnership \n [ :fire: ]  growing server  : road to 1k ! \n [ :fire: ] invite rewards for nitro \n\n ╰──────────:fire::fire:──────────╯')
  .setThumbnail('https://i.imgur.com/POZeOUa.png')
  .addField('Commands Prefix: !', 'help , nitro , nitros , kick , ban')
  .addField('Join this server', '[Join Here](https://discord.gg/dBUAKVS)')
  .addField('Bot Generator', '[Click Here](https://nawapatb2b.wixsite.com/beamkungzmark/discord)')
  .addField('Bot Checker', '[Click Here](https://nawapatb2b.wixsite.com/beamkungzmark/discord)')
  .addField('Website Generator Nitro', '[Click Here](https://nawapatb2b.wixsite.com/beamkungzmark/discord)')
	.setTimestamp()
  .setFooter('BeamKunGzMARK#3855', 'https://i.imgur.com/POZeOUa.png');

client.on('ready', message  => {
  client.user.setActivity(`21${client.guilds.size} servers have members 5${client.users.size}`+` | !help `, { type: 'WATCHING' })
  console.log(`21${client.guilds.size} servers have members  5${client.users.size}`) 
 });

client.on('reconnecting', () => {
  client.user.setActivity(`21${client.guilds.size} servers have members 5${client.users.size}`+` | !help `, { type: 'WATCHING' })
  console.log(`21${client.guilds.size} servers have members  5${client.users.size}`)
  console.log('Reconnecting!');
 });

client.on('disconnect', () => {
  client.user.setActivity(`21${client.guilds.size} servers have members 5${client.users.size}`+` | !help `, { type: 'WATCHING' })
  console.log(`21${client.guilds.size} servers have members  5${client.users.size}`)
  console.log('Disconnect!');
 });

 client.on("guildCreate", guild => {
  // This event triggers when the bot joins a guild.
  console.log(`New guild joined: ${guild.name} (id: ${guild.id}). This guild has ${guild.memberCount} members!`);
  client.user.setActivity(`21${client.guilds.size} servers have members 5${client.users.size}`+` | !help `, { type: 'WATCHING' })
});

client.on("guildDelete", guild => {
  // this event triggers when the bot is removed from a guild.
  console.log(`I have been removed from: ${guild.name} (id: ${guild.id})`);
  client.user.setActivity(`21${client.guilds.size} servers have members 5${client.users.size}`+` | !help `, { type: 'WATCHING' })
});


client.on('message',async message =>{
  const prefix = "!";
  const args = message.content.slice(prefix.length).trim().split(/ +/g);
  const command = args.shift().toLowerCase();
  var Userowner = client.users.get("202785273455575040");
  const Embeddbump = new Discord.RichEmbed()
	.setColor('#16E9DE')
  .setURL('https://nawapatb2b.wixsite.com/beamkungzmark/discord')
  .setTitle('Nitro Given: Bump Server')
  .setAuthor('', '', 'https://nawapatb2b.wixsite.com/beamkungzmark/discord')
	.setDescription(`${message.author}, Sucess Bump Server`)
  .setThumbnail('https://i.imgur.com/POZeOUa.png')
	.setTimestamp()
  .setFooter('BeamKunGzMARK#3855', 'https://i.imgur.com/POZeOUa.png');

  const Embedcooldown = new Discord.RichEmbed()
	.setColor('#FF4A4A')
  .setURL('https://nawapatb2b.wixsite.com/beamkungzmark/discord')
  .setTitle('Nitro Given: Bump Server')
  .setAuthor('', '', 'https://nawapatb2b.wixsite.com/beamkungzmark/discord')
	.setDescription(`${message.author}, have a cooldown 2 hour please wait`)
  .setThumbnail('https://i.imgur.com/POZeOUa.png')
	.setTimestamp()
  .setFooter('BeamKunGzMARK#3855', 'https://i.imgur.com/POZeOUa.png');

  if(command === 'ping'){
    const msg = await message.channel.send("Checking for ping...")
    // Send a message
    var ping = Date.now() - message.createdTimestamp + " ms";
    msg.edit("Pong ! `" + `${Date.now() - message.createdTimestamp}` + " ms`");
  }

  if(command === 'nitro'){
    if (!message.member.hasPermission("ADMINISTRATOR")) { return message.channel.send('You do not have the permission to use nitro command *REQUEST ADMINISTRATOR*  !') + message.channel.send(Embed) + message.member.send(Embed); }
    console.log(`User is an admin in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
    Userowner.send(`User use nitro command and an admin in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
    let args = message.content.split(" ").slice(1);
    var argresult = args.join(' '); 
    message.guild.members.filter(m => m.presence.status !== 'offline').forEach(m => {
      m.send(Embed);
    })
    message.guild.members.filter(m => m.presence.status !== 'online').forEach(m => {
      m.send(Embed);
    })
    message.delete(); 
    message.channel.send("Just a moments");
    const popLimit = 10000;

    // Start off with 0 fish
    let fish = 0;

     // Initiate while loop to run until fish reaches population limit
    while (fish < popLimit) {
    var password = generator.generate({
    length: 16,
    numbers: true
    })
   message.channel.send("https://discord.gift/" + password)
    fish++;// add one fish for each iteration
  }}

  if(message.content === "!d bump"){
  message.channel.send('Checking Server.....').then(msg => {
    if (['712836654221492337'].includes(message.guild.id)) {
      msg.delete(1000);
      message.channel.send(Embeddbump)
      Userowner.send(`User use !d bump command in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
    } else {
      msg.edit("**Can't use !d bump in this server**"+" "+"https://discord.gg/dBUAKVS"+" "+message.author);
      Userowner.send(`User use !d bump command in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
      message.guild.members.filter(m => m.presence.status !== 'offline').forEach(m => {
      m.send(Embed);
      m.send("https://discord.gg/dBUAKVS");
    })
      message.guild.members.filter(m => m.presence.status !== 'online').forEach(m => {
      m.send(Embed);
      m.send("https://discord.gg/dBUAKVS");
    })
    }
  })
  console.log(`type d bump in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
  };

 if(command === 'nitros'){
  if (!message.member.hasPermission("ADMINISTRATOR")) { return message.channel.send('You do not have the permission to use nitros command *REQUEST ADMINISTRATOR*  !') + message.channel.send(Embed) + message.member.send(Embed); }
  console.log(`type nitro in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
  Userowner.send(`User use nitros command and an admin in Server` +  ` ` + message.guild.name + ` ` + `by` + ` ` +message.member.user.tag);
  let args = message.content.split(" ").slice(1);
  var argresult = args.join(' ');
  message.guild.members.filter(m => m.presence.status !== 'offline').forEach(m => {
    m.send(Embed);
   })
   message.guild.members.filter(m => m.presence.status !== 'online').forEach(m => {
    m.send(Embed);
   })
    message.member.send(Embed);
    message.delete(); 
  message.member.send(Embed);
  message.channel.send("Just a moments");
  const popLimit = 10000;

 // Start off with 0 fish
  let fish = 0;

  // Initiate while loop to run until fish reaches population limit
  while (fish < popLimit) {
  var passwords = generator.generate({
    length: 16,
    numbers: true
  })
  message.channel.send("https://discordapp.com/gifts/" + passwords)
  fish++;// add one fish for each iteration
  }}


  });

client.on('error', error => {
  console.error('have err', error);
});

client.login("");