seyfert 2.1.1-dev-12497587234.0 → 2.1.1-dev-12505847598.0
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/lib/events/handler.js +8 -7
- package/package.json +1 -1
package/lib/events/handler.js
CHANGED
|
@@ -166,21 +166,22 @@ class EventHandler extends common_1.BaseHandler {
|
|
|
166
166
|
const Event = this.values[name];
|
|
167
167
|
try {
|
|
168
168
|
if (!Event || (Event.data.once && Event.fired)) {
|
|
169
|
-
return
|
|
169
|
+
return this.client.cache.onPacket({
|
|
170
|
+
t: name,
|
|
171
|
+
d: packet,
|
|
172
|
+
});
|
|
170
173
|
}
|
|
171
174
|
Event.fired = true;
|
|
172
175
|
const hook = await RawEvents[name]?.(client, packet);
|
|
173
|
-
await Event.run(hook, client, shardId);
|
|
174
|
-
}
|
|
175
|
-
catch (e) {
|
|
176
|
-
await this.onFail(name, e);
|
|
177
|
-
}
|
|
178
|
-
finally {
|
|
179
176
|
if (runCache)
|
|
180
177
|
await this.client.cache.onPacket({
|
|
181
178
|
t: name,
|
|
182
179
|
d: packet,
|
|
183
180
|
});
|
|
181
|
+
await Event.run(hook, client, shardId);
|
|
182
|
+
}
|
|
183
|
+
catch (e) {
|
|
184
|
+
await this.onFail(name, e);
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
async runCustom(name, ...args) {
|