From e9f9cf2e581f0b88df7fadb6c160d42666ecfb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Sat, 26 Dec 2020 19:40:17 +0100 Subject: [PATCH 1/3] chore: add Sapphire, reformatted tables --- README.md | 269 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 141 insertions(+), 128 deletions(-) diff --git a/README.md b/README.md index d7b1e3b..0b566c9 100644 --- a/README.md +++ b/README.md @@ -9,31 +9,32 @@ Discord.js versions are noted in semver where applicable. Node.js versions are the minimum versions required. Dependencies do not include Discord.js, TypeScript, or optional/peer dependencies. -| **General** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Library version | 7.5.5 | 0.10.0 | 3.0.1 | -| Discord.js version | `^11.4.0` | `^11.2.1` | Custom 11.1 | -| Node.js version | 6.0.0 | 7.0.0 | 8.0.0 | -| Typings | ✓ | ✓ | ✓ †1 | -| Dependencies | 0 | 3 | 5 | -| Documentation | [Akairo](https://1computer1.github.io/discord-akairo/) | [Commando](https://discord.js.org/#/docs/commando/master/general/welcome) | [YAMDBF](https://yamdbf.js.org/) | -| VSCode Extension | ✘ | ? | ✘ | +| **General** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ------------------ | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Library version | 7.5.5 | 0.10.0 | 3.0.1 | 1.0.0 | +| Discord.js version | `^11.4.0` | `^11.2.1` | Custom 11.1 | `^12.0.0` | +| Node.js version | 6.0.0 | 7.0.0 | 8.0.0 | `^14.0.0` | +| Typings | ✓ | ✓ | ✓ †1 | ✓ †2 | +| Dependencies | 0 | 3 | 5 | 4 | +| Documentation | [Akairo][akairo-gh] | [Commando][commando-gh] | [YAMDBF][yamdbf-gh] | [Sapphire][sapphire-gh] | +| VSCode Extension | ✘ | ? | ✘ | ✘ | †1: YAMDBF is written in TypeScript. +†2: Sapphire is written in TypeScript. ## Command Parsing Command parsing is how frameworks parse messages into commands. This includes prefixes, aliases, etc. -| **Command Parsing** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Command aliases | ✓ | ✓ | ✓ | -| Mention as prefix | ✓ | ✓ | ✓ | -| Multiple prefixes | ✓ | ✘ | ✘ | -| Per-guild prefix customisation | ✓ | ✓ | ✓ | -| Regular expression trigger | ✓ | ✓ | ✘ | -| Stores original input | ✓ | ✓ | ✘ | +| **Command Parsing** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ------------------------------ | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Command aliases | ✓ | ✓ | ✓ | ✓ | +| Mention as prefix | ✓ | ✓ | ✓ | ✓ | +| Multiple prefixes | ✓ | ✘ | ✘ | ✓ | +| Per-guild prefix customisation | ✓ | ✓ | ✓ | ✓ | +| Regular expression trigger | ✓ | ✓ | ✘ | ✘ | +| Stores original input | ✓ | ✓ | ✘ | ✘ | ## Command Handling @@ -43,18 +44,21 @@ It also includes the monitoring of and the inhibition of messages and commands. Subcommands are commands that are individual commands with the same base name. Argument parsing within one command does not count towards that criteria. -| **Command Handling** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Cooldowns | ✓ | ✓ | ✓ | -| Monitoring messages | ✓ | ✓ | ? | -| Blocking messages | ✓ | ✓ | ? | -| Channel restrictions | ✓ | ✓ | ✓ | -| Permissions restrictions | ✓ | ✓ | ✓ | -| Command edits | ✓ | ✓ | ? | -| Subcommands | ✘ | ✘ | ? | -| Run from code | ✓ | ✓ | ✓ | -| Typing mode | ✓ | ? | ? | -| Help information | ✓ | ✓ | ✓ | +| **Command Handling** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ------------------------ | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Cooldowns | ✓ | ✓ | ✓ | ✓ | +| Monitoring messages | ✓ | ✓ | ? | ✓ | +| Blocking messages | ✓ | ✓ | ? | ✓ | +| Channel restrictions | ✓ | ✓ | ✓ | ✓ | +| Permissions restrictions | ✓ | ✓ | ✓ | ✓ | +| Command edits | ✓ | ✓ | ? | ✘ | +| Subcommands | ✘ | ✘ | ? | ※1 | +| Run from code | ✓ | ✓ | ✓ | ✓ | +| Typing mode | ✓ | ? | ? | ※2 | +| Help information | ✓ | ✓ | ✓ | ✘ | + +※1: Subcommands can be implemented in the developer's side or with a plugin. +※2: Typing mode can be implemented with a commandRun and a commandFinish event listener. ## Argument Parsing @@ -66,41 +70,43 @@ Less obvious criterias: - Dependent arguments are arguments whose behavior depends on previous arguments. - User/member/role/channel matching means to be able to find an item based on approximations to their name, their ID, etc. -| **Argument Parsing** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Ordered arguments | ✓ | ✓ | ✓ | -| Unordered arguments | ✘ ⇒ ✓ | ✘ | ? | -| Optional arguments | ✓ | ✓ | ✓ | -| Quoted arguments | ✓ | ✓ | ? | -| Flag arguments | ✓ | ✘ | ? | -| Rest arguments | ✓ | ✓ | ✓ | -| Dependent arguments | ✓ | ✘ | ? | -| Argument types | ✓ | ✓ | ✓ | -| Union types | ✘ ⇒ ✓ | ✓ | ? | -| Custom types | ✓ | ✓ | ✓ | -| User and member matching | ✓ | ✓ | ✓ | -| Role matching | ✓ | ✓ | ✓ | -| Channel matching | ✓ | ✓ | ✓ | -| Regular expression arguments | ✓ | ? | ? | -| Custom arguments | ✓ | ✓ | ✓ | +| **Argument Parsing** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ---------------------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Ordered arguments | ✓ | ✓ | ✓ | ✓ | +| Unordered arguments | ✘ ⇒ ✓ | ✘ | ? | ✓ | +| Optional arguments | ✓ | ✓ | ✓ | ✓ | +| Quoted arguments | ✓ | ✓ | ? | ✓ | +| Flag arguments | ✓ | ✘ | ? | ✓ | +| Rest arguments | ✓ | ✓ | ✓ | ✓ | +| Dependent arguments | ✓ | ✘ | ? | ✓ | +| Argument types | ✓ | ✓ | ✓ | ✓ | +| Union types | ✘ ⇒ ✓ | ✓ | ? | ✓ | +| Custom types | ✓ | ✓ | ✓ | ✓ | +| User and member matching | ✓ | ✓ | ✓ | ✓ | +| Role matching | ✓ | ✓ | ✓ | ✓ | +| Channel matching | ✓ | ✓ | ✓ | ✓ | +| Regular expression arguments | ✓ | ? | ? | ※1 | +| Custom arguments | ✓ | ✓ | ✓ | ✓ | + +※1: There is no built-in RegExp argument, but one can be made with a custom argument. ## Prompting Prompting is the ability to collect messages from the user without invoking a command directly. Custom prompts do not count for other specific criterias, even if they are replicable. -| **Prompting** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| From argument parsing | ✓ | ✓ | ? | -| Prompt from code | ✓ | ✓ | ? | -| Prompt time limit | ✓ | ✓ | ? | -| Prompt retry limit | ✓ | ✓ | ? | -| Prompt cancellation | ✓ | ✓ | ? | -| Infinite prompts | ✓ | ✓ | ? | -| Custom text prompt system | ✘ | ✘ | ? | -| Custom prompt messages | ✓ | ※1 | ? | -| Stores prompts and replies | ※2 ⇒ ✓ | ※3 ⇒ ✓ | ? | -| Reaction prompt system | ✘ | ? | ? | +| **Prompting** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| -------------------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| From argument parsing | ✓ | ✓ | ? | ✘ | +| Prompt from code | ✓ | ✓ | ? | ✘ | +| Prompt time limit | ✓ | ✓ | ? | ✘ | +| Prompt retry limit | ✓ | ✓ | ? | ✘ | +| Prompt cancellation | ✓ | ✓ | ? | ✘ | +| Infinite prompts | ✓ | ✓ | ? | ✘ | +| Custom text prompt system | ✘ | ✘ | ? | ✘ | +| Custom prompt messages | ✓ | ※1 | ? | ✘ | +| Stores prompts and replies | ※2 ⇒ ✓ | ※3 ⇒ ✓ | ? | ✘ | +| Reaction prompt system | ✘ | ? | ? | ✘ | ※1: Commando appends built-in text to prompt messages. ※2: Akairo stores only the last editable response. @@ -111,18 +117,18 @@ Custom prompts do not count for other specific criterias, even if they are repli The module system of a framework is how the framework structures its modules. This includes how new modules (e.g. commands) are created and loaded. -| **Module System** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Classes | ✓ | ✓ | ✓ | -| Specific exports | ✘ | ✘ | ✘ | -| ES module support | ✘ | ✘ | ✘ | -| TypeScript module support | ✓ | ✓ | ✓ | -| Recursive loading | ✓ | ✓ | ? | -| Loading and unloading | ✓ | ✓ | ? | -| Reloading modules | ✓ | ✓ | ? | -| Module categories | ✓ | ✓ | ✓ | -| Custom module types | ✓ | ✘ | ? | -| Plugins support | ✘ | ✘ | ✓ | +| **Module System** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ------------------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Classes | ✓ | ✓ | ✓ | ✓ | +| Specific exports | ✘ | ✘ | ✘ | ✘ | +| ES module support | ✘ | ✘ | ✘ | ✓ | +| TypeScript module support | ✓ | ✓ | ✓ | ✓ | +| Recursive loading | ✓ | ✓ | ? | ✓ | +| Loading and unloading | ✓ | ✓ | ? | ✓ | +| Reloading modules | ✓ | ✓ | ? | ✓ | +| Module categories | ✓ | ✓ | ✓ | ✓ | +| Custom module types | ✓ | ✘ | ? | ✓ | +| Plugins support | ✘ | ✘ | ✓ | ✓ | ## Databases @@ -132,54 +138,56 @@ Custom settings do not count for other specific settings, even if they are repli Sequelize support does not count as SQLite, MySQL, MSSQL, or PostgreSQL support. -| **Databases** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| FireStore | ? | ? | ? | -| Level | ? | ? | ? | -| MongoDB | ✘ | ✘ | ? | -| MSSQL | ✘ | ✘ | ✓ | -| MySQL | ✘ | ✘ | ✓ | -| NeDB | ✘ | ? | ? | -| Neo4J | ? | ? | ? | -| PostgreSQL | ✘ | ✘ | ✓ | -| RethinkDB | ✘ | ✘ | ? | -| Sequelize | ✓ | ✘ | ✓ | -| SQLite | ✓ | ✓ | ✓ | -| Custom providers | ✓ | ✓ | ✓ | -| Disabled commands | ✘ | ✓ | ✓ | -| Blacklist | ✘ | ✘ | ✓ | -| Prefixes | ✘ | ✓ | ✓ | -| Localization | ✘ | ✘ | ✓ | -| Custom settings | ✓ | ✓ | ✓ | +| **Databases** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ----------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| FireStore | ? | ? | ? | ∅ | +| Level | ? | ? | ? | ∅ | +| MongoDB | ✘ | ✘ | ? | ∅ | +| MSSQL | ✘ | ✘ | ✓ | ∅ | +| MySQL | ✘ | ✘ | ✓ | ∅ | +| NeDB | ✘ | ? | ? | ∅ | +| Neo4J | ? | ? | ? | ∅ | +| PostgreSQL | ✘ | ✘ | ✓ | ∅ | +| RethinkDB | ✘ | ✘ | ? | ∅ | +| Sequelize | ✓ | ✘ | ✓ | ∅ | +| SQLite | ✓ | ✓ | ✓ | ∅ | +| Custom providers | ✓ | ✓ | ✓ | ∅ | +| Disabled commands | ✘ | ✓ | ✓ | ※1 | +| Blacklist | ✘ | ✘ | ✓ | ∅ | +| Prefixes | ✘ | ✓ | ✓ | ✓ | +| Localization | ✘ | ✘ | ✓ | ∅ | +| Custom settings | ✓ | ✓ | ✓ | ∅ | + +※1: Custom pre-conditions can be used to dynamically disable commands at the developer's choice. ## Events Events that are useful for a framework are compared here. -| **Events** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Modular event listeners | ✓ | ✘ | ? | -| Reloadable event structures | ✓ | ? | ? | -| On invalid commands | ✓ | ✓ | ? | -| On command blocked | ✓ | ✓ | ? | -| On command start | ✓ | ✓ | ? | -| On command end | ✓ | ✘ | ? | -| On command error | ✓ | ✓ | ? | -| On database changes | ✘ | ✘ | ? | -| On module changes | ✓ | ✓ | ? | -| Custom events | ✓ | ? | ✓ | +| **Events** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| --------------------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Modular event listeners | ✓ | ✘ | ? | ✓ | +| Reloadable event structures | ✓ | ? | ? | ✓ | +| On invalid commands | ✓ | ✓ | ? | ✓ | +| On command blocked | ✓ | ✓ | ? | ✓ | +| On command start | ✓ | ✓ | ? | ✓ | +| On command end | ✓ | ✘ | ? | ✓ | +| On command error | ✓ | ✓ | ? | ✓ | +| On database changes | ✘ | ✘ | ? | ∅ | +| On module changes | ✓ | ✓ | ? | ✓ | +| Custom events | ✓ | ? | ✓ | ✓ | ## Promise Support Support for Promises, either as return values from the user or as implementations internally. -| **Promise Support** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Promises used internally | ✓ | ✓ | ✓ | -| Message monitoring | ✓ | ✘ | ? | -| Argument parsing | ✓ | ✓ | ✓ | -| Command restrictions | ✘ ⇒ ✓ | ✘ | ✓ | -| Command execution | ✓ | ✓ | ✓ | +| **Promise Support** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ------------------------ | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Promises used internally | ✓ | ✓ | ✓ | ✓ | +| Message monitoring | ✓ | ✘ | ? | ✓ | +| Argument parsing | ✓ | ✓ | ✓ | ✓ | +| Command restrictions | ✘ ⇒ ✓ | ✘ | ✓ | ✓ | +| Command execution | ✓ | ✓ | ✓ | ✓ | ## Settings @@ -188,29 +196,29 @@ They are used to opt-in or opt-out of built-in features. Built-in features marked as `✓` means they exist and are modifiable, `✘` means they exist and are not modifiable, and `∅` means they do not exist. -| **Settings** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | -| --- | :-: | :-: | :-: | -| Modifiable built-in commands | ∅ | ✘ | ✓ | -| Modifiable built-in event handlers | ∅ | ? | ? | -| Modifiable built-in inhibitors | ✘ | ? | ? | -| Modifiable built-in command handler | ✓ | ? | ? | -| Modifiable built-in responses | ✓ ⇒ ∅ | ✘ | ✓ | -| Modifiable built-in locales | ∅ | ∅ | ✓ | -| Bot owner | ✓ | ✓ | ✓ | -| Multiple owners | ✓ | ✓ | ✓ | -| Module directories | ✓ | ✓ | ✓ | +| **Settings** | [**Akairo**][akairo] | [**Commando**][commando] | [**YAMDBF**][yamdbf] | [**Sapphire**][sapphire] | +| ----------------------------------- | :------------------: | :----------------------: | :------------------: | :----------------------: | +| Modifiable built-in commands | ∅ | ✘ | ✓ | ∅ | +| Modifiable built-in event handlers | ∅ | ? | ? | ✓ | +| Modifiable built-in inhibitors | ✘ | ? | ? | ✓ | +| Modifiable built-in command handler | ✓ | ? | ? | ✓ | +| Modifiable built-in responses | ✓ ⇒ ∅ | ✘ | ✓ | ∅ | +| Modifiable built-in locales | ∅ | ∅ | ✓ | ∅ | +| Bot owner | ✓ | ✓ | ✓ | ∅ | +| Multiple owners | ✓ | ✓ | ✓ | ∅ | +| Module directories | ✓ | ✓ | ✓ | ✓ | ## Legend -| Symbol | Description | -| :-: | --- | -| ✓ | Has the feature | -| ✘ | Does not have the feature | -| ※ | Partially has the feature (details noted at the bottom) | -| † | More information noted at the bottom | -| ⇒ | Different status in a development version (in a public repository) | -| ? | Unknown status of feature (contribute if you know) | -| ∅ | Not applicable | +| Symbol | Description | +| :----: | ------------------------------------------------------------------ | +| ✓ | Has the feature | +| ✘ | Does not have the feature | +| ※ | Partially has the feature (details noted at the bottom) | +| † | More information noted at the bottom | +| ⇒ | Different status in a development version (in a public repository) | +| ? | Unknown status of feature (contribute if you know) | +| ∅ | Not applicable | For example, `✓` means that the feature is available in both the stable release and the development version. Likewise, `✘ ⇒ ✓` means that the feature is not available in the stable release, but it is available in the development version. @@ -233,5 +241,10 @@ Opt-in features should be labelled as `✓`, do not make a note that they are op Official plugins are to be labelled with a `✓`, along with a note as to where to find them. [akairo]: https://www.npmjs.com/package/discord-akairo +[akairo-gh]: https://1computer1.github.io/discord-akairo/ [commando]: https://www.npmjs.com/package/discord.js-commando +[commando-gh]: https://discord.js.org/#/docs/commando/master/general/welcome [yamdbf]: https://www.npmjs.com/package/yamdbf +[yamdbf-gh]: https://yamdbf.js.org/ +[sapphire]: https://www.npmjs.com/package/@sapphire/framework +[sapphire-gh]: https://github.com/sapphire-project/framework From 62ec9a68d1472306a7eb13949dd053c82972c7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Sat, 26 Dec 2020 19:42:21 +0100 Subject: [PATCH 2/3] fix: add trailing spaces --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b566c9..f83ff92 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ Dependencies do not include Discord.js, TypeScript, or optional/peer dependencie | Documentation | [Akairo][akairo-gh] | [Commando][commando-gh] | [YAMDBF][yamdbf-gh] | [Sapphire][sapphire-gh] | | VSCode Extension | ✘ | ? | ✘ | ✘ | -†1: YAMDBF is written in TypeScript. -†2: Sapphire is written in TypeScript. +†1: YAMDBF is written in TypeScript. +†2: Sapphire is written in TypeScript. ## Command Parsing From 7b1e7b44465dff944611924ddc7aec81ae0ad420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Rom=C3=A1n?= Date: Fri, 5 Mar 2021 20:37:07 +0100 Subject: [PATCH 3/3] chore: update Sapphire's features --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f83ff92..8a9241f 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ This includes prefixes, aliases, etc. | Mention as prefix | ✓ | ✓ | ✓ | ✓ | | Multiple prefixes | ✓ | ✘ | ✘ | ✓ | | Per-guild prefix customisation | ✓ | ✓ | ✓ | ✓ | -| Regular expression trigger | ✓ | ✓ | ✘ | ✘ | -| Stores original input | ✓ | ✓ | ✘ | ✘ | +| Regular expression trigger | ✓ | ✓ | ✘ | ✓ | +| Stores original input | ✓ | ✓ | ✘ | ✓ | ## Command Handling @@ -153,7 +153,7 @@ Sequelize support does not count as SQLite, MySQL, MSSQL, or PostgreSQL support. | SQLite | ✓ | ✓ | ✓ | ∅ | | Custom providers | ✓ | ✓ | ✓ | ∅ | | Disabled commands | ✘ | ✓ | ✓ | ※1 | -| Blacklist | ✘ | ✘ | ✓ | ∅ | +| Blacklist | ✘ | ✘ | ✓ | ※1 | | Prefixes | ✘ | ✓ | ✓ | ✓ | | Localization | ✘ | ✘ | ✓ | ∅ | | Custom settings | ✓ | ✓ | ✓ | ∅ |