chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.

This commit is contained in:
cpojer
2026-01-31 16:03:28 +09:00
parent 481f696a87
commit 15792b153f
292 changed files with 643 additions and 699 deletions

View File

@@ -77,11 +77,7 @@ async function listGuildChannels(
fetcher: typeof fetch,
guildId: string,
): Promise<DiscordChannelSummary[]> {
const raw = (await fetchDiscord(
`/guilds/${guildId}/channels`,
token,
fetcher,
)) as RESTGetAPIGuildChannelsResult;
const raw = await fetchDiscord(`/guilds/${guildId}/channels`, token, fetcher);
return raw
.filter((channel) => Boolean(channel.id) && "name" in channel)
.map((channel) => {
@@ -105,11 +101,7 @@ async function fetchChannel(
fetcher: typeof fetch,
channelId: string,
): Promise<DiscordChannelSummary | null> {
const raw = (await fetchDiscord(
`/channels/${channelId}`,
token,
fetcher,
)) as RESTGetAPIChannelResult;
const raw = await fetchDiscord(`/channels/${channelId}`, token, fetcher);
if (!raw || !("guild_id" in raw)) return null;
return {
id: raw.id,