"vyhledej" tuning
This commit is contained in:
parent
be228e0048
commit
08fde766c4
@ -93,7 +93,19 @@ const komandy: RESTPostAPIChatInputApplicationCommandsJSONBody[] = [
|
||||
}
|
||||
],
|
||||
required: false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "ma_soubor",
|
||||
description: "estli je u spravi nejakej souor",
|
||||
type: ApplicationCommandOptionType.Boolean,
|
||||
required: false
|
||||
},
|
||||
{
|
||||
name: "nazev_souboru",
|
||||
description: "vihledat spravi se souborem s takovim nazvem",
|
||||
type: ApplicationCommandOptionType.String,
|
||||
required: false
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
@ -45,9 +45,11 @@ const porovnat = (filtr: CommandInteractionOption): string[] => {
|
||||
const cislo = (Number(datum) - 1420070400000) * 4194304;
|
||||
return [`ID ${filtr.name == "od" ? ">" : "<"} ${cislo}`];
|
||||
}
|
||||
case "obrasek": return [`${filtr.value ? "" : " NOT"}Attachments REGEXP "\.(png|jpe?g|gif)"`];
|
||||
case "obrazekOdkaz": return [`${filtr.value ? "" : " NOT"}Content REGEXP "\.(png|jpe?g|gif)"`];
|
||||
case "link": return [`${filtr.value ? "" : " NOT"}Content REGEXP "https?://"`];
|
||||
case "obrasek": return [`${filtr.value ? "" : " NOT "}Attachments REGEXP "\.(png|jpe?g|gif|webp)"`];
|
||||
case "obrazekOdkaz": return [`${filtr.value ? "" : " NOT "}Content REGEXP "\.(png|jpe?g|gif|webp)"`];
|
||||
case "link": return [`${filtr.value ? "" : " NOT "}Content REGEXP "https?://"`];
|
||||
case "ma_soubor": return [`${filtr.value ? "" : " NOT "}Attachments != "[]"`];
|
||||
case "nazev_souboru": return [`Attachments LIKE ?`, `%${filtr.value}%`];
|
||||
}
|
||||
return [""];
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user