1.1.2 -> added async command support (return type)

This commit is contained in:
mmacierzanka committed 2021-06-28 15:37:34 +02:00
1 parent b4fe0bd035
commit d1f094a09e
4 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
# CommandBot # CommandBot
**1.1.1** **1.1.2**
Discord.js framework that helps you build your own Discord bot. Discord.js framework that helps you build your own Discord bot.
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "commandbot", "name": "commandbot",
"version": "1.1.1", "version": "1.1.2",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "commandbot", "name": "commandbot",
"version": "1.1.1", "version": "1.1.2",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"discord.js": "^12.5.3" "discord.js": "^12.5.3"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "commandbot", "name": "commandbot",
"version": "1.1.1", "version": "1.1.2",
"description": "A framework that helps you create your own Discord bot easier.", "description": "A framework that helps you create your own Discord bot easier.",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
+2 -2
View File
@@ -11,7 +11,7 @@ interface CommandBuilder {
permissionCheck?: PermissionCheckTypes, permissionCheck?: PermissionCheckTypes,
permissions?: PermissionResolvable, permissions?: PermissionResolvable,
visible?: boolean visible?: boolean
function: (message?: Message, cmdArguments?: string[]) => void | string | MessageEmbed; function: (message?: Message, cmdArguments?: string[]) => void | string | MessageEmbed | Promise<void | string | MessageEmbed>;
} }
interface CommandMessageStructure { interface CommandMessageStructure {
name: string, name: string,
@@ -48,7 +48,7 @@ class Command {
permissionCheck: PermissionCheckTypes; permissionCheck: PermissionCheckTypes;
permissions: Permissions; permissions: Permissions;
visible: boolean; visible: boolean;
private function: (message?: Message, cmdArguments?: string[]) => void | string | MessageEmbed; private function: (message?: Message, cmdArguments?: string[]) => void | string | MessageEmbed | Promise<void | string | MessageEmbed>;
constructor(options: CommandBuilder) { constructor(options: CommandBuilder) {
this.name = options.name.split(' ').join('_'); this.name = options.name.split(' ').join('_');