Skip to content

Commit abf6df8

Browse files
committed
fix(guild): deprecate guild owner API
1 parent 8f5ac55 commit abf6df8

File tree

1 file changed

+0
-56
lines changed

1 file changed

+0
-56
lines changed

packages/core/src/api/guild.ts

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { makeURLSearchParams, type RawFile, type REST, type RequestData } from '@discordjs/rest';
44
import {
55
Routes,
6-
type GuildMFALevel,
76
type GuildWidgetStyle,
87
type RESTGetAPIAuditLogQuery,
98
type RESTGetAPIAuditLogResult,
@@ -87,9 +86,6 @@ import {
8786
type RESTPostAPIGuildScheduledEventResult,
8887
type RESTPostAPIGuildStickerFormDataBody,
8988
type RESTPostAPIGuildStickerResult,
90-
type RESTPostAPIGuildTemplatesJSONBody,
91-
type RESTPostAPIGuildTemplatesResult,
92-
type RESTPostAPIGuildsMFAResult,
9389
type RESTPutAPIGuildBanJSONBody,
9490
type RESTPutAPIGuildMemberJSONBody,
9591
type RESTPutAPIGuildMemberResult,
@@ -167,17 +163,6 @@ export class GuildsAPI {
167163
}) as Promise<RESTPatchAPIGuildResult>;
168164
}
169165

170-
/**
171-
* Deletes a guild
172-
*
173-
* @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
174-
* @param guildId - The id of the guild to delete
175-
* @param options - The options for deleting this guild
176-
*/
177-
public async delete(guildId: Snowflake, { auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {}) {
178-
await this.rest.delete(Routes.guild(guildId), { auth, signal });
179-
}
180-
181166
/**
182167
* Adds user to the guild
183168
*
@@ -481,27 +466,6 @@ export class GuildsAPI {
481466
await this.rest.delete(Routes.guildRole(guildId, roleId), { auth, reason, signal });
482467
}
483468

484-
/**
485-
* Edits the multi-factor-authentication (MFA) level of a guild
486-
*
487-
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}
488-
* @param guildId - The id of the guild to edit the MFA level for
489-
* @param level - The new MFA level
490-
* @param options - The options for editing the MFA level
491-
*/
492-
public async editMFALevel(
493-
guildId: Snowflake,
494-
level: GuildMFALevel,
495-
{ auth, reason, signal }: Pick<RequestData, 'auth' | 'reason' | 'signal'> = {},
496-
) {
497-
return this.rest.post(Routes.guildMFA(guildId), {
498-
auth,
499-
reason,
500-
signal,
501-
body: { level },
502-
}) as Promise<RESTPostAPIGuildsMFAResult>;
503-
}
504-
505469
/**
506470
* Fetch the number of members that can be pruned from a guild
507471
*
@@ -1318,26 +1282,6 @@ export class GuildsAPI {
13181282
return this.rest.get(Routes.template(templateCode), { auth, signal }) as Promise<RESTGetAPITemplateResult>;
13191283
}
13201284

1321-
/**
1322-
* Creates a new template
1323-
*
1324-
* @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1325-
* @param templateCode - The code of the template
1326-
* @param body - The data for creating the template
1327-
* @param options - The options for creating the template
1328-
*/
1329-
public async createTemplate(
1330-
templateCode: string,
1331-
body: RESTPostAPIGuildTemplatesJSONBody,
1332-
{ auth, signal }: Pick<RequestData, 'auth' | 'signal'> = {},
1333-
) {
1334-
return this.rest.post(Routes.template(templateCode), {
1335-
auth,
1336-
body,
1337-
signal,
1338-
}) as Promise<RESTPostAPIGuildTemplatesResult>;
1339-
}
1340-
13411285
/**
13421286
* Fetches webhooks for a guild
13431287
*

0 commit comments

Comments
 (0)