Merge branch 'dev' into release

This commit is contained in:
Noah committed 2021-12-18 22:59:41 -06:00
commit bde62a431f
1 file changed
+4 -3
+4 -3
View File
@@ -246,9 +246,9 @@ module.exports = new Command({
components: [row], components: [row],
}); });
const filter = (i) => i.user.id === interaction.user.id;
let collector; let collector;
try { try {
const filter = (i) => i.user.id === interaction.user.id;
collector = await m.awaitMessageComponent({ collector = await m.awaitMessageComponent({
filter, filter,
max: 1, max: 1,
@@ -256,7 +256,7 @@ module.exports = new Command({
time: supportbot.Timeout * 60000, time: supportbot.Timeout * 60000,
}); });
} catch (e) { } catch (e) {
if (e.code == "INTERACTION_COLLECTOR_ERROR") if (e.code == "INTERACTION_COLLECTOR_ERROR") {
try { try {
TicketData = await JSON.parse( TicketData = await JSON.parse(
fs.readFileSync("./Data/TicketData.json", "utf8") fs.readFileSync("./Data/TicketData.json", "utf8")
@@ -276,7 +276,8 @@ module.exports = new Command({
"Your ticket has timed out. Please open a new one, and select a department." "Your ticket has timed out. Please open a new one, and select a department."
); );
} catch (e) {} } catch (e) {}
return await ticketChannel.delete(); return await ticketChannel.delete();
}
} }
let role; let role;
let title; let title;