Facebook
From Ungracious Curlew, 1 Week ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 24
  1. client.on('message', message => {
  2.  
  3.     if (!message.content.startsWith(prefix) || message.author.bot) return;
  4.  
  5.     const args = message.content.slice(prefix.length).split(/ +/);
  6.  
  7.     const commandName = args.shift().toLowerCase();
  8.  
  9.     const command = client.commands.get(commandName) || client.commands.find
  10.  
  11.     (cmd => cmd.aliases && cmd.aliases.includes(commandName));
  12.    
  13.     try {
  14.  
  15.         command.run(message, args);
  16.  
  17.     } catch (error) {
  18.  
  19.         console.error(error);
  20.  
  21.         const commandErrorEmbed = new Discord.MessageEmbed()
  22.         .setTitle('Error whilst executing this command. . .')
  23.         .setColor(greyColor)
  24.         .setTimestamp()
  25.         .setFooter('All rights reserved • OG Development', 'https://i.imgur.com/wMdKQYB.png')
  26.         .addField('Reasons for the error are likely:', '• An unknown commandn• Command not entered correctlyn• An internal Error has occured')
  27.  
  28.         message.reply(commandErrorEmbed);
  29.     }
  30. })
  31.  
  32. client.login(token)

Replies to Untitled rss

Title Name Language When
Re: Untitled Scorching Pintail text 1 Week ago.