Prettified Code!

This commit is contained in:
itohatweb
2021-05-21 15:51:33 +00:00
committed by GitHub Action
parent fe4ab8517b
commit 3549cdeb63
279 changed files with 1617 additions and 1768 deletions
@@ -26,6 +26,6 @@ export async function addToThread(channelId: bigint, userId?: bigint) {
"put",
userId
? endpoints.THREAD_USER(channelId, userId)
: endpoints.THREAD_ME(channelId),
: endpoints.THREAD_ME(channelId)
);
}
@@ -5,8 +5,5 @@ import { endpoints } from "../../../util/constants.ts";
export async function getActiveThreads(channelId: bigint) {
// TODO(threads): perm check
// TODO(threads): test if it works
return await rest.runMethod(
"get",
endpoints.THREAD_ACTIVE(channelId),
);
return await rest.runMethod("get", endpoints.THREAD_ACTIVE(channelId));
}
@@ -7,7 +7,7 @@ export async function getArchivedThreads(
channelId: bigint,
options?: ListPublicArchivedThreads & {
type?: "public" | "private" | "privateJoinedThreads";
},
}
) {
// TODO(threads): perm check
// TODO(threads): check if this works
@@ -19,6 +19,6 @@ export async function getArchivedThreads(
: options?.type === "private"
? endpoints.THREAD_ARCHIVED_PRIVATE(channelId)
: endpoints.THREAD_ARCHIVED_PUBLIC(channelId),
snakelize(options ?? {}),
snakelize(options ?? {})
);
}
@@ -24,6 +24,6 @@ export async function removeFromThread(channelId: bigint, userId?: bigint) {
"delete",
userId
? endpoints.THREAD_USER(channelId, userId)
: endpoints.THREAD_ME(channelId),
: endpoints.THREAD_ME(channelId)
);
}
+2 -2
View File
@@ -12,7 +12,7 @@ import { snakelize } from "../../../util/utils.ts";
*/
export async function startThread(
channelId: bigint,
options: StartThread & { messageId?: bigint },
options: StartThread & { messageId?: bigint }
) {
const channel = await cacheHandlers.get("channels", channelId);
if (channel) {
@@ -33,6 +33,6 @@ export async function startThread(
options?.messageId
? endpoints.THREAD_START_PUBLIC(channelId, options.messageId)
: endpoints.THREAD_START_PRIVATE(channelId),
snakelize(options),
snakelize(options)
);
}