hopefully fixed spink of people who not spink

This commit is contained in:
Histmy 2021-11-24 12:00:32 +01:00 committed by GitHub
parent f18c65d468
commit 7bb325f065
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,9 @@ const exp: Modul = {
run: (mes, arg) => {
const f = arg != "";
if (!ping.test(arg) && f) return "sikkt";
const id = f ? mes.mentions.members!.first()!.id : mes.author.id;
const tajmUp = spinkacky[id].timeup;
const id = f ? mes.mentions.members?.first()?.id : mes.author.id;
const tajmUp = spinkacky[id]?.timeup;
if (tajmUp === undefined) return `tuten kkt jeste nespal ${emouty.lukiw}`;
if (tajmUp === false) return "ten kkt jiz ickon spi";
const cas = Number(new Date()) - Number(new Date(tajmUp));
return `uz ${f ? "je" : "jsi"} vzhuru ${formatCas(cas / 1000)}`;