Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const footer = "Master [Code-Docs]";
- module.exports.run = async (bot, message, args) => {
- // Id van category van tickets.
- const categoryId = "691192396276432946";
- // Als bericht in ticket kanaal is dan verwijder kanaal ander zend bericht
- if (message.channel.parentID == categoryId) {
- message.channel.delete();
- } else {
- message.channel.send("Use the command in 🔖 TICKETS MESSAGE Category");
- }
- let Sender = message.author;
- const closemsg = args.slice(0).join(" ");
- if(!closemsg) return message.channel.send(":x: " + "`| Please mention the issues in your ticket, more info we got that way we can find the best solution for you Usage: </>ticket <message>`").then(msg => msg.delete(5000))
- message.delete();
- var embedCloseTicket = new Discord.MessageEmbed()
- .setColor("#1f264d")
- .setAuthor('Master [Code-Docs] Ticket Message!', 'https://thumbs.gfycat.com/DeliciousJoyfulAustralianshelduck-max-1mb.gif')
- .addField("Ticket sent by", Sender, true)
- .addField("Ticket: ", args)
- .setFooter("Ticket Completed & Closed")
- .setTimestamp();
- // Vind kanaal voor de logs.
- var logChannel = message.guild.channels.cache.find(x => x.name === "🔖◦tickets")
- //var logChannel = message.guild.channels.cache.find("name", "🔖◦tickets");
- if (!logChannel) return message.channel.send("Channel don\'t exsist");
- logChannel.send(embedCloseTicket);
- }
- module.exports.config = {
- name: "ticket-close-2",
- aliases: ["close"],
- description: "Close The Ticket"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement