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
+3 -2
+3 -2
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")
@@ -278,6 +278,7 @@ module.exports = new Command({
} catch (e) {} } catch (e) {}
return await ticketChannel.delete(); return await ticketChannel.delete();
} }
}
let role; let role;
let title; let title;
if (collector.customId === "Department1") { if (collector.customId === "Department1") {