typing
This commit is contained in:
parent
20033429c5
commit
6a857285e1
8 changed files with 51 additions and 53 deletions
5
packages/discord-types/src/common/Guild.d.ts
vendored
5
packages/discord-types/src/common/Guild.d.ts
vendored
|
|
@ -20,6 +20,11 @@ export class Guild extends DiscordRecord {
|
|||
constructor(guild: object);
|
||||
afkChannelId: string | undefined;
|
||||
afkTimeout: number;
|
||||
applicationCommandCounts: {
|
||||
0: number;
|
||||
1: number;
|
||||
2: number;
|
||||
};
|
||||
application_id: string | null;
|
||||
banner: string | undefined;
|
||||
defaultMessageNotifications: GuildDefaultMessageNotifications;
|
||||
|
|
|
|||
12
packages/discord-types/src/common/Role.d.ts
vendored
12
packages/discord-types/src/common/Role.d.ts
vendored
|
|
@ -13,11 +13,11 @@ export interface Role {
|
|||
secondary_color: number | undefined;
|
||||
tertiary_color: number | undefined;
|
||||
};
|
||||
description: string | null;
|
||||
description: string | undefined;
|
||||
flags: RoleFlags;
|
||||
guildId: string;
|
||||
hoist: boolean;
|
||||
icon: string | null;
|
||||
icon: string | undefined;
|
||||
id: string;
|
||||
managed: boolean;
|
||||
mentionable: boolean;
|
||||
|
|
@ -27,11 +27,11 @@ export interface Role {
|
|||
tags: {
|
||||
bot_id?: string;
|
||||
integration_id?: string;
|
||||
premium_subscriber?: null;
|
||||
premium_subscriber?: unknown;
|
||||
subscription_listing_id?: string;
|
||||
available_for_purchase?: null;
|
||||
guild_connections?: null;
|
||||
available_for_purchase?: unknown;
|
||||
guild_connections?: unknown;
|
||||
} | undefined;
|
||||
unicodeEmoji: string | null;
|
||||
unicodeEmoji: string | undefined;
|
||||
version: number | undefined;
|
||||
}
|
||||
|
|
|
|||
37
packages/discord-types/src/flux.d.ts
vendored
37
packages/discord-types/src/flux.d.ts
vendored
|
|
@ -1,5 +1,42 @@
|
|||
import { GuildMemberFlags } from "../enums";
|
||||
import { VoiceState } from "./stores";
|
||||
import { FluxStore } from "./stores/FluxStore";
|
||||
|
||||
export interface PassiveUpdateState {
|
||||
type: string;
|
||||
guildId: string;
|
||||
members?: ({
|
||||
user: {
|
||||
avatar: string | null;
|
||||
communication_disabled_until: string | null;
|
||||
deaf: boolean;
|
||||
flags: GuildMemberFlags;
|
||||
joined_at: string;
|
||||
mute: boolean;
|
||||
nick: string;
|
||||
pending: boolean;
|
||||
premium_since: string | null;
|
||||
};
|
||||
roles: string[];
|
||||
premium_since: string | null;
|
||||
pending: boolean;
|
||||
nick: string | null;
|
||||
mute: boolean;
|
||||
joined_at: string;
|
||||
flags: GuildMemberFlags;
|
||||
deaf: boolean;
|
||||
communication_disabled_until: string | null;
|
||||
avatar: string | null;
|
||||
})[];
|
||||
channels: ({
|
||||
lastPinTimestamp?: string;
|
||||
lastMessageId: string;
|
||||
id: string;
|
||||
})[];
|
||||
voiceStates?: VoiceState[];
|
||||
}
|
||||
|
||||
|
||||
export class FluxEmitter {
|
||||
constructor();
|
||||
|
||||
|
|
|
|||
2
packages/discord-types/src/fluxEvents.d.ts
vendored
2
packages/discord-types/src/fluxEvents.d.ts
vendored
File diff suppressed because one or more lines are too long
1
packages/discord-types/src/index.d.ts
vendored
1
packages/discord-types/src/index.d.ts
vendored
|
|
@ -5,6 +5,5 @@ export * from "./fluxEvents";
|
|||
export * from "./menu";
|
||||
export * from "./modules";
|
||||
export * from "./stores";
|
||||
export * from "./passiveupdatestate";
|
||||
export * from "./utils";
|
||||
export * as Webpack from "../webpack";
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* Vencord, a Discord client mod
|
||||
* Copyright (c) 2024 Vendicated and contributors
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { GuildMemberFlags } from "../enums";
|
||||
import { VoiceState } from "./stores";
|
||||
|
||||
export type PassiveUpdateType = "PASSIVE_UPDATE_V2";
|
||||
|
||||
export interface PassiveUpdateState {
|
||||
type: PassiveUpdateType;
|
||||
guildId: string;
|
||||
members?: ({
|
||||
user: {
|
||||
avatar: null | string;
|
||||
communication_disabled_until: null | string;
|
||||
deaf: boolean;
|
||||
flags: GuildMemberFlags;
|
||||
joined_at: string;
|
||||
mute: boolean;
|
||||
nick: string;
|
||||
pending: boolean;
|
||||
premium_since: null | string;
|
||||
};
|
||||
roles: (string)[];
|
||||
premium_since: null | string;
|
||||
pending: boolean;
|
||||
nick: string | null;
|
||||
mute: boolean;
|
||||
joined_at: string;
|
||||
flags: GuildMemberFlags;
|
||||
deaf: boolean;
|
||||
communication_disabled_until: null | string;
|
||||
avatar: null | string;
|
||||
})[];
|
||||
channels: ({
|
||||
lastPinTimestamp?: string;
|
||||
lastMessageId: string;
|
||||
id: string;
|
||||
})[];
|
||||
voiceStates?: VoiceState[];
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@ export interface SpotifyTrack {
|
|||
export interface SpotifyPlayerState {
|
||||
track: SpotifyTrack;
|
||||
startTime: number;
|
||||
context: { uri: string } | null;
|
||||
context: { uri: string; } | null;
|
||||
}
|
||||
|
||||
export interface SpotifyActivity {
|
||||
|
|
|
|||
1
packages/discord-types/src/utils.d.ts
vendored
1
packages/discord-types/src/utils.d.ts
vendored
|
|
@ -31,6 +31,7 @@ export type Parser = Record<
|
|||
| "parseGuildEventDescription"
|
||||
| "parseAutoModerationSystemMessage"
|
||||
| "parseForumPostGuidelines"
|
||||
| "parseForumPostMostRecentMessage"
|
||||
| "parseVoiceChannelStatus",
|
||||
(content: string, inline?: boolean, state?: Record<string, any>) => ReactNode[]
|
||||
> & Record<
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue