Fix guildChannelManager.create SMALL bracket mistake

This commit is contained in:
Helloyunho 2021-02-23 12:13:46 +09:00
parent de089ce610
commit 548b6bf2ad

View file

@ -66,8 +66,7 @@ export class GuildChannelsManager extends BaseChildManager<
async create(options: CreateChannelOptions): Promise<GuildChannels> { async create(options: CreateChannelOptions): Promise<GuildChannels> {
if (options.name === undefined) if (options.name === undefined)
throw new Error('name is required for GuildChannelsManager#create') throw new Error('name is required for GuildChannelsManager#create')
const res = ((await this.client.rest.post(GUILD_CHANNELS(this.guild.id)), const res = ((await this.client.rest.post(GUILD_CHANNELS(this.guild.id), {
{
name: options.name, name: options.name,
type: options.type, type: options.type,
topic: options.topic, topic: options.topic,
@ -83,7 +82,7 @@ export class GuildChannelsManager extends BaseChildManager<
? options.parent.id ? options.parent.id
: options.parent, : options.parent,
nsfw: options.nsfw nsfw: options.nsfw
}) as unknown) as GuildChannelPayload })) as unknown) as GuildChannelPayload
await this.set(res.id, res) await this.set(res.id, res)
const channel = await this.get(res.id) const channel = await this.get(res.id)