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.mjs CHANGED
@@ -2342,6 +2342,22 @@ var ServerMember3 = class extends Base {
2342
2342
  get user() {
2343
2343
  return this.client.users.cache.get(this.id);
2344
2344
  }
2345
+ /**
2346
+ * Gets the username of the user.
2347
+ *
2348
+ * @returns {string} The username of the user.
2349
+ */
2350
+ get username() {
2351
+ return this.user.username;
2352
+ }
2353
+ /**
2354
+ * Gets whether the user is a bot.
2355
+ *
2356
+ * @returns {boolean} Whether the user is a bot.
2357
+ */
2358
+ get bot() {
2359
+ return this.user.bot;
2360
+ }
2345
2361
  /**
2346
2362
  * Retrieves the server this member belongs to.
2347
2363
  *
@@ -2935,9 +2951,14 @@ var MessageManager = class extends BaseManager {
2935
2951
  }
2936
2952
  if (typeof query === "number") query = { limit: query };
2937
2953
  else if (typeof query === "undefined") query = { limit: 100 };
2954
+ const queryObj = Object.fromEntries(
2955
+ Object.entries(query).filter(
2956
+ ([, v]) => v !== void 0
2957
+ )
2958
+ );
2938
2959
  const messages = yield this.client.api.get(
2939
2960
  `/channels/${this.channel.id}/messages`,
2940
- { query: JSON.stringify(query) }
2961
+ queryObj
2941
2962
  );
2942
2963
  return messages.reduce((coll, cur) => {
2943
2964
  const msg = this._add(cur);
@@ -3284,7 +3305,7 @@ import { EventEmitter } from "node:events";
3284
3305
  import axios4, { AxiosError } from "axios";
3285
3306
 
3286
3307
  // package.json
3287
- var version = "0.2.3";
3308
+ var version = "0.2.5";
3288
3309
 
3289
3310
  // src/rest/restUtils/rateLimitQueue.ts
3290
3311
  import axios3 from "axios";