0.1.0-beta.292 • Published 4 years ago

@smartcloudai/global v0.1.0-beta.292

Weekly downloads
1
License
GNU GPLv3
Repository
gitlab
Last release
4 years ago

Discord

SCAA Discord Module, developed for integration with 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
xNot supported
PIn Planning Phase
DIn Development Phase
TIn Testing Phase
RRejected 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
Dependencies2
Documentation
VS Code ExtensionR

†1 Written in typescript

Command Parsing

Command parsing is how frameworks parse messages into commands.

Definition0.0.0
Command aliasesCall the command something else
Mention as prefixMention the bot to trigger commands
Multiple prefixesHave multiple prefixes trigger the bot
Per-guild prefix customisationUse different prefixes for each guildD
Regular expression triggerUse regular expression triggers to start a command
Stores original inputStore 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.

Definition0.0.0
CooldownsBlock the command for x length of time
Monitoring messagesMonitor messages for commands
Blocking messagesBlock & delete messages based on filtersD
Channel restrictionsBlock commands based on channel type
Permissions restrictionsBlock commands based on permissionsD
Command CreationCreate files from file editing
Command editsEdit commands from file editing
Command CreationCreate files from frontend interfaceP
Command editsEdit commands from frontend interfaceP
SubcommandsHave commands use same base nameD
Run from codeRun the command from code
Run from JSONRun the command from JSON file
Typing modeTurn on / off bot typing modeP
Help informationShow 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.

Definition0.0.0
Ordered argumentsArguments called in specific order
Unordered argumentsArguments not called in specific orderD
Optional argumentsArguments optional
User and member matchingFind user and membersP
Role matchingFind rolesP
Channel matchingFind channelsP

Prompting

Prompting is the ability to collect messages from the user without invoking a command directly.

Definition0.0.0
From argument parsingPrompt from arg parse issueP
Prompt from codePrompt from codeP
Prompt time limitPrompt using timersP
Prompt retry limitPrompt using attempt countsP
Prompt cancellationPrompt when action is cancelledP
Infinite promptsPrompt continuouslyP
Custom text prompt systemPrompt with user defined textP
Custom prompt messagesCustom create prompt messagesP
Stores prompts and repliesStore prompt responses accessiblyP
Reaction prompt systemListens for reactionsP

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.

Definition0.0.0
Find modulesFind modules from multiple locations
Require ModulesRequire found modules
TypeScript module supportUse .ts files and modules
Recursive loadingLoad modules recursively
Loading and unloadingLoad modules & Unload on demand
Reloading modulesReload modules on demand
Module categoriesCategories for modules in help
Custom module typesDefine Module types (e.g. fun)
Plugins supportSupport requiring pluginsP

Events System

Events that are useful for a framework

Definition0.0.0
Modular event listenersCreate event listeners from modules
On invalid commandsBroadcast event on invalid commands
On command blockedBroadcast event on blocked commands
On command startBroadcast event on command started
On command endBroadcast event on command finished
On command errorBroadcast event on command error
On database changesBroadcast event when database updatesP
On module changesBroadcast event when detects module changesP
Custom eventsBroadcast user defined events

Database System

Database support is listed here, alongside settings that can be changed for Discord.

****Definition0.0.0
FireStoreP †1
Leveldb
MongoDBP †1
MSSQLP †1
MySQLP †1
NeDB
Neo4J
PostgreSQLP †1
RethinkDB
SequelizeD †1
SQLiteP †1
Custom providersP
Disabled commandsDisable commands through databaseP
BlacklistBlacklist users through databaseP
PrefixesChange prefix through databaseD
LocalisationChange language through databasex
Custom settingsStore custom settings in databaseP

†1 This is handled by requiring either separate module (read guide) or @smartcloud/core