Fix Guild.edit: passing current guild id

This commit is contained in:
Nicolás Serna 2022-08-04 17:02:18 -03:00
parent e7f4348de0
commit abe4068001

View File

@ -1095,7 +1095,7 @@ export class Guild extends BaseGuild implements Model {
* @returns A promise that resolves to the edited guild. * @returns A promise that resolves to the edited guild.
*/ */
async edit(options: GuildEditOptions): Promise<Guild> { async edit(options: GuildEditOptions): Promise<Guild> {
const guild = await this.session.rest.patch<DiscordGuild>(GUILDS(), { const guild = await this.session.rest.patch<DiscordGuild>(GUILDS(this.id), {
name: options.name, name: options.name,
afk_channel_id: options.afkChannelId, afk_channel_id: options.afkChannelId,
afk_timeout: options.afkTimeout, afk_timeout: options.afkTimeout,