SHARE
TWEET

Untitled

a guest May 23rd, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const commando = require('discord.js-commando');
  2. const discord = require('discord.js');
  3.  
  4. class CaseCommand extends commando.Command
  5. {
  6.     constructor(client)
  7.     {
  8.         super(client,{
  9.             name: 'createcase',
  10.             group: 'help',
  11.             memberName: 'createcase',
  12.             description: 'Open A Case For Help. =createcase {reason}'
  13.         });
  14.     }
  15.  
  16.     async run(message, args)
  17.     {
  18.         message.guild.createChannel('Case_' + message.author).then(channel => {
  19.             channel.setParent('564960122510508062');
  20.             channel.setTopic(message.author.username + " - " + args);
  21.             channel.overwritePermissions(message.guild.everyone, {
  22.                 SEND_MESSAGES: false,
  23.                 VIEW_CHANNEL: false
  24.             })
  25.             message.delete();
  26.         })
  27.  
  28.         var caseembed = new discord.RichEmbed()
  29.                 .setTitle("✅Case Created✅")
  30.                 .setColor("#000000")
  31.                 .setFooter("Have A Nice Day!")
  32.                 .setDescription("Description: " + args)
  33.         message.channel.send(caseembed)
  34.     }
  35. }
  36.  
  37. module.exports = CaseCommand;
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