mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-26 06:38:24 -04:00
Fetch all findstorelazy from webpack
This commit is contained in:
parent
6714da52f0
commit
bf246208e9
30 changed files with 156 additions and 241 deletions
|
@ -23,11 +23,9 @@ import { Logger } from "@utils/Logger";
|
|||
import { Margins } from "@utils/margins";
|
||||
import { ModalContent, ModalHeader, ModalRoot, openModalLazy } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import { Constants, EmojiStore, FluxDispatcher, Forms, GuildStore, Menu, PermissionsBits, PermissionStore, React, RestAPI, Toasts, Tooltip, UserStore } from "@webpack/common";
|
||||
import { findByCodeLazy } from "@webpack";
|
||||
import { Constants, EmojiStore, FluxDispatcher, Forms, GuildStore, Menu, PermissionsBits, PermissionStore, React, RestAPI, StickerStore, Toasts, Tooltip, UserStore } from "@webpack/common";
|
||||
import { Promisable } from "type-fest";
|
||||
|
||||
const StickersStore = findStoreLazy("StickersStore");
|
||||
const uploadEmoji = findByCodeLazy(".GUILD_EMOJIS(", "EMOJI_UPLOAD_START");
|
||||
|
||||
interface Sticker {
|
||||
|
@ -60,7 +58,7 @@ function getUrl(data: Data) {
|
|||
}
|
||||
|
||||
async function fetchSticker(id: string) {
|
||||
const cached = StickersStore.getStickerById(id);
|
||||
const cached = StickerStore.getStickerById(id);
|
||||
if (cached) return cached;
|
||||
|
||||
const { body } = await RestAPI.get({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue