Skip to content

Commit

Permalink
Add project fork/copy warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
pakkographic committed Jun 28, 2024
1 parent 7ac07dd commit 89789bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/structures/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ export class Client extends TypedEmitter<ClientEvents> {
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<string, string>; };
if (Object.keys(json.time)[Object.keys(json.time).length - 1] !== config.version)
Expand Down

0 comments on commit 89789bb

Please sign in to comment.