Archived
2.0.0-beta4 - splitted event arguments
This commit is contained in:
1 parent
80d8ce7eab
commit
c71d3b0b97
4 files changed
+7
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# CommandBot
|
||||
|
||||
**2.0.0-beta3**
|
||||
**2.0.0-beta4**
|
||||
|
||||
> [IMPORTANT]
|
||||
> Upgrading to this version from 1.1.3 may require additional changes in your code since 2.0.0 is not fully backwards compatible
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "commandbot",
|
||||
"version": "2.0.0-beta3",
|
||||
"version": "2.0.0-beta4",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "commandbot",
|
||||
"version": "2.0.0-beta3",
|
||||
"version": "2.0.0-beta4",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"discord.js": "^12.5.3"
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "commandbot",
|
||||
"version": "2.0.0-beta3",
|
||||
"version": "2.0.0-beta4",
|
||||
"description": "A framework that helps you create your own Discord bot easier.",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
+3
-3
@@ -115,7 +115,7 @@ export class Bot extends EventEmitter {
|
||||
const cmdMsg: CommandMessageStructure | null =
|
||||
this.commands.fetch(m);
|
||||
if (cmdMsg?.command) {
|
||||
this.emit("COMMAND", [m, cmdMsg]);
|
||||
this.emit("COMMAND", m, cmdMsg);
|
||||
try {
|
||||
await cmdMsg.command.start(m, cmdMsg.arguments);
|
||||
} catch (e) {
|
||||
@@ -140,7 +140,7 @@ export class Bot extends EventEmitter {
|
||||
);
|
||||
console.error(e);
|
||||
}
|
||||
this.emit("ERROR", [e]);
|
||||
this.emit("ERROR", e);
|
||||
return;
|
||||
}
|
||||
} else if (cmdMsg) {
|
||||
@@ -150,7 +150,7 @@ export class Bot extends EventEmitter {
|
||||
m.channel
|
||||
);
|
||||
} else {
|
||||
this.emit("MESSAGE", [m]);
|
||||
this.emit("MESSAGE", m);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user