revbot.js 0.1.0 → 0.1.1
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/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3157,7 +3157,7 @@ import { EventEmitter } from "node:events";
|
|
|
3157
3157
|
import { AxiosError } from "axios";
|
|
3158
3158
|
|
|
3159
3159
|
// package.json
|
|
3160
|
-
var version = "0.1.
|
|
3160
|
+
var version = "0.1.1";
|
|
3161
3161
|
|
|
3162
3162
|
// src/rest/restUtils/rateLimitQueue.ts
|
|
3163
3163
|
import axios3 from "axios";
|
|
@@ -3687,8 +3687,12 @@ var Message = class extends Event {
|
|
|
3687
3687
|
*/
|
|
3688
3688
|
handle(data) {
|
|
3689
3689
|
return __async(this, null, function* () {
|
|
3690
|
+
var _a;
|
|
3690
3691
|
const channel = this.client.channels.cache.get(data.channel);
|
|
3691
3692
|
if (channel == null ? void 0 : channel.isText()) {
|
|
3693
|
+
if (((_a = data.user) == null ? void 0 : _a.bot) && this.client.options.ignoreBots) {
|
|
3694
|
+
return {};
|
|
3695
|
+
}
|
|
3692
3696
|
const message = channel.messages._add(data);
|
|
3693
3697
|
if (data.author !== SYSTEM_USER_ID && !data.webhook) {
|
|
3694
3698
|
yield this.client.users.fetch(data.author, { force: false });
|
|
@@ -4021,7 +4025,9 @@ var EventManager = class {
|
|
|
4021
4025
|
this.client = client3;
|
|
4022
4026
|
/** A map of registered events, keyed by their names. */
|
|
4023
4027
|
__privateAdd(this, _events, /* @__PURE__ */ new Map());
|
|
4024
|
-
|
|
4028
|
+
var _a;
|
|
4029
|
+
for (const [key, Event2] of Object.entries(EventMap)) {
|
|
4030
|
+
if ((_a = this.client.options.ignoreEvents) == null ? void 0 : _a.includes(key)) return;
|
|
4025
4031
|
this.register(Event2);
|
|
4026
4032
|
}
|
|
4027
4033
|
}
|