mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:14:31 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user