reciple 3.1.1 → 3.1.4

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
@@ -4,7 +4,7 @@
4
4
  </h1>
5
5
 
6
6
  <h3 align="center">
7
- <a href="https://npmjs.org/package/reciple">
7
+ <a href="https://npmjs.org/package/reciple">
8
8
  <img src="https://img.shields.io/npm/v/reciple?label=latest%20npm%20release%20">
9
9
  </a>
10
10
  <a href="https://github.com/FalloutStudios/Reciple/blob/main/LICENSE">
@@ -14,11 +14,13 @@
14
14
  <img src="https://www.codefactor.io/repository/github/falloutstudios/reciple/badge/main">
15
15
  </a>
16
16
 
17
- A simple Dicord.js handler that just works.<h3>
17
+ A simple Dicord.js handler that just works.
18
+ </h3>
18
19
 
19
20
  ****
20
21
 
21
22
  ## Installation
23
+
22
24
  To install the bot, run the following command in your terminal:
23
25
 
24
26
  ```bash
@@ -58,6 +60,9 @@ You can override the given token using your terminal
58
60
  ```bash
59
61
  npx reciple --token "YOUR_TOKEN_HERE"
60
62
  ```
63
+
64
+ Use env variable
65
+
61
66
  ```bash
62
67
  npx reciple --token "env:TOKEN_VARIABLE"
63
68
  ```
package/bin/bin.js CHANGED
@@ -9,12 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
10
  });
11
11
  };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
12
15
  var _a, _b;
13
16
  Object.defineProperty(exports, "__esModule", { value: true });
14
17
  const RecipleClient_1 = require("./reciple/classes/RecipleClient");
15
18
  const RecipleConfig_1 = require("./reciple/classes/RecipleConfig");
16
19
  const flags_1 = require("./reciple/flags");
17
20
  const version_1 = require("./reciple/version");
21
+ const chalk_1 = __importDefault(require("chalk"));
18
22
  const fallout_utility_1 = require("fallout-utility");
19
23
  const fs_1 = require("fs");
20
24
  require("dotenv/config");
@@ -28,7 +32,15 @@ if ((0, fs_1.readdirSync)('./').filter(f => !f.startsWith('.') && allowedFiles.i
28
32
  if (ask.toString().toLowerCase() !== 'y')
29
33
  process.exit(0);
30
34
  }
31
- const config = new RecipleConfig_1.RecipleConfig((_b = flags_1.flags.config) !== null && _b !== void 0 ? _b : './reciple.yml').parseConfig().getConfig();
35
+ let configParser;
36
+ try {
37
+ configParser = new RecipleConfig_1.RecipleConfig((_b = flags_1.flags.config) !== null && _b !== void 0 ? _b : './reciple.yml').parseConfig();
38
+ }
39
+ catch (err) {
40
+ console.error(`${chalk_1.default.bold.red('Config Error')}: ${chalk_1.default.white(err.message)}`);
41
+ process.exit(1);
42
+ }
43
+ const config = configParser.getConfig();
32
44
  const client = new RecipleClient_1.RecipleClient(Object.assign({ config: config }, config.client));
33
45
  if (config.fileLogging.clientLogs)
34
46
  client.logger.info('Reciple Client v' + version_1.version + ' is starting...');
@@ -1,8 +1,7 @@
1
1
  import { RecipleCommandBuilderType } from '../../types/builders';
2
2
  import { RecipleHaltedCommandData } from '../../types/commands';
3
3
  import { RecipleClient } from '../RecipleClient';
4
- import { SlashCommandBuilder } from '@discordjs/builders';
5
- import { Awaitable, ChatInputCommandInteraction, PermissionResolvable } from 'discord.js';
4
+ import { Awaitable, ChatInputCommandInteraction, PermissionResolvable, SlashCommandBuilder } from 'discord.js';
6
5
  /**
7
6
  * Execute data for interaction command
8
7
  */
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InteractionCommandBuilder = void 0;
4
4
  const builders_1 = require("../../types/builders");
5
- const builders_2 = require("@discordjs/builders");
5
+ const discord_js_1 = require("discord.js");
6
6
  /**
7
7
  * Reciple builder for interaction/slash command
8
8
  */
9
- class InteractionCommandBuilder extends builders_2.SlashCommandBuilder {
9
+ class InteractionCommandBuilder extends discord_js_1.SlashCommandBuilder {
10
10
  constructor() {
11
11
  super(...arguments);
12
12
  this.builder = builders_1.RecipleCommandBuilderType.InteractionCommand;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "3.1.1",
3
+ "version": "3.1.4",
4
4
  "bin": "bin/bin.js",
5
5
  "license": "GPL-3.0",
6
6
  "main": "bin/index.js",
@@ -23,7 +23,7 @@
23
23
  "build": "yarn clean && yarn exec tsc",
24
24
  "build:publish": "yarn build && yarn npm publish && yarn build:docs && yarn publish:docs",
25
25
  "build:pub-prerelease": "yarn build && yarn publish --tag pre",
26
- "build:docs": "yarn workspace docs build",
26
+ "build:docs": "yarn exec typedoc --tsconfig ./docs/typedoc.json",
27
27
  "update:docs": "yarn workspace docs update",
28
28
  "test": "yarn build && yarn test:start",
29
29
  "test:start": "cd test && yarn exec reciple -D",
@@ -50,15 +50,20 @@
50
50
  "chalk": "4.1.2",
51
51
  "commander": "^9.4.0",
52
52
  "dotenv": "^16.0.1",
53
- "fallout-utility": "^1.4.2",
53
+ "fallout-utility": "^1.4.6",
54
54
  "semver": "^7.3.7",
55
55
  "wildcard-match": "^5.1.2",
56
56
  "yaml": "^2.1.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@types/node": "^18.0.6",
59
+ "@types/node": "^18.6.1",
60
60
  "@types/semver": "^7.3.10",
61
+ "better-docs": "^2.7.2",
61
62
  "discord.js": "^14.0.3",
63
+ "typedoc": "^0.23.9",
64
+ "typedoc-plugin-discord-types": "^1.0.2",
65
+ "typedoc-plugin-djs-links": "^1.2.0",
66
+ "typedoc-plugin-mdn-links": "^2.0.0",
62
67
  "typescript": "^4.7.4"
63
68
  },
64
69
  "peerDependencies": {
@@ -117,4 +117,4 @@ ignoredFiles: []
117
117
  modulesFolder: 'modules'
118
118
 
119
119
  # Current version
120
- version: VERSION
120
+ version: ^VERSION