catto.js 0.7.6 → 0.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bot.js +3 -3
- package/package.json +1 -1
package/Bot.js
CHANGED
|
@@ -188,7 +188,7 @@ module.exports = class extends EventEmitter {
|
|
|
188
188
|
});
|
|
189
189
|
}
|
|
190
190
|
this.emit("running", { Discord });
|
|
191
|
-
if (this.cluster.id == (this.cluster.count - 1)) {
|
|
191
|
+
if (this.cluster && this.cluster.id == (this.cluster.count - 1)) {
|
|
192
192
|
this.cluster.broadcastEval(client => client.emit("_runningFull"));
|
|
193
193
|
this.emit("runningFullLast", { Discord });
|
|
194
194
|
}
|
|
@@ -219,10 +219,10 @@ module.exports = class extends EventEmitter {
|
|
|
219
219
|
this.emit("message", message);
|
|
220
220
|
});
|
|
221
221
|
this.client.on("messageDelete", message => {
|
|
222
|
-
if (message.author) {
|
|
222
|
+
if (!(message.author instanceof User)) {
|
|
223
223
|
message.author = new User(message.author, this);
|
|
224
224
|
}
|
|
225
|
-
if (message.member) {
|
|
225
|
+
if (message.member && !(message.member.user instanceof User)) {
|
|
226
226
|
message.member.user = new User(message.member.user, this);
|
|
227
227
|
}
|
|
228
228
|
this.emit("messageDeleted", message);
|