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
|
# CommandBot
|
||||||
|
|
||||||
**2.0.0-beta3**
|
**2.0.0-beta4**
|
||||||
|
|
||||||
> [IMPORTANT]
|
> [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
|
> 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",
|
"name": "commandbot",
|
||||||
"version": "2.0.0-beta3",
|
"version": "2.0.0-beta4",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "commandbot",
|
"name": "commandbot",
|
||||||
"version": "2.0.0-beta3",
|
"version": "2.0.0-beta4",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"discord.js": "^12.5.3"
|
"discord.js": "^12.5.3"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "commandbot",
|
"name": "commandbot",
|
||||||
"version": "2.0.0-beta3",
|
"version": "2.0.0-beta4",
|
||||||
"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",
|
||||||
|
|||||||
+3
-3
@@ -115,7 +115,7 @@ export class Bot extends EventEmitter {
|
|||||||
const cmdMsg: CommandMessageStructure | null =
|
const cmdMsg: CommandMessageStructure | null =
|
||||||
this.commands.fetch(m);
|
this.commands.fetch(m);
|
||||||
if (cmdMsg?.command) {
|
if (cmdMsg?.command) {
|
||||||
this.emit("COMMAND", [m, cmdMsg]);
|
this.emit("COMMAND", m, cmdMsg);
|
||||||
try {
|
try {
|
||||||
await cmdMsg.command.start(m, cmdMsg.arguments);
|
await cmdMsg.command.start(m, cmdMsg.arguments);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -140,7 +140,7 @@ export class Bot extends EventEmitter {
|
|||||||
);
|
);
|
||||||
console.error(e);
|
console.error(e);
|
||||||
}
|
}
|
||||||
this.emit("ERROR", [e]);
|
this.emit("ERROR", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (cmdMsg) {
|
} else if (cmdMsg) {
|
||||||
@@ -150,7 +150,7 @@ export class Bot extends EventEmitter {
|
|||||||
m.channel
|
m.channel
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.emit("MESSAGE", [m]);
|
this.emit("MESSAGE", m);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user