@spatulox/simplediscordbot 2.1.1 → 2.1.2

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/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Changelog
2
2
  Date format : dd/mm/yyy
3
3
 
4
- ### 15/04/2026 - 2.1.0
4
+ ### 15/04/2026 - 2.1.2
5
+ - CacheManager should now take the botname in lowercase and escape weird char
6
+
7
+ ### 15/04/2026 - 2.1.0 & 2.1.1
5
8
  - Add a CacheManager for simple persisting data
6
9
  - Add QoL method to FileManager (fileExist(), deleteFile())
7
10
  - Fix :
package/dist/index.js CHANGED
@@ -14330,7 +14330,7 @@ var BotInteraction = class {
14330
14330
  // package.json
14331
14331
  var package_default = {
14332
14332
  name: "@spatulox/simplediscordbot",
14333
- version: "2.1.0",
14333
+ version: "2.1.1",
14334
14334
  author: "Spatulox",
14335
14335
  description: "Simple discord bot framework to set up a bot under 30 secondes",
14336
14336
  exports: {
@@ -14622,7 +14622,11 @@ var FileManager = class {
14622
14622
  var import_path2 = __toESM(require("path"));
14623
14623
  var CacheManager = class {
14624
14624
  static get cacheDir() {
14625
- return import_path2.default.join(process.cwd(), `.${Bot.config?.botName ?? "simplediscordbot"}cache`);
14625
+ let folderPath = "simplediscordbot";
14626
+ if (Bot.config?.botName) {
14627
+ folderPath = this.cleanCacheId(Bot.config?.botName?.toLowerCase()).replace(" ", "_");
14628
+ }
14629
+ return import_path2.default.join(process.cwd(), `.${folderPath}cache`);
14626
14630
  }
14627
14631
  static cleanCacheId(key) {
14628
14632
  return key.replace(/[^a-zA-Z0-9_-]/g, "_");
package/dist/index.mjs CHANGED
@@ -14323,7 +14323,7 @@ var BotInteraction = class {
14323
14323
  // package.json
14324
14324
  var package_default = {
14325
14325
  name: "@spatulox/simplediscordbot",
14326
- version: "2.1.0",
14326
+ version: "2.1.1",
14327
14327
  author: "Spatulox",
14328
14328
  description: "Simple discord bot framework to set up a bot under 30 secondes",
14329
14329
  exports: {
@@ -14615,7 +14615,11 @@ var FileManager = class {
14615
14615
  import path2 from "path";
14616
14616
  var CacheManager = class {
14617
14617
  static get cacheDir() {
14618
- return path2.join(process.cwd(), `.${Bot.config?.botName ?? "simplediscordbot"}cache`);
14618
+ let folderPath = "simplediscordbot";
14619
+ if (Bot.config?.botName) {
14620
+ folderPath = this.cleanCacheId(Bot.config?.botName?.toLowerCase()).replace(" ", "_");
14621
+ }
14622
+ return path2.join(process.cwd(), `.${folderPath}cache`);
14619
14623
  }
14620
14624
  static cleanCacheId(key) {
14621
14625
  return key.replace(/[^a-zA-Z0-9_-]/g, "_");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatulox/simplediscordbot",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
4
4
  "author": "Spatulox",
5
5
  "description": "Simple discord bot framework to set up a bot under 30 secondes",
6
6
  "exports": {