Skip to content

Commit

Permalink
feat(guild): add editOnboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jul 19, 2023
1 parent eccfe82 commit f7ad41f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/core/src/api/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1241,4 +1241,26 @@ export class GuildsAPI {
public async getOnboarding(guildId: Snowflake, { signal }: Pick<RequestData, 'signal'> = {}) {
return this.rest.get(Routes.guildOnboarding(guildId), { signal }) as Promise<RESTGetAPIGuildOnboardingResult>;
}

/**
* Edits a guild onboarding
*
* @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-onboarding}
* @param guildId - The id of the guild
* @param body - The data for editing the guild onboarding
* @param options - The options for editing the guild onboarding
*/
public async editOnboarding(
guildId: Snowflake,
body: any,
// body: RESTPutAPIGuildOnboardingJSONBody,
{ reason, signal }: Pick<RequestData, 'reason' | 'signal'> = {},
) {
return this.rest.put(Routes.guildOnboarding(guildId), {
reason,
body,
signal,
}) as Promise<any>;
// }) as Promise<RESTPutAPIGuildOnboardingResult>;
}
}

0 comments on commit f7ad41f

Please sign in to comment.