mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-02 08:41:25 +03:00
update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'add',
|
||||
description: 'Add a member to a ticket channel',
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'close',
|
||||
description: 'Close a ticket',
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'example-command',
|
||||
description: 'An example command',
|
||||
|
@@ -1,6 +1,7 @@
|
||||
const Discord = require('discord.js');
|
||||
const { version } = require('../package.json');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
description: 'Displays help menu',
|
||||
@@ -38,7 +39,7 @@ module.exports = {
|
||||
.setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
|
||||
|
||||
var cmds = [];
|
||||
cmds.push(commands.map(command => embed.addField(`${config.prefix}${command.name}`, `\`${command.description}\``, true)));
|
||||
cmds.push(commands.map(command => embed.addField(`${config.prefix}${command.name}`, `\`${command.description}\``)));
|
||||
message.channel.send(embed)
|
||||
.then(() => {
|
||||
if (message.channel.type === 'dm') return;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
const randomString = require('random-string');
|
||||
module.exports = {
|
||||
name: 'new',
|
||||
@@ -17,28 +18,28 @@ module.exports = {
|
||||
const ticketChannel = "channel";
|
||||
let topic = args.join(" ");
|
||||
|
||||
function num(){
|
||||
return randomString({
|
||||
|
||||
let num = randomString({
|
||||
length: 4,
|
||||
numeric: true,
|
||||
letters: false,
|
||||
special: false,
|
||||
})
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// log
|
||||
if(config.useEmbeds) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setAuthor(`${client.user.username} / Ticket Log`, client.user.avatarURL)
|
||||
.setTitle("New Ticket")
|
||||
.addField("Username", message.author.tag, true)
|
||||
.addField("Channel", ticketChannel, true)
|
||||
.setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
|
||||
client.channels.get(config.logChannel).send({embed})
|
||||
} else {
|
||||
client.channels.get(config.logChannel).send(`New ticket created by **${message.author.tag} (${message.author.id})**`);
|
||||
}
|
||||
|
||||
// if(config.useEmbeds) {
|
||||
// const embed = new Discord.RichEmbed()
|
||||
// .setAuthor(`${client.user.username} / Ticket Log`, client.user.avatarURL)
|
||||
// .setTitle("New Ticket")
|
||||
// .addField("Username", message.author.tag, true)
|
||||
// .addField("Channel", ticketChannel, true)
|
||||
// .setFooter(`${client.guilds.get(config.guildID).name} : DiscordTickets by Eartharoid`);
|
||||
// client.channels.get(config.logChannel).send({embed})
|
||||
// } else {
|
||||
// client.channels.get(config.logChannel).send(`New ticket created by **${message.author.tag} (${message.author.id})**`);
|
||||
// }
|
||||
console.log(leeks.colors.cyan(`${message.author.tag} created a new ticket (#ticket-${num})`))
|
||||
|
||||
// command ends here
|
||||
},
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'ping',
|
||||
description: 'Calculate latency',
|
||||
|
@@ -1,5 +1,6 @@
|
||||
const Discord = require('discord.js');
|
||||
const config = require('../config.json');
|
||||
const leeks = require('leeks.js');
|
||||
module.exports = {
|
||||
name: 'remove',
|
||||
description: 'Remove a member from a ticket',
|
||||
|
Reference in New Issue
Block a user