@discordjs/core 2.4.0 → 2.5.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/dist/index.mjs CHANGED
@@ -1744,6 +1744,20 @@ var GuildsAPI = class {
1744
1744
  signal
1745
1745
  });
1746
1746
  }
1747
+ /**
1748
+ * Searches for messages.
1749
+ *
1750
+ * @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
1751
+ * @param guildId - The id of the guild to search in
1752
+ * @param query - The query to search for
1753
+ * @param options - The options for searching for messages
1754
+ */
1755
+ async searchForMessages(guildId, query, { signal } = {}) {
1756
+ return this.rest.get(Routes6.guildMessagesSearch(guildId), {
1757
+ query: makeURLSearchParams3(query),
1758
+ signal
1759
+ });
1760
+ }
1747
1761
  /**
1748
1762
  * Edits a guild member
1749
1763
  *
@@ -2123,7 +2137,9 @@ var InteractionsAPI = class {
2123
2137
 
2124
2138
  // src/api/invite.ts
2125
2139
  import { makeURLSearchParams as makeURLSearchParams5 } from "@discordjs/rest";
2126
- import { Routes as Routes8 } from "discord-api-types/v10";
2140
+ import {
2141
+ Routes as Routes8
2142
+ } from "discord-api-types/v10";
2127
2143
  var InvitesAPI = class {
2128
2144
  constructor(rest) {
2129
2145
  this.rest = rest;
@@ -2153,7 +2169,7 @@ var InvitesAPI = class {
2153
2169
  * @param options - The options for deleting the invite
2154
2170
  */
2155
2171
  async delete(code, { reason, signal } = {}) {
2156
- await this.rest.delete(Routes8.invite(code), { reason, signal });
2172
+ return this.rest.delete(Routes8.invite(code), { reason, signal });
2157
2173
  }
2158
2174
  };
2159
2175
 
@@ -3303,7 +3319,7 @@ __name(withFiles, "withFiles");
3303
3319
  // src/index.ts
3304
3320
  export * from "discord-api-types/v10";
3305
3321
  import { GatewayRateLimitError as GatewayRateLimitError2 } from "@discordjs/util";
3306
- var version = "2.4.0";
3322
+ var version = "2.5.0";
3307
3323
  export {
3308
3324
  API,
3309
3325
  ApplicationCommandsAPI,