fixed new.js

This commit is contained in:
Eartharoid 2019-10-22 22:29:30 +01:00
parent d4522cd729
commit 60044a1e70
2 changed files with 75 additions and 69 deletions

View File

@ -38,7 +38,9 @@ module.exports = {
};
message.guild.createChannel(`ticket-${id}`).then(async c => {
message.guild.createChannel(`ticket-${id}`, {
type: 'text'
}).then(async c => {
c.setParent(config.ticketsCat);
// let supportRole = message.guild.roles.find(`id`, config.supportRole)
let supportRole = message.guild.roles.get(config.supportRole)
@ -65,7 +67,9 @@ module.exports = {
};
if (config.ticketImage) {
await c.send(`__**Here's your ticket channel, ${message.author}**__`,{files: [`./image.png`]})
await c.send(`__**Here's your ticket channel, ${message.author}**__`, {
files: [`./image.png`]
})
} else {
await c.send(`__**Here's your ticket channel, ${message.author}**__`)
}
@ -102,7 +106,9 @@ module.exports = {
.addField("Channel", c, true)
.setFooter(`DiscordTickets`)
.setTimestamp();
client.channels.get(config.logChannel).send({embed})
client.channels.get(config.logChannel).send({
embed
})
} else {
client.channels.get(config.logChannel).send(`New ticket created by **${message.author.tag} (${message.author.id})**`);
}

View File

@ -4,8 +4,8 @@
"description": "A Discord ticket/support - an open-source & self-hosted bot",
"main": "index.js",
"dependencies": {
"discord.js": "^11.4.2",
"leekslazylogger": "^1.1.3"
"discord.js": "^11.5.1",
"leekslazylogger": "^1.1.7"
},
"devDependencies": {},
"scripts": {