Fix bug with empty topics

This commit is contained in:
Isaac 2021-05-18 23:07:38 +01:00
parent 4ebdd32512
commit 053fcdb4b8
No known key found for this signature in database
GPG Key ID: F6812DBC6719B4E3

View File

@ -103,8 +103,9 @@ module.exports = class TagCommand extends Command {
if (requires_ticket) { if (requires_ticket) {
args.ticket = t_row.toJSON(); args.ticket = t_row.toJSON();
args.ticket.topic = this.client.cryptr.decrypt(args.ticket.topic); args.ticket.topic = t_row.topic ? this.client.cryptr.decrypt(t_row.topic) : null;
} }
const text = tag.replace(/(?<!\\){{1,2}\s?:?([A-Za-z0-9._]+)\s?(?<!\\)}{1,2}/gi, ($, $1) => this.client.i18n.resolve(args, $1)); const text = tag.replace(/(?<!\\){{1,2}\s?:?([A-Za-z0-9._]+)\s?(?<!\\)}{1,2}/gi, ($, $1) => this.client.i18n.resolve(args, $1));
return await message.channel.send( return await message.channel.send(
new MessageEmbed() new MessageEmbed()