mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
fix: type errors
This commit is contained in:
@@ -15,8 +15,8 @@ export async function handleThreadMemberUpdate(data: DiscordGatewayPayload) {
|
||||
|
||||
const member = {
|
||||
...payload,
|
||||
id: snowflakeToBigint(payload.id),
|
||||
userId: snowflakeToBigint(payload.userId),
|
||||
id: snowflakeToBigint(payload.id!),
|
||||
userId: snowflakeToBigint(payload.userId!),
|
||||
joinTimestamp: Date.parse(payload.joinTimestamp),
|
||||
};
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ export async function getActiveThreads(channelId: bigint) {
|
||||
);
|
||||
|
||||
for (const member of result.members) {
|
||||
const thread = threads.get(snowflakeToBigint(member.id));
|
||||
thread?.members.set(snowflakeToBigint(member.userId), {
|
||||
userId: snowflakeToBigint(member.userId),
|
||||
const thread = threads.get(snowflakeToBigint(member.id!));
|
||||
thread?.members.set(snowflakeToBigint(member.userId!), {
|
||||
userId: snowflakeToBigint(member.userId!),
|
||||
flags: member.flags,
|
||||
joinTimestamp: Date.parse(member.joinTimestamp),
|
||||
});
|
||||
|
||||
@@ -41,9 +41,9 @@ export async function getArchivedThreads(
|
||||
);
|
||||
|
||||
for (const member of result.members) {
|
||||
const thread = threads.get(snowflakeToBigint(member.id));
|
||||
thread?.members.set(snowflakeToBigint(member.userId), {
|
||||
userId: snowflakeToBigint(member.userId),
|
||||
const thread = threads.get(snowflakeToBigint(member.id!));
|
||||
thread?.members.set(snowflakeToBigint(member.userId!), {
|
||||
userId: snowflakeToBigint(member.userId!),
|
||||
flags: member.flags,
|
||||
joinTimestamp: Date.parse(member.joinTimestamp),
|
||||
});
|
||||
|
||||
@@ -20,7 +20,7 @@ export async function connectToVoiceChannel(
|
||||
guildId,
|
||||
channelId,
|
||||
selfMute: Boolean(options?.selfMute),
|
||||
selfDeaf: options.selfDeaf ?? true,
|
||||
selfDeaf: options?.selfDeaf ?? true,
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import { snowflakeToBigint } from "../bigint.ts";
|
||||
export function threadMemberModified(member: ThreadMember) {
|
||||
return {
|
||||
...member,
|
||||
id: snowflakeToBigint(member.id),
|
||||
userId: snowflakeToBigint(member.userId),
|
||||
id: snowflakeToBigint(member.id!),
|
||||
userId: snowflakeToBigint(member.userId!),
|
||||
joinTimestamp: Date.parse(member.joinTimestamp),
|
||||
} as ThreadMemberModified;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user