fix: bigint now

This commit is contained in:
ITOH
2021-05-03 21:21:51 +02:00
parent 0947486411
commit c0a2c520a5
4 changed files with 5 additions and 5 deletions
@@ -4,7 +4,7 @@ import { endpoints } from "../../../util/constants.ts";
import { camelKeysToSnakeCase } from "../../../util/utils.ts"; import { camelKeysToSnakeCase } from "../../../util/utils.ts";
export async function getArchivedThreads( export async function getArchivedThreads(
channelId: string, channelId: bigint,
options?: ListPublicArchivedThreads & { options?: ListPublicArchivedThreads & {
type?: "public" | "private" | "privateJoinedThreads"; type?: "public" | "private" | "privateJoinedThreads";
}, },
@@ -6,7 +6,7 @@ import { endpoints } from "../../../util/constants.ts";
// TODO(threads): it seems like the documented return type is wrong // TODO(threads): it seems like the documented return type is wrong
/** Returns array of thread members objects that are members of the thread. */ /** Returns array of thread members objects that are members of the thread. */
export async function getThreadMembers(channelId: string) { export async function getThreadMembers(channelId: bigint) {
// TODO(threads): perm check // TODO(threads): perm check
// TODO(threads): intents check // TODO(threads): intents check
const channel = await cacheHandlers.get("channels", channelId); const channel = await cacheHandlers.get("channels", channelId);
@@ -5,7 +5,7 @@ import { Errors } from "../../../types/misc/errors.ts";
import { endpoints } from "../../../util/constants.ts"; import { endpoints } from "../../../util/constants.ts";
/** Removes another user from a thread. Requires the MANAGE_THREADS permission or that you are the creator of the thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */ /** Removes another user from a thread. Requires the MANAGE_THREADS permission or that you are the creator of the thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event. */
export async function removeFromThread(channelId: string, userId?: string) { export async function removeFromThread(channelId: bigint, userId?: bigint) {
// TODO(threads): perm check // TODO(threads): perm check
const channel = await cacheHandlers.get("channels", channelId); const channel = await cacheHandlers.get("channels", channelId);
if (channel) { if (channel) {
+2 -2
View File
@@ -11,8 +11,8 @@ import { camelKeysToSnakeCase } from "../../../util/utils.ts";
* @param messageId when provided the thread will be public * @param messageId when provided the thread will be public
*/ */
export async function startThread( export async function startThread(
channelId: string, channelId: bigint,
options: StartThread & { messageId?: string }, options: StartThread & { messageId?: bigint },
) { ) {
const channel = await cacheHandlers.get("channels", channelId); const channel = await cacheHandlers.get("channels", channelId);
if (channel) { if (channel) {