@open-discord-bots/framework 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  <p align="center">
2
- <img src="https://apis.dj-dj.be/cdn/opendiscord/logo.png" alt="Open Ticket" width="650px"><br>
2
+ <img src="https://apis.dj-dj.be/cdn/opendiscord/logo.png" alt="Open Discord Logo" width="650px"><br>
3
3
  <span align="center"><b>A modular framework for the next-generation of Discord bots</b></span><br><br>
4
- <a href="https://otgithub.dj-dj.be"><img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" height="55px"></a>
5
- <a href="https://otgithub.dj-dj.be"><img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation" height="60px"></a><br><br>
4
+ <a href="https://otgithub.dj-dj.be"><img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket Logo" height="55px"></a>
5
+ <a href="https://otgithub.dj-dj.be"><img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation Logo" height="60px"></a><br><br>
6
6
  <a href="https://discord.com/invite/26vT9wt3n3"><img alt="Discord Invite Link" src="https://img.shields.io/badge/discord-support%20server-5865F2.svg?style=flat-square&logo=discord"></img></a>
7
7
  <a href="https://github.com/open-discord-bots/plugins/blob/main/LICENSE"><img alt="Open Discord Plugins License" src="https://img.shields.io/badge/license-MIT-important.svg?style=flat-square"></img></a>
8
8
  <a href="https://discord.dj-dj.be"><img alt="Open Discord Plugins Stars" src="https://img.shields.io/github/stars/open-discord-bots/framework?color=yellow&label=stars&logo=github&style=flat-square"></img></a>
@@ -80,12 +80,20 @@ function frameworkStartup(startupFlags, project, startCallback) {
80
80
  "./plugins/",
81
81
  "./.github/",
82
82
  "./.github/FUNDING.yml",
83
- "./.github/SECURITY.yml"
83
+ "./.github/SECURITY.md"
84
84
  ];
85
85
  for (const path of requiredStructures) {
86
86
  if (!fs_1.default.existsSync(path))
87
- throw new Error(logTitle + ": Project uses invalid structure for Open Discord! (" + path + ")");
87
+ throw new Error(logTitle + ": Project uses invalid structure for Open Discord! (missing: " + path + ")");
88
88
  }
89
+ if (!fs_1.default.readFileSync("./.github/FUNDING.yml").toString().startsWith("github: DJj123dj"))
90
+ throw new Error(logTitle + ": Please do not use this framework in third party bots outside Open Ticket/Moderation! (1)");
91
+ const readmeContents = fs_1.default.readFileSync("./README.md").toString();
92
+ if (!readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="650px">`) &&
93
+ !readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation" width="650px">`))
94
+ throw new Error(logTitle + ": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (2)");
95
+ if (!readmeContents.includes("DJdj Development") || !readmeContents.includes("DJj123dj"))
96
+ throw new Error(logTitle + ": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (3)");
89
97
  //start compilation
90
98
  if (!process.argv.includes("--no-compile")) {
91
99
  const requiredDependencies = new Set();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@open-discord-bots/framework",
3
3
  "author": "DJj123dj",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "description": "The core framework of the popular open-source discord bots: Open Ticket & Open Moderation.",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "build": "node ./tools/cleanup.js && tsc -p ./tsconfig.json"
10
10
  },
11
11
  "keywords": [],
12
- "license": "MIT",
12
+ "license": "GPL-3.0-only",
13
13
  "dependencies": {
14
14
  "@discordjs/rest": "^2.6.0",
15
15
  "@types/terminal-kit": "^2.5.7",
@@ -80,11 +80,18 @@ export function frameworkStartup(startupFlags:string[],project:ODProjectType,sta
80
80
  "./plugins/",
81
81
  "./.github/",
82
82
  "./.github/FUNDING.yml",
83
- "./.github/SECURITY.yml"
83
+ "./.github/SECURITY.md"
84
84
  ]
85
85
  for (const path of requiredStructures){
86
- if (!fs.existsSync(path)) throw new Error(logTitle+": Project uses invalid structure for Open Discord! ("+path+")")
86
+ if (!fs.existsSync(path)) throw new Error(logTitle+": Project uses invalid structure for Open Discord! (missing: "+path+")")
87
87
  }
88
+ if (!fs.readFileSync("./.github/FUNDING.yml").toString().startsWith("github: DJj123dj")) throw new Error(logTitle+": Please do not use this framework in third party bots outside Open Ticket/Moderation! (1)")
89
+ const readmeContents = fs.readFileSync("./README.md").toString()
90
+ if (
91
+ !readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openticket/logo.png" alt="Open Ticket" width="650px">`) &&
92
+ !readmeContents.includes(`<img src="https://apis.dj-dj.be/cdn/openmoderation/logo.png" alt="Open Moderation" width="650px">`)
93
+ ) throw new Error(logTitle+": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (2)")
94
+ if (!readmeContents.includes("DJdj Development") || !readmeContents.includes("DJj123dj")) throw new Error(logTitle+": Please do not use this framework in third party bots or outside Open Ticket/Moderation! (3)")
88
95
 
89
96
  //start compilation
90
97
  if (!process.argv.includes("--no-compile")){