@smartcloudai/global v0.1.0-beta.292
Discord
This "framework" (term used lightly) is developed to make creating discord bots extremely easy for end users and developers. Built on the Typescript coding platform, it features tools for ts, js and json creation of commands and events.
Even though this could be used as an framework for back-end developers, we have built it with the intention of front end editing and production. Everything you can create and make from the back-end can also be created using the SCAA web portal, WordPress plugin or API.
Please see the SCAA Core project for information regarding initial setup and installation of Smart Cloud Artificial Assistant if you intend to use all the features of this software.
Module Installation
This module can be run as either part of Smartcloud Artificial Assistant, or as standalone framework for discord bots. Using our auto installer, it comes completely operational with default commands, events and actions.
From within the @smartcloud/cli
user can choose to install, create and upload their own modules with actions, events and commands to our repository much like npm does, allowing for continuous grouth of the applications abilities without the hassle which is often involved when building customised applications.
Using our auto installer for SCAA operation
Running our auto installer is super easy and guides you through all the steps.
Simply install our command line interface using:
npm i -g @smartcloud/cli
Once installed, run the command
smartcloud install
You can read more about our installation options here:
{% page-ref page="installation.md" %}
Framework information
Key | |
---|---|
✓ | Tested & Deployed |
x | Not supported |
P | In Planning Phase |
D | In Development Phase |
T | In Testing Phase |
R | Rejected Proposal |
†<x> | Please see note x below |
General
General details about the frameworks, such as versions.
0.0.0 | |
---|---|
Discord.js | ^11.5.1 |
Node.js | ^12.9.1 |
Typings | ✓ †1 |
Dependencies | 2 |
Documentation | ✓ |
VS Code Extension | R |
†1 Written in typescript
Command Parsing
Command parsing is how frameworks parse messages into commands.
Definition | 0.0.0 | |
---|---|---|
Command aliases | Call the command something else | ✓ |
Mention as prefix | Mention the bot to trigger commands | ✓ |
Multiple prefixes | Have multiple prefixes trigger the bot | ✓ |
Per-guild prefix customisation | Use different prefixes for each guild | D |
Regular expression trigger | Use regular expression triggers to start a command | ✓ |
Stores original input | Store the original input somewhere accessible | ✓ |
Command Handling
Command handling refers to the behaviour of command execution and restrictions. 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.
Definition | 0.0.0 | |
---|---|---|
Cooldowns | Block the command for x length of time | ✓ |
Monitoring messages | Monitor messages for commands | ✓ |
Blocking messages | Block & delete messages based on filters | D |
Channel restrictions | Block commands based on channel type | ✓ |
Permissions restrictions | Block commands based on permissions | D |
Command Creation | Create files from file editing | ✓ |
Command edits | Edit commands from file editing | ✓ |
Command Creation | Create files from frontend interface | P |
Command edits | Edit commands from frontend interface | P |
Subcommands | Have commands use same base name | D |
Run from code | Run the command from code | ✓ |
Run from JSON | Run the command from JSON file | ✓ |
Typing mode | Turn on / off bot typing mode | P |
Help information | Show help information when required | ✓ |
Argument Parsing
Arguments are the data acquired and parsed from user input. This section compares how frameworks can match and parse input.
Definition | 0.0.0 | |
---|---|---|
Ordered arguments | Arguments called in specific order | ✓ |
Unordered arguments | Arguments not called in specific order | D |
Optional arguments | Arguments optional | ✓ |
User and member matching | Find user and members | P |
Role matching | Find roles | P |
Channel matching | Find channels | P |
Prompting
Prompting is the ability to collect messages from the user without invoking a command directly.
Definition | 0.0.0 | |
---|---|---|
From argument parsing | Prompt from arg parse issue | P |
Prompt from code | Prompt from code | P |
Prompt time limit | Prompt using timers | P |
Prompt retry limit | Prompt using attempt counts | P |
Prompt cancellation | Prompt when action is cancelled | P |
Infinite prompts | Prompt continuously | P |
Custom text prompt system | Prompt with user defined text | P |
Custom prompt messages | Custom create prompt messages | P |
Stores prompts and replies | Store prompt responses accessibly | P |
Reaction prompt system | Listens for reactions | P |
Module System
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.
Definition | 0.0.0 | |
---|---|---|
Find modules | Find modules from multiple locations | ✓ |
Require Modules | Require found modules | ✓ |
TypeScript module support | Use .ts files and modules | ✓ |
Recursive loading | Load modules recursively | ✓ |
Loading and unloading | Load modules & Unload on demand | ✓ |
Reloading modules | Reload modules on demand | ✓ |
Module categories | Categories for modules in help | ✓ |
Custom module types | Define Module types (e.g. fun) | ✓ |
Plugins support | Support requiring plugins | P |
Events System
Events that are useful for a framework
Definition | 0.0.0 | |
---|---|---|
Modular event listeners | Create event listeners from modules | ✓ |
On invalid commands | Broadcast event on invalid commands | ✓ |
On command blocked | Broadcast event on blocked commands | ✓ |
On command start | Broadcast event on command started | ✓ |
On command end | Broadcast event on command finished | ✓ |
On command error | Broadcast event on command error | ✓ |
On database changes | Broadcast event when database updates | P |
On module changes | Broadcast event when detects module changes | P |
Custom events | Broadcast user defined events | ✓ |
Database System
Database support is listed here, alongside settings that can be changed for Discord.
**** | Definition | 0.0.0 |
---|---|---|
FireStore | P †1 | |
Leveldb | ||
MongoDB | P †1 | |
MSSQL | P †1 | |
MySQL | P †1 | |
NeDB | ||
Neo4J | ||
PostgreSQL | P †1 | |
RethinkDB | ||
Sequelize | D †1 | |
SQLite | P †1 | |
Custom providers | P | |
Disabled commands | Disable commands through database | P |
Blacklist | Blacklist users through database | P |
Prefixes | Change prefix through database | D |
Localisation | Change language through database | x |
Custom settings | Store custom settings in database | P |
†1 This is handled by requiring either separate module (read guide) or @smartcloud/core
4 years ago
4 years ago