mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Rearrange default_topic in config, remove new test
This commit is contained in:
parent
29b7665279
commit
234d1cd511
@ -76,11 +76,9 @@ module.exports = {
|
|||||||
.setDescription('Please limit your ticket topic to less than 256 characters. A short sentence will do.')
|
.setDescription('Please limit your ticket topic to less than 256 characters. A short sentence will do.')
|
||||||
.setFooter(guild.name, guild.iconURL())
|
.setFooter(guild.name, guild.iconURL())
|
||||||
);
|
);
|
||||||
} else if (!/("|'|`)("|'|`)/.test(config.default_topic)) {
|
|
||||||
topic = config.default_topic;
|
|
||||||
}
|
}
|
||||||
else if (topic.length < 1) {
|
else if (topic.length < 1) {
|
||||||
topic = 'No topic given';
|
topic = config.tickets.default_topic.command;
|
||||||
}
|
}
|
||||||
|
|
||||||
let ticket = await Ticket.create({
|
let ticket = await Ticket.create({
|
||||||
|
@ -89,14 +89,12 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!/("|'|`)("|'|`)/.test(config.default_topic)) {
|
if (!/("|'|`)("|'|`)/.test(config.default_topic)) {
|
||||||
topic = config.default_topic;
|
topic = config.tickets.default_topic.panel;
|
||||||
} else {
|
} else {
|
||||||
topic = 'No topic given (created via panel)';
|
topic = 'No topic given (created via panel)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let ticket = await Ticket.create({
|
let ticket = await Ticket.create({
|
||||||
channel: '',
|
channel: '',
|
||||||
creator: u.id,
|
creator: u.id,
|
||||||
|
@ -47,7 +47,6 @@ module.exports = {
|
|||||||
colour: '#009999',
|
colour: '#009999',
|
||||||
err_colour: 'RED',
|
err_colour: 'RED',
|
||||||
cooldown: 3,
|
cooldown: 3,
|
||||||
default_topic: '',
|
|
||||||
guild: '', // ID of your guild (REQUIRED)
|
guild: '', // ID of your guild (REQUIRED)
|
||||||
staff_role: '', // ID of your Support Team role (REQUIRED)
|
staff_role: '', // ID of your Support Team role (REQUIRED)
|
||||||
|
|
||||||
@ -65,6 +64,10 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
tickets: {
|
tickets: {
|
||||||
|
default_topic: {
|
||||||
|
command: 'No topic given',
|
||||||
|
panel: 'Created via panel'
|
||||||
|
},
|
||||||
category: '', // ID of your tickets category (REQUIRED)
|
category: '', // ID of your tickets category (REQUIRED)
|
||||||
send_img: true,
|
send_img: true,
|
||||||
ping: 'here',
|
ping: 'here',
|
||||||
|
Loading…
Reference in New Issue
Block a user