revbot.js 0.2.3 → 0.2.5
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 +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +23 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.mts
CHANGED
|
@@ -1889,6 +1889,18 @@ declare class ServerMember extends Base {
|
|
|
1889
1889
|
* @returns {User} The user instance.
|
|
1890
1890
|
*/
|
|
1891
1891
|
get user(): User;
|
|
1892
|
+
/**
|
|
1893
|
+
* Gets the username of the user.
|
|
1894
|
+
*
|
|
1895
|
+
* @returns {string} The username of the user.
|
|
1896
|
+
*/
|
|
1897
|
+
get username(): string;
|
|
1898
|
+
/**
|
|
1899
|
+
* Gets whether the user is a bot.
|
|
1900
|
+
*
|
|
1901
|
+
* @returns {boolean} Whether the user is a bot.
|
|
1902
|
+
*/
|
|
1903
|
+
get bot(): boolean;
|
|
1892
1904
|
/**
|
|
1893
1905
|
* Retrieves the server this member belongs to.
|
|
1894
1906
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1889,6 +1889,18 @@ declare class ServerMember extends Base {
|
|
|
1889
1889
|
* @returns {User} The user instance.
|
|
1890
1890
|
*/
|
|
1891
1891
|
get user(): User;
|
|
1892
|
+
/**
|
|
1893
|
+
* Gets the username of the user.
|
|
1894
|
+
*
|
|
1895
|
+
* @returns {string} The username of the user.
|
|
1896
|
+
*/
|
|
1897
|
+
get username(): string;
|
|
1898
|
+
/**
|
|
1899
|
+
* Gets whether the user is a bot.
|
|
1900
|
+
*
|
|
1901
|
+
* @returns {boolean} Whether the user is a bot.
|
|
1902
|
+
*/
|
|
1903
|
+
get bot(): boolean;
|
|
1892
1904
|
/**
|
|
1893
1905
|
* Retrieves the server this member belongs to.
|
|
1894
1906
|
*
|
package/dist/index.js
CHANGED
|
@@ -2418,6 +2418,22 @@ var ServerMember3 = class extends Base {
|
|
|
2418
2418
|
get user() {
|
|
2419
2419
|
return this.client.users.cache.get(this.id);
|
|
2420
2420
|
}
|
|
2421
|
+
/**
|
|
2422
|
+
* Gets the username of the user.
|
|
2423
|
+
*
|
|
2424
|
+
* @returns {string} The username of the user.
|
|
2425
|
+
*/
|
|
2426
|
+
get username() {
|
|
2427
|
+
return this.user.username;
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
* Gets whether the user is a bot.
|
|
2431
|
+
*
|
|
2432
|
+
* @returns {boolean} Whether the user is a bot.
|
|
2433
|
+
*/
|
|
2434
|
+
get bot() {
|
|
2435
|
+
return this.user.bot;
|
|
2436
|
+
}
|
|
2421
2437
|
/**
|
|
2422
2438
|
* Retrieves the server this member belongs to.
|
|
2423
2439
|
*
|
|
@@ -3011,9 +3027,14 @@ var MessageManager = class extends BaseManager {
|
|
|
3011
3027
|
}
|
|
3012
3028
|
if (typeof query === "number") query = { limit: query };
|
|
3013
3029
|
else if (typeof query === "undefined") query = { limit: 100 };
|
|
3030
|
+
const queryObj = Object.fromEntries(
|
|
3031
|
+
Object.entries(query).filter(
|
|
3032
|
+
([, v]) => v !== void 0
|
|
3033
|
+
)
|
|
3034
|
+
);
|
|
3014
3035
|
const messages = yield this.client.api.get(
|
|
3015
3036
|
`/channels/${this.channel.id}/messages`,
|
|
3016
|
-
|
|
3037
|
+
queryObj
|
|
3017
3038
|
);
|
|
3018
3039
|
return messages.reduce((coll, cur) => {
|
|
3019
3040
|
const msg = this._add(cur);
|
|
@@ -3360,7 +3381,7 @@ var import_node_events = require("events");
|
|
|
3360
3381
|
var import_axios4 = __toESM(require("axios"));
|
|
3361
3382
|
|
|
3362
3383
|
// package.json
|
|
3363
|
-
var version = "0.2.
|
|
3384
|
+
var version = "0.2.5";
|
|
3364
3385
|
|
|
3365
3386
|
// src/rest/restUtils/rateLimitQueue.ts
|
|
3366
3387
|
var import_axios3 = __toESM(require("axios"));
|