SHARE
TWEET

Untitled

a guest Dec 8th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (node:20440) UnhandledPromiseRejectionWarning: RangeError: RichEmbed field values may not
  2. be empty.
  3.     at RichEmbed.addField (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\discord.js\src\structures\RichEmbed.js:166:34)
  4.     at Client.bot.on (C:\Users\luuk\Desktop\TheFatalsBot\index.js:51:14)
  5.     at Client.emit (events.js:198:13)
  6.     at MessageCreateHandler.handle (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
  7.     at WebSocketPacketManager.handle (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
  8.     at WebSocketConnection.onPacket (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
  9.     at WebSocketConnection.onMessage (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
  10.     at WebSocket.onMessage (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\ws\lib\event-target.js:120:16)
  11.     at WebSocket.emit (events.js:198:13)
  12.     at Receiver.receiverOnMessage (C:\Users\luuk\Desktop\TheFatalsBot\node_modules\ws\lib\websocket.js:789:20)
  13. (node:20440) 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(). (rejection id: 1)
  14. (node:20440) [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.
  15.  
  16. //
  17. code
  18.   var kickUser = message.guild.member(message.mentions.users.first() || message.guild.member(args[0]));
  19.  
  20.         if (!kickUser) return message.channel.send("Kan niemand vinden");
  21.  
  22.         var reason = arguments.join(" ").slice(22);
  23.  
  24.         if (!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send("Je heb hier niet de juisten rechten voor");
  25.  
  26.         if (kickUser.hasPermission("MANAGE_MESSAGES")) return message.channel.send("Je kan hem niet kicken");
  27.  
  28.         var kick = new discord.RichEmbed()
  29.             .setDescription("User kicked from server")
  30.             .setColor("03adfc")
  31.             .addField("Kicked user:", kickUser)
  32.             .addField("Kicked by:", message.author)
  33.             .addField("Reason:", reason)
  34.  
  35.         var kickChannel = message.guild.channels.find(`name`, "tfbotcommands");
  36.         if (!kickChannel) return message.guild.send("Code 606 @ SavageMM");
  37.  
  38.         message.guild.member(kickUser).kick(reason);
  39.  
  40.         kickChannel.send(kick);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top