SHARE
TWEET

Code Discord Bot Creation by SUPRAZY #6

a guest Feb 18th, 2020 115 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require("discord.js");
  2. const colours = require("../colours.json")
  3.  
  4.  
  5. module.exports.run = async (bot, message, args) => {
  6.  
  7.     if(args[0] == "help") return message.channel.send(`Just do ${prefix}help instead`)
  8.    
  9.     if(args[0]) {
  10.         let command = args[0];
  11.         if(bot.commands.has(command)) {
  12.         command = bot.commands.get(command)
  13.         var SHembed = new Discord.RichEmbed()
  14.         .setColor(colours.green_dark)
  15.         .setAuthor(`TutoDev`, message.guild.iconURL)
  16.         .setThumbnail(bot.user.displayAvatarURL)
  17.         .setDescription(`The bot prefix is : \`!\`\n\n`)
  18.         message.channel.send(SHembed);
  19.     }}
  20.  
  21.     if(!args[0]) {
  22.         message.delete()
  23.         let embed = new Discord.RichEmbed()
  24.         .setAuthor(`Command Help !`, message.guild.iconURL)
  25.         .setColor(colours.green_dark)
  26.         .setDescription(`${message.author.username} look your dm !`)
  27.  
  28.         let Sembed = new Discord.RichEmbed()
  29.         .setColor(colours.green_dark)
  30.         .setAuthor(`TutoDev Help !`, message.guild.iconURL)
  31.         .setThumbnail(bot.user.displayAvatarURL)
  32.         .setTimestamp()
  33.         .setDescription(`These are the avaliable commands for the \`TutoDev\` !\nThe bot prefix is: \`!\` `)
  34.         .addField("Commands for members :", "``help`` ``cat`` ``dog`` ``serverinfo`` ``userinfo``")
  35.         .addField("Commands for Admin :", "`No commands for Admins`")
  36.         .setFooter("TutoDev", bot.user.displayAvatarURL)
  37.         message.channel.send(embed).then(m => m.delete(5000));
  38.         message.author.send(Sembed)
  39.     }
  40.    
  41. }
  42.  
  43. module.exports.help = {
  44.     name: "help"
  45. }
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