mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
fix: indexAttachment bug in handleCommand (#218)
This commit is contained in:
parent
a6dae32aaf
commit
804423f2a1
@ -575,10 +575,10 @@ export class HandleCommand {
|
||||
) {
|
||||
const options: APIApplicationCommandInteractionDataOption[] = [];
|
||||
const errors: { name: string; error: string; fullError: MessageCommandOptionErrors }[] = [];
|
||||
let indexAttachment = -1;
|
||||
for (const i of (command.options ?? []) as (CommandOption & { type: ApplicationCommandOptionType })[]) {
|
||||
try {
|
||||
let value: string | boolean | number | undefined;
|
||||
let indexAttachment = -1;
|
||||
switch (i.type) {
|
||||
case ApplicationCommandOptionType.Attachment:
|
||||
if (message.attachments[++indexAttachment]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user