SHARE
TWEET

close.js

a guest Jul 22nd, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const discord = require("discord.js");
  2.  
  3. module.exports.run = async (bot, message, args) => {
  4.  
  5.     const categoryId = "599022036286832641";
  6.  
  7.  (message.channel.parentID == categoryId)
  8.    message.channel.delete();
  9.     else {
  10.    message.channel.send("The ticket is now closing!");
  11.     }
  12.  
  13.     var embedCloseTicket = new discord.RichEmbed()
  14.         .setTitle("H8i, " + message.channel.name)
  15.         .setDescription("This ticket has now been marked as **solved**!")
  16.         .setFooter("QuickQubix | ©2019");
  17.  
  18.     var logChannel = message.guild.channels.find("name", "›archives‹");
  19.     if (!logChannel) return message.channel.send("Ticket Closed!");
  20.  
  21.     logChannel.send(embedCloseTicket);
  22.  
  23. }
  24.  
  25. module.exports.help = {
  26.     name: "close",
  27.     description: "Mark the ticket as solved!"
  28. }
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