anketa work again
This commit is contained in:
parent
e449ee1e62
commit
70f224caed
@ -18,7 +18,7 @@ const exp: Modul = {
|
|||||||
const opt = int.options;
|
const opt = int.options;
|
||||||
const settings = {
|
const settings = {
|
||||||
time: lookup<number>(opt, "cas") || 60,
|
time: lookup<number>(opt, "cas") || 60,
|
||||||
immediateShow: lookup<boolean>(opt, "neprubezny"),
|
immediateShow: !lookup<boolean>(opt, "neprubezny"),
|
||||||
listNames: lookup<boolean>(opt, "jmena")
|
listNames: lookup<boolean>(opt, "jmena")
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -28,7 +28,6 @@ const exp: Modul = {
|
|||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
// return await zbytek(settings, moznosti, int);
|
|
||||||
if (moznosti.length < 2) return "zadej alespo%n dve moznosti";
|
if (moznosti.length < 2) return "zadej alespo%n dve moznosti";
|
||||||
if (moznosti.length > 25) return "toje moc";
|
if (moznosti.length > 25) return "toje moc";
|
||||||
|
|
||||||
@ -68,7 +67,7 @@ const exp: Modul = {
|
|||||||
prepocitat();
|
prepocitat();
|
||||||
if (settings.immediateShow) embed.fields = fildy;
|
if (settings.immediateShow) embed.fields = fildy;
|
||||||
const zprava = await int.reply({ embeds: [embed], components: radky });
|
const zprava = await int.reply({ embeds: [embed], components: radky });
|
||||||
const collector = zprava.createMessageComponentCollector<ComponentType.Button>({ filter: i => i.message.id == zprava.id, time: settings.time * 1000 });
|
const collector = zprava.createMessageComponentCollector<ComponentType.Button>({ time: settings.time * 1000 });
|
||||||
|
|
||||||
collector.on("collect", d => {
|
collector.on("collect", d => {
|
||||||
if (!(d.message instanceof Message)) return;
|
if (!(d.message instanceof Message)) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user