From 89789bbb341455daef18391971f4c9a5c540f409 Mon Sep 17 00:00:00 2001 From: pakkographic <41129374+pakkographic@users.noreply.github.com> Date: Fri, 28 Jun 2024 21:44:05 +0200 Subject: [PATCH] Add project fork/copy warning message --- lib/structures/Client.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/structures/Client.ts b/lib/structures/Client.ts index 0cfd343..0e8077f 100644 --- a/lib/structures/Client.ts +++ b/lib/structures/Client.ts @@ -216,6 +216,12 @@ export class Client extends TypedEmitter { if (config.branch.toLowerCase().includes("development")) { console.log("TouchGuild Development Build (v" + config.version + ")"); if (!this.params.updateWarning) return; + if (config.version !== "dev") { + console.log("█ This is a fork or copy of the TouchGuild library, " + + "make sure to respect the license associated to the library.\n" + + "█ If this fork was made to contribute, we thank you for your commitment!"); + return; + } const res = await fetch("https://registry.npmjs.org/touchguild"); const json = await res.json() as { time: Record; }; if (Object.keys(json.time)[Object.keys(json.time).length - 1] !== config.version)