Advertisement
ninja-gen

Shutdown Command

Mar 29th, 2020
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2.  
  3. exports.run = async (client, message, args) => {
  4.  
  5. const embed = new Discord.RichEmbed()
  6.   .setColor("#ff9900")
  7.   .setTitle("Permissions Error")
  8.   .setDescription("You scrub, what made you think you'd be able to do that?? :face_palm:")
  9.   .setFooter(``, ``)
  10.  
  11. if(message.author.id !== 'YOUR ID')) {
  12.     return message.channel.send(embed);
  13.   } else {
  14.  message.delete().catch(); 
  15. try {
  16.         await message.channel.send("Restarting & Checking for Updates!! :wave:")
  17.         process.exit()
  18.     } catch(e) {
  19.         message.channel.send(`ERROR: ${e.message}`)
  20.     }
  21.    
  22.  
  23.  
  24.     }
  25. }
  26.  
  27. exports.conf = {
  28.   enabled: true,
  29.   guildOnly: false,
  30.   aliases: [],
  31.   permLevel: 5
  32. };
  33.  
  34. exports.help = {
  35.   name: 'shutdown',
  36.   description: 'Restarts and Updates the bot process',
  37.   usage: 'nb/shutdown',
  38.   group: 'Owner'
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement