Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/types/other/FakeMessageInteraction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class FakeMessageInteraction /* implements ChatInputCommandInteraction */
dbiChatInput: TDBIInteractions<NamespaceEnums>;
dbiChatInputOptions: any[];
fake: boolean = true;
commandMessage: Message;
_hoistedOptions: any;
_initialized: boolean = false;
_lastAction: string | undefined;
Expand Down Expand Up @@ -70,6 +71,7 @@ export class FakeMessageInteraction /* implements ChatInputCommandInteraction */
this.fullCommandName = chatInput.name;
this.dbiChatInput = chatInput;
this.dbiChatInputOptions = chatInput.options ? chatInput.options.map(i => ({ ...i })) : [];
this.commandMessage = message;

{
const argContent = message.content.slice(usedPrefix.length + commandName.length).replace(/ +/, " ").trim();
Expand Down Expand Up @@ -157,8 +159,12 @@ export class FakeMessageInteraction /* implements ChatInputCommandInteraction */
if (self.guildId && (c as any).guildId && (c as any).guildId !== self.guildId) return false;
return (c as any).name === value;
});
<<<<<<< HEAD
// @ts-ignore
if (channelType && channel?.type !== channelType && !channelType?.includes?.(channel?.type)) return null;
=======
if (channelType && channel?.type !== channelType && !channelType.includes(channel?.type)) return null;
>>>>>>> 21e367f786e8c3cfdf2c57577f3a2a901a335414
return channel;
},
getString(name: string) {
Expand Down Expand Up @@ -405,4 +411,4 @@ interface FakeMessageInteractionArgument {
value: any,
attachment?: Attachment,
name: string
}
}