mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 14:06:07 +00:00
fix: argsParser content
This commit is contained in:
parent
d05dbeac28
commit
963dcf02cf
@ -114,11 +114,12 @@ export async function onMessageCreate(
|
|||||||
attachments: {},
|
attachments: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
const args = (self.options?.commands?.argsParser ?? defaultArgsParser)(
|
let newContent = content;
|
||||||
content.slice(fullCommandName.length + 1),
|
for (const i of fullCommandName.split(' ')) {
|
||||||
command,
|
newContent = newContent.slice(newContent.indexOf(i) + i.length);
|
||||||
message,
|
}
|
||||||
);
|
|
||||||
|
const args = (self.options?.commands?.argsParser ?? defaultArgsParser)(newContent.slice(1), command, message);
|
||||||
const { options, errors } = await parseOptions(self, command, rawMessage, args, resolved);
|
const { options, errors } = await parseOptions(self, command, rawMessage, args, resolved);
|
||||||
const optionsResolver = new OptionResolver(self, options, parent as Command, message.guildId, resolved);
|
const optionsResolver = new OptionResolver(self, options, parent as Command, message.guildId, resolved);
|
||||||
const context = new CommandContext(self, message, optionsResolver, shardId, command);
|
const context = new CommandContext(self, message, optionsResolver, shardId, command);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user