mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
Implement placeholder for default_topic
This commit is contained in:
parent
e7d9d3558a
commit
641f13169e
@ -67,7 +67,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
let topic = args.join(' ');
|
let topic = args.join(' ');
|
||||||
if (topic.length > 256)
|
if (topic.length > 256) {
|
||||||
return message.channel.send(
|
return message.channel.send(
|
||||||
new MessageEmbed()
|
new MessageEmbed()
|
||||||
.setColor(config.err_colour)
|
.setColor(config.err_colour)
|
||||||
@ -76,7 +76,12 @@ 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 (topic.length < 1) topic = config.default_topic;
|
} else if (/^[a-zA-Z0-9]+$/.test(config.default_topic)) {
|
||||||
|
topic = config.default_topic;
|
||||||
|
}
|
||||||
|
else if (topic.length < 1) {
|
||||||
|
topic = 'No topic given';
|
||||||
|
}
|
||||||
|
|
||||||
let ticket = await Ticket.create({
|
let ticket = await Ticket.create({
|
||||||
channel: '',
|
channel: '',
|
||||||
|
@ -89,7 +89,13 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let topic = config.default_topic;
|
|
||||||
|
if (/^[a-zA-Z0-9]+$/.test(config.default_topic)) {
|
||||||
|
topic = config.default_topic;
|
||||||
|
} else {
|
||||||
|
topic = 'No topic given (created via panel)';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let ticket = await Ticket.create({
|
let ticket = await Ticket.create({
|
||||||
channel: '',
|
channel: '',
|
||||||
|
@ -47,7 +47,7 @@ module.exports = {
|
|||||||
colour: '#009999',
|
colour: '#009999',
|
||||||
err_colour: 'RED',
|
err_colour: 'RED',
|
||||||
cooldown: 3,
|
cooldown: 3,
|
||||||
default_topic: 'Support Needed',
|
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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user