Suggestions and guide now work in DMs. Invite no longer has the bot scope (no longer required by discord)
diff --git a/src/utils/confirmationMessage.ts b/src/utils/confirmationMessage.ts
index 0e4a9b4..f5aaa6b 100644
--- a/src/utils/confirmationMessage.ts
+++ b/src/utils/confirmationMessage.ts
@@ -226,7 +226,7 @@
try {
component = await m.awaitMessageComponent({
filter: (i) =>
- i.user.id === this.interaction.user.id && i.channel!.id === this.interaction.channel!.id,
+ i.user.id === this.interaction.user.id && (i.channel ? (i.channel!.id === this.interaction.channel!.id) : true),
time: 300000
});
} catch (e) {
diff --git a/src/utils/dualCollector.ts b/src/utils/dualCollector.ts
index e96ff5d..28fa2bc 100644
--- a/src/utils/dualCollector.ts
+++ b/src/utils/dualCollector.ts
@@ -54,7 +54,7 @@
return i.channel!.id === m.channel!.id && i.user.id === user.id;
}
function defaultModalFilter(i: ModalSubmitInteraction, user: User, m: Message) {
- return i.channel!.id === m.channel!.id && i.user.id === user.id;
+ return (i.channel ? (i.channel!.id === m.channel!.id) : true) && i.user.id === user.id;
}
export async function modalInteractionCollector(