mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Prettified Code!
This commit is contained in:
@@ -16,11 +16,9 @@ export async function deleteChannel(channelId: bigint, reason?: string) {
|
||||
// TODO(threads): check if this requires guild perms or channel is enough
|
||||
await requireBotGuildPermissions(
|
||||
guild,
|
||||
[
|
||||
ChannelTypes.GuildNewsThread,
|
||||
ChannelTypes.GuildPivateThread,
|
||||
ChannelTypes.GuildPublicThread,
|
||||
].includes(channel.type)
|
||||
[ChannelTypes.GuildNewsThread, ChannelTypes.GuildPivateThread, ChannelTypes.GuildPublicThread].includes(
|
||||
channel.type
|
||||
)
|
||||
? ["MANAGE_THREADS"]
|
||||
: ["MANAGE_CHANNELS"]
|
||||
);
|
||||
@@ -33,9 +31,5 @@ export async function deleteChannel(channelId: bigint, reason?: string) {
|
||||
}
|
||||
}
|
||||
|
||||
return await rest.runMethod<undefined>(
|
||||
"delete",
|
||||
endpoints.CHANNEL_BASE(channelId),
|
||||
{ reason }
|
||||
);
|
||||
return await rest.runMethod<undefined>("delete", endpoints.CHANNEL_BASE(channelId), { reason });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user