Rearrange default_topic in config, remove new test

This commit is contained in:
o5pxels
2020-12-21 10:38:40 -06:00
parent 29b7665279
commit 234d1cd511
3 changed files with 6 additions and 7 deletions

View File

@@ -76,11 +76,9 @@ module.exports = {
.setDescription('Please limit your ticket topic to less than 256 characters. A short sentence will do.')
.setFooter(guild.name, guild.iconURL())
);
} else if (!/("|'|`)("|'|`)/.test(config.default_topic)) {
topic = config.default_topic;
}
else if (topic.length < 1) {
topic = 'No topic given';
topic = config.tickets.default_topic.command;
}
let ticket = await Ticket.create({

View File

@@ -89,14 +89,12 @@ module.exports = {
}
}
if (!/("|'|`)("|'|`)/.test(config.default_topic)) {
topic = config.default_topic;
topic = config.tickets.default_topic.panel;
} else {
topic = 'No topic given (created via panel)';
}
let ticket = await Ticket.create({
channel: '',
creator: u.id,