reciple 1.0.1 → 1.0.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/README.md CHANGED
@@ -1,2 +1,58 @@
1
- # reciple
2
- A Discord.js bot
1
+ <h1 align="center">
2
+ <img src="https://i.imgur.com/8pYGOWW.png" width="50%">
3
+ <br>
4
+ <img alt="Lines of code" src="https://img.shields.io/tokei/lines/github/FalloutStudios/Reciple">
5
+ <img alt="GitHub" src="https://img.shields.io/github/license/FalloutStudios/Reciple">
6
+ <a href="https://www.codefactor.io/repository/github/falloutstudios/reciple/overview/main"><img src="https://www.codefactor.io/repository/github/falloutstudios/reciple/badge/main" alt="CodeFactor"></a>
7
+ </h1>
8
+
9
+ A simple modular Discord bot made with Discord.js written in TypeScript.
10
+
11
+
12
+ ## Installation
13
+ To install the bot, run the following command:
14
+
15
+ ```bash
16
+ npm i reciple
17
+ ```
18
+
19
+ You can initialize the bot to the current directory with the following command:
20
+
21
+ ```bash
22
+ reciple
23
+ ```
24
+
25
+ It will ask you to continue if the directory is not empty type `y` to continue after the bot has been initialized it will ask you for your `TOKEN`.
26
+
27
+ > You can always change the token on `reciple.yml`
28
+
29
+ ## Config
30
+
31
+ You can configure the bot on `reciple.yml` in the bot root directory.
32
+
33
+ ### Token
34
+
35
+ You can directly change the token on `reciple.yml` like so:
36
+
37
+ ```yml
38
+ token: "YOUR_TOKEN_HERE"
39
+ ```
40
+
41
+ Using environment variables is also supported:
42
+
43
+ ```yml
44
+ token: "env:TOKEN_VARIABLE"
45
+ ```
46
+
47
+ You can override the token on the command line like so:
48
+
49
+ ```bash
50
+ reciple --token "YOUR_TOKEN_HERE"
51
+ ```
52
+
53
+ ## Running the bot
54
+ To run the bot, run the following command:
55
+
56
+ ```bash
57
+ reciple
58
+ ```
@@ -83,9 +83,7 @@ class RecipleClient extends discord_js_1.Client {
83
83
  if (parseCommand && parseCommand.command) {
84
84
  const command = this.commands.MESSAGE_COMMANDS[parseCommand.command];
85
85
  if (command && (0, commandPermissions_1.commandPermissions)(command.name, ((_c = message.member) === null || _c === void 0 ? void 0 : _c.permissions) || null, (_d = this.config) === null || _d === void 0 ? void 0 : _d.permissions.messageCommands)) {
86
- if (!command.allowExecuteInDM && message.channel.type === 'DM')
87
- return this;
88
- if (!command.allowExecuteByBots && (message.author.bot || message.author.system))
86
+ if (!command.allowExecuteInDM && message.channel.type === 'DM' || !command.allowExecuteByBots && (message.author.bot || message.author.system))
89
87
  return this;
90
88
  if (command.validateOptions && !command.getCommandOptionValues(parseCommand)) {
91
89
  yield message.reply(((_e = this.config) === null || _e === void 0 ? void 0 : _e.messages.notEnoughArguments) || 'Not enough arguments.').catch((err) => this.logger.error(err));
@@ -15,18 +15,18 @@ export interface RecipleMessageCommandExecute {
15
15
  }
16
16
  export interface MessageCommandValidatedOption {
17
17
  name: string;
18
- value: any;
18
+ value: string;
19
19
  required: boolean;
20
20
  }
21
21
  export declare class MessageOption {
22
22
  name: string;
23
23
  description: string;
24
24
  required: boolean;
25
- validate: (value: any) => boolean;
25
+ validate: (value: string) => boolean;
26
26
  setName(name: string): MessageOption;
27
27
  setDescription(description: string): MessageOption;
28
28
  setRequired(required: boolean): MessageOption;
29
- setValidator(validator: (value: any) => boolean): MessageOption;
29
+ setValidator(validator: (value: string) => boolean): MessageOption;
30
30
  }
31
31
  export declare class MessageCommandBuilder {
32
32
  readonly type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reciple",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A Discord.js bot",
5
5
  "author": "FalloutStudios",
6
6
  "license": "GPL-3.0",