fix: remove extra loops (#848)

* fix: remove extra loops

Co-authored-by: Skillz4Killz <Skillz4Killz@users.noreply.github.com>
This commit is contained in:
Skillz4Killz
2021-04-13 14:36:23 -04:00
committed by GitHub
parent da3f99cb2c
commit c85b76cd18
5 changed files with 11 additions and 15 deletions
+4 -3
View File
@@ -15,8 +15,9 @@ export async function getChannelWebhooks(channelId: string) {
)) as DiscordWebhook[];
return new Collection(
result
.map((webhook) => snakeKeysToCamelCase<Webhook>(webhook))
.map((webhook) => [webhook.id, webhook]),
result.map((webhook) => [
webhook.id,
snakeKeysToCamelCase<Webhook>(webhook),
]),
);
}