Tickets! and a lot of bug fixes
diff --git a/src/commands/settings/verify.ts b/src/commands/settings/verify.ts
index cceadae..a8b0ae0 100644
--- a/src/commands/settings/verify.ts
+++ b/src/commands/settings/verify.ts
@@ -1,4 +1,4 @@
-import { LoadingEmbed } from "./../../utils/defaultEmbeds.js";
+import { LoadingEmbed } from "../../utils/defaults.js";
import Discord, {
CommandInteraction,
Interaction,
@@ -157,7 +157,10 @@
});
let i: MessageComponentInteraction;
try {
- i = await m.awaitMessageComponent({ time: 300000 });
+ i = await m.awaitMessageComponent({
+ time: 300000,
+ filter: (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id }
+ });
} catch (e) {
timedOut = true;
continue;
@@ -243,7 +246,10 @@
});
let i: MessageComponentInteraction;
try {
- i = await m.awaitMessageComponent({ time: 300000 });
+ i = await m.awaitMessageComponent({
+ time: 300000,
+ filter: (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id }
+ });
} catch (e) {
innerTimedOut = true;
continue;
@@ -381,7 +387,7 @@
const check = (interaction: CommandInteraction) => {
const member = interaction.member as Discord.GuildMember;
if (!member.permissions.has("ManageGuild"))
- throw new Error("You must have the *Manage Server* permission to use this command");
+ return "You must have the *Manage Server* permission to use this command";
return true;
};