mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
deno fmt
This commit is contained in:
@@ -11,12 +11,12 @@ export async function getChannelWebhooks(channelId: string) {
|
||||
|
||||
const result = (await rest.runMethod(
|
||||
"get",
|
||||
endpoints.CHANNEL_WEBHOOKS(channelId)
|
||||
endpoints.CHANNEL_WEBHOOKS(channelId),
|
||||
)) as DiscordWebhook[];
|
||||
|
||||
return new Collection(
|
||||
result
|
||||
.map((webhook) => snakeKeysToCamelCase<Webhook>(webhook))
|
||||
.map((webhook) => [webhook.id, webhook])
|
||||
.map((webhook) => [webhook.id, webhook]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { endpoints } from "../../util/constants.ts";
|
||||
export async function getChannels(guildId: string, addToCache = true) {
|
||||
const result = (await rest.runMethod(
|
||||
"get",
|
||||
endpoints.GUILD_CHANNELS(guildId)
|
||||
endpoints.GUILD_CHANNELS(guildId),
|
||||
)) as DiscordChannel[];
|
||||
|
||||
return new Collection(
|
||||
@@ -21,19 +21,19 @@ export async function getChannels(guildId: string, addToCache = true) {
|
||||
result.map(async (res) => {
|
||||
const discordenoChannel = await structures.createDiscordenoChannel(
|
||||
res,
|
||||
guildId
|
||||
guildId,
|
||||
);
|
||||
if (addToCache) {
|
||||
await cacheHandlers.set(
|
||||
"channels",
|
||||
discordenoChannel.id,
|
||||
discordenoChannel
|
||||
discordenoChannel,
|
||||
);
|
||||
}
|
||||
|
||||
return discordenoChannel;
|
||||
})
|
||||
}),
|
||||
)
|
||||
).map((c) => [c.id, c])
|
||||
).map((c) => [c.id, c]),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user