mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fix: bigint now
This commit is contained in:
@@ -4,7 +4,7 @@ import { endpoints } from "../../../util/constants.ts";
|
||||
import { camelKeysToSnakeCase } from "../../../util/utils.ts";
|
||||
|
||||
export async function getArchivedThreads(
|
||||
channelId: string,
|
||||
channelId: bigint,
|
||||
options?: ListPublicArchivedThreads & {
|
||||
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
|
||||
/** 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): intents check
|
||||
const channel = await cacheHandlers.get("channels", channelId);
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Errors } from "../../../types/misc/errors.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. */
|
||||
export async function removeFromThread(channelId: string, userId?: string) {
|
||||
export async function removeFromThread(channelId: bigint, userId?: bigint) {
|
||||
// TODO(threads): perm check
|
||||
const channel = await cacheHandlers.get("channels", channelId);
|
||||
if (channel) {
|
||||
|
||||
@@ -11,8 +11,8 @@ import { camelKeysToSnakeCase } from "../../../util/utils.ts";
|
||||
* @param messageId when provided the thread will be public
|
||||
*/
|
||||
export async function startThread(
|
||||
channelId: string,
|
||||
options: StartThread & { messageId?: string },
|
||||
channelId: bigint,
|
||||
options: StartThread & { messageId?: bigint },
|
||||
) {
|
||||
const channel = await cacheHandlers.get("channels", channelId);
|
||||
if (channel) {
|
||||
|
||||
Reference in New Issue
Block a user