More spink "fix"

This commit is contained in:
Histmy 2021-06-06 02:33:19 +02:00
parent 5c5db451ba
commit 213acaae39

View File

@ -8,7 +8,7 @@ const contactSpinkServer = async (akce, id, nick, avatar) => {
return await fetch(`https://spinkacek.ga/extapi.php?${options}`) return await fetch(`https://spinkacek.ga/extapi.php?${options}`)
.then(r => r.text()) .then(r => r.text())
.then(text => text === 'OK'); .then(text => text === 'OK');
} };
const syncSpink = async () => { const syncSpink = async () => {
await fetch('https://spinkacek.ga/api/spinkacky') await fetch('https://spinkacek.ga/api/spinkacky')
@ -24,7 +24,7 @@ const syncSpink = async () => {
spinkacky.push(keys[i].slice(8)); spinkacky.push(keys[i].slice(8));
} }
}); });
} };
syncSpink(); syncSpink();
@ -34,6 +34,10 @@ module.exports = {
case 'spinkáček': case 'spinkáček':
case 'spinkacek': case 'spinkacek':
if (mes.author.bot) {
mes.channel.send("až někdy<:kapp:677916836418813953>");
break;
}
(async () => { (async () => {
if (await contactSpinkServer('spinkacek', mes.author.id, mes.author.username, mes.author.avatarURL())) mes.react('😴'); if (await contactSpinkServer('spinkacek', mes.author.id, mes.author.username, mes.author.avatarURL())) mes.react('😴');
else mes.channel.send('nespis uz?????'); else mes.channel.send('nespis uz?????');
@ -42,6 +46,10 @@ module.exports = {
case 'vstáváček': case 'vstáváček':
case 'vstavacek': case 'vstavacek':
if (mes.author.bot) {
mes.channel.send("<:sjeta:623216247953424426>");
break;
}
(async () => { (async () => {
if (await contactSpinkServer('vstavacek', mes.author.id)) mes.channel.send('dobre rano hajzle'); if (await contactSpinkServer('vstavacek', mes.author.id)) mes.channel.send('dobre rano hajzle');
else mes.channel.send('uz jsi vzhuru ty hajzle'); else mes.channel.send('uz jsi vzhuru ty hajzle');
@ -76,4 +84,4 @@ module.exports = {
}); });
} }
} }
} };