revbot.js 0.1.9 → 0.1.10
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/README.md +156 -133
- package/dist/index.d.mts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +26 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2023,6 +2023,8 @@ var ServerChannel = class extends Channel {
|
|
|
2023
2023
|
this.description = null;
|
|
2024
2024
|
/** The icon of the channel, or `null` if none is set. */
|
|
2025
2025
|
this.icon = null;
|
|
2026
|
+
/** Manages the messages in this Server channel. */
|
|
2027
|
+
this.messages = new MessageManager(this);
|
|
2026
2028
|
/** The permission overwrites for the channel. */
|
|
2027
2029
|
this.overwrites = /* @__PURE__ */ new Map();
|
|
2028
2030
|
/** Whether the channel is marked as NSFW (Not Safe For Work). */
|
|
@@ -2093,6 +2095,20 @@ var ServerChannel = class extends Channel {
|
|
|
2093
2095
|
get server() {
|
|
2094
2096
|
return this.client.servers.cache.get(this.serverId);
|
|
2095
2097
|
}
|
|
2098
|
+
/**
|
|
2099
|
+
* Sends a message to this Server channel.
|
|
2100
|
+
*
|
|
2101
|
+
* @param {MessageOptions | string} options - The message content or options for the message.
|
|
2102
|
+
* @returns {Promise<Message>} A promise that resolves with the sent message.
|
|
2103
|
+
*
|
|
2104
|
+
* @example
|
|
2105
|
+
* ```typescript
|
|
2106
|
+
* await serverChannel.send("Hello, world!");
|
|
2107
|
+
* ```
|
|
2108
|
+
*/
|
|
2109
|
+
send(options) {
|
|
2110
|
+
return this.messages.send(options);
|
|
2111
|
+
}
|
|
2096
2112
|
/**
|
|
2097
2113
|
* Retrieves the category this channel belongs to, if any.
|
|
2098
2114
|
*
|
|
@@ -3214,7 +3230,7 @@ import { EventEmitter } from "node:events";
|
|
|
3214
3230
|
import { AxiosError } from "axios";
|
|
3215
3231
|
|
|
3216
3232
|
// package.json
|
|
3217
|
-
var version = "0.1.
|
|
3233
|
+
var version = "0.1.10";
|
|
3218
3234
|
|
|
3219
3235
|
// src/rest/restUtils/rateLimitQueue.ts
|
|
3220
3236
|
import axios3 from "axios";
|
|
@@ -4350,21 +4366,21 @@ var WebSocketClient = class {
|
|
|
4350
4366
|
this.client.users._add(user);
|
|
4351
4367
|
}
|
|
4352
4368
|
}
|
|
4353
|
-
for (const server of packet.servers) {
|
|
4354
|
-
const s = this.client.servers._add(server);
|
|
4355
|
-
if (this.client.options.fetchMembers) {
|
|
4356
|
-
promises.push(s.members.fetch());
|
|
4357
|
-
}
|
|
4358
|
-
}
|
|
4359
|
-
for (const channel of packet.channels) {
|
|
4360
|
-
this.client.channels._add(channel);
|
|
4361
|
-
}
|
|
4362
4369
|
for (const member of packet.members) {
|
|
4363
4370
|
(_a = this.client.servers.cache.get(member._id.server)) == null ? void 0 : _a.members._add(member);
|
|
4364
4371
|
}
|
|
4365
4372
|
for (const emoji of packet.emojis) {
|
|
4366
4373
|
(_b = this.client.servers.cache.get(emoji.parent.id)) == null ? void 0 : _b.emojis.set(emoji._id, __spreadProps(__spreadValues({}, emoji), { _id: emoji._id }));
|
|
4367
4374
|
}
|
|
4375
|
+
for (const channel of packet.channels) {
|
|
4376
|
+
this.client.channels._add(channel);
|
|
4377
|
+
}
|
|
4378
|
+
for (const server of packet.servers) {
|
|
4379
|
+
const s = this.client.servers._add(server);
|
|
4380
|
+
if (this.client.options.fetchMembers) {
|
|
4381
|
+
promises.push(s.members.fetch());
|
|
4382
|
+
}
|
|
4383
|
+
}
|
|
4368
4384
|
this.setHeartbeatTimer(
|
|
4369
4385
|
(_d = (_c = this.client.options.ws) == null ? void 0 : _c.heartbeatInterval) != null ? _d : 3e4
|
|
4370
4386
|
);
|