Merge remote-tracking branch 'upstream/dev'

This commit is contained in:
thororen1234 2024-05-15 10:26:42 -04:00
commit f0f655fa10
29 changed files with 544 additions and 143 deletions

View file

@ -26,12 +26,7 @@ export const Flux: t.Flux = findByPropsLazy("connectStores");
export type GenericStore = t.FluxStore & Record<string, any>;
export enum DraftType {
ChannelMessage = 0,
ThreadSettings = 1,
FirstThreadMessage = 2,
ApplicationLauncherCommand = 3
}
export const { DraftType }: { DraftType: typeof t.DraftType; } = findByPropsLazy("DraftType");
export let MessageStore: Omit<Stores.MessageStore, "getMessages"> & {
getMessages(chanId: string): any;

View file

@ -173,6 +173,15 @@ export class DraftStore extends FluxStore {
getThreadSettings(channelId: string): any | null;
}
export enum DraftType {
ChannelMessage,
ThreadSettings,
FirstThreadMessage,
ApplicationLauncherCommand,
Poll,
SlashCommand,
}
export class GuildStore extends FluxStore {
getGuild(guildId: string): Guild;
getGuildCount(): number;

View file

@ -117,6 +117,8 @@ export function showToast(message: string, type = ToastType.MESSAGE) {
}
export const UserUtils = findByPropsLazy("getUser", "fetchCurrentUser") as { getUser: (id: string) => Promise<User>; };
export const UploadManager = findByPropsLazy("clearAll", "addFile");
export const UploadHandler = findByPropsLazy("showUploadFileSizeExceededError", "promptToUpload") as {
promptToUpload: (files: File[], channel: Channel, draftType: Number) => void;
};