mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -04:00
Path aliases, better lazyWebpack (#268)
This commit is contained in:
parent
7a4402f142
commit
bad96b7887
138 changed files with 572 additions and 547 deletions
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { makeLazy } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { makeLazy } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "BetterNotesBox",
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { get, set } from "@api/DataStore";
|
||||
import { Devs } from "@utils/constants";
|
||||
import Logger from "@utils/Logger";
|
||||
import definePlugin from "@utils/types";
|
||||
import { ChannelStore, FluxDispatcher } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { get, set } from "../api/DataStore";
|
||||
import { Devs } from "../utils/constants";
|
||||
import Logger from "../utils/Logger";
|
||||
import definePlugin from "../utils/types";
|
||||
import { ChannelStore, FluxDispatcher } from "../webpack/common";
|
||||
|
||||
let style: HTMLStyleElement;
|
||||
|
||||
const KEY = "HideAttachments_HiddenIds";
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "TimeBarAllActivities",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
enum Methods {
|
||||
Random,
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { BadgePosition, ProfileBadge } from "../api/Badges";
|
||||
import DonateButton from "../components/DonateButton";
|
||||
import ErrorBoundary from "../components/ErrorBoundary";
|
||||
import { Flex } from "../components/Flex";
|
||||
import { Heart } from "../components/Heart";
|
||||
import { Devs } from "../utils/constants";
|
||||
import IpcEvents from "../utils/IpcEvents";
|
||||
import Logger from "../utils/Logger";
|
||||
import { closeModal, Modals, openModal } from "../utils/modal";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Forms, Margins } from "../webpack/common";
|
||||
import { BadgePosition, ProfileBadge } from "@api/Badges";
|
||||
import DonateButton from "@components/DonateButton";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Flex } from "@components/Flex";
|
||||
import { Heart } from "@components/Heart";
|
||||
import { Devs } from "@utils/constants";
|
||||
import IpcEvents from "@utils/IpcEvents";
|
||||
import Logger from "@utils/Logger";
|
||||
import { closeModal, Modals, openModal } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Forms, Margins } from "@webpack/common";
|
||||
|
||||
const CONTRIBUTOR_BADGE = "https://media.discordapp.net/stickers/1026517526106087454.webp";
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "CommandsAPI",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
// duplicate values have multiple branches with different types. Just include all to be safe
|
||||
const nameMap = {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "MessageAccessoriesAPI",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "MessageEventsAPI",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
migratePluginSettings("NoticesAPI", "NoticesApi");
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "ServerListAPI",
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { popNotice, showNotice } from "../api/Notices";
|
||||
import { Link } from "../components/Link";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters, mapMangledModuleLazy } from "../webpack";
|
||||
import { FluxDispatcher, Forms, Toasts } from "../webpack/common";
|
||||
import { popNotice, showNotice } from "@api/Notices";
|
||||
import { Link } from "@components/Link";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { filters, findByCodeLazy, mapMangledModuleLazy } from "@webpack";
|
||||
import { FluxDispatcher, Forms, Toasts } from "@webpack/common";
|
||||
|
||||
const assetManager = mapMangledModuleLazy(
|
||||
"getAssetImage: size must === [number, number] for Twitch",
|
||||
|
@ -31,7 +30,7 @@ const assetManager = mapMangledModuleLazy(
|
|||
}
|
||||
);
|
||||
|
||||
const rpcManager = lazyWebpack(filters.byCode(".APPLICATION_RPC("));
|
||||
const rpcManager = findByCodeLazy(".APPLICATION_RPC(");
|
||||
|
||||
async function lookupAsset(applicationId: string, key: string): Promise<string> {
|
||||
return (await assetManager.getAsset(applicationId, [key, undefined]))[0];
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "BANger",
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "BetterGifAltText",
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings, Settings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Clipboard, Toasts } from "../webpack/common";
|
||||
import { migratePluginSettings, Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Clipboard, Toasts } from "@webpack/common";
|
||||
|
||||
migratePluginSettings("BetterRoleDot", "ClickableRoleDot");
|
||||
export default definePlugin({
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "BetterUploadButton",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
let style: HTMLStyleElement;
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "../api/settings";
|
||||
import ErrorBoundary from "../components/ErrorBoundary";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { React } from "../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { React } from "@webpack/common";
|
||||
|
||||
function formatDuration(ms: number) {
|
||||
// here be dragons (moment fucking sucks)
|
||||
|
|
|
@ -22,10 +22,11 @@ import {
|
|||
MessageObject,
|
||||
removePreEditListener,
|
||||
removePreSendListener
|
||||
} from "../../api/MessageEvents";
|
||||
import { migratePluginSettings } from "../../api/settings";
|
||||
import { Devs } from "../../utils/constants";
|
||||
import definePlugin from "../../utils/types";
|
||||
} from "@api/MessageEvents";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
import { defaultRules } from "./defaultRules";
|
||||
|
||||
// From lodash
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
const WEB_ONLY = (f: string) => () => {
|
||||
throw new Error(`'${f}' is Discord Desktop only.`);
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandOptionType, sendBotMessage } from "../api/Commands";
|
||||
import { findOption } from "../api/Commands/commandHelpers";
|
||||
import { ApplicationCommandInputType } from "../api/Commands/types";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { findByCode, findByProps } from "../webpack";
|
||||
import { ApplicationCommandOptionType, sendBotMessage } from "@api/Commands";
|
||||
import { findOption } from "@api/Commands/commandHelpers";
|
||||
import { ApplicationCommandInputType } from "@api/Commands/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByCode, findByProps } from "@webpack";
|
||||
|
||||
const DRAFT_TYPE = 0;
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandOptionType, sendBotMessage } from "../api/Commands";
|
||||
import { ApplicationCommandInputType } from "../api/Commands/types";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { ApplicationCommandOptionType, sendBotMessage } from "@api/Commands";
|
||||
import { ApplicationCommandInputType } from "@api/Commands/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "UrbanDictionary",
|
||||
|
|
|
@ -16,20 +16,20 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings, Settings } from "../api/settings";
|
||||
import { CheckedTextInput } from "../components/CheckedTextInput";
|
||||
import { Devs } from "../utils/constants";
|
||||
import Logger from "../utils/Logger";
|
||||
import { lazyWebpack, makeLazy } from "../utils/misc";
|
||||
import { ModalContent, ModalHeader, ModalRoot, openModal } from "../utils/modal";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { Forms, GuildStore, Margins, Menu, PermissionStore, React, Toasts, Tooltip, UserStore } from "../webpack/common";
|
||||
import { migratePluginSettings, Settings } from "@api/settings";
|
||||
import { CheckedTextInput } from "@components/CheckedTextInput";
|
||||
import { Devs } from "@utils/constants";
|
||||
import Logger from "@utils/Logger";
|
||||
import { makeLazy } from "@utils/misc";
|
||||
import { ModalContent, ModalHeader, ModalRoot, openModal } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||
import { Forms, GuildStore, Margins, Menu, PermissionStore, React, Toasts, Tooltip, UserStore } from "@webpack/common";
|
||||
|
||||
const MANAGE_EMOJIS_AND_STICKERS = 1n << 30n;
|
||||
|
||||
const GuildEmojiStore = lazyWebpack(filters.byProps("getGuilds", "getGuildEmoji"));
|
||||
const uploadEmoji = lazyWebpack(filters.byCode('"EMOJI_UPLOAD_START"', "GUILD_EMOJIS("));
|
||||
const GuildEmojiStore = findByPropsLazy("getGuilds", "getGuildEmoji");
|
||||
const uploadEmoji = findByCodeLazy('"EMOJI_UPLOAD_START"', "GUILD_EMOJIS(");
|
||||
|
||||
function getGuildCandidates(isAnimated: boolean) {
|
||||
const meId = UserStore.getCurrentUser().id;
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { filters } from "../webpack";
|
||||
import { Forms, React } from "../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Forms, React } from "@webpack/common";
|
||||
|
||||
const KbdStyles = lazyWebpack(filters.byProps("key", "removeBuildOverride"));
|
||||
const KbdStyles = findByPropsLazy("key", "removeBuildOverride");
|
||||
|
||||
export default definePlugin({
|
||||
name: "Experiments",
|
||||
|
|
|
@ -16,18 +16,16 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "../api/MessageEvents";
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { ApngDisposeOp, getGifEncoder, importApngJs } from "../utils/dependencies";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { filters } from "../webpack";
|
||||
import { ChannelStore, UserStore } from "../webpack/common";
|
||||
import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "@api/MessageEvents";
|
||||
import { migratePluginSettings, Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { ApngDisposeOp, getGifEncoder, importApngJs } from "@utils/dependencies";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, UserStore } from "@webpack/common";
|
||||
|
||||
const DRAFT_TYPE = 0;
|
||||
const promptToUpload = lazyWebpack(filters.byCode("UPLOAD_FILE_LIMIT_ERROR"));
|
||||
const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR");
|
||||
|
||||
interface BaseSticker {
|
||||
available: boolean;
|
||||
|
@ -225,8 +223,8 @@ export default definePlugin({
|
|||
return;
|
||||
}
|
||||
|
||||
const EmojiStore = lazyWebpack(filters.byProps("getCustomEmojiById"));
|
||||
const StickerStore = lazyWebpack(filters.byProps("getAllGuildStickers")) as {
|
||||
const EmojiStore = findByPropsLazy("getCustomEmojiById");
|
||||
const StickerStore = findByPropsLazy("getAllGuildStickers") as {
|
||||
getPremiumPacks(): StickerPack[];
|
||||
getAllGuildStickers(): Map<string, Sticker[]>;
|
||||
getStickerById(id: string): Sticker | undefined;
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandOptionType } from "../api/Commands";
|
||||
import { makeRange } from "../components/PluginSettings/components";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { ApplicationCommandOptionType } from "@api/Commands";
|
||||
import { Settings } from "@api/settings";
|
||||
import { makeRange } from "@components/PluginSettings/components";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "Fart2",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { waitFor } from "../webpack";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { waitFor } from "@webpack";
|
||||
|
||||
let GuildStore;
|
||||
waitFor(["getGuild"], m => GuildStore = m);
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { findByProps } from "../webpack";
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "@api/Commands";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByProps } from "@webpack";
|
||||
|
||||
export default definePlugin({
|
||||
name: "FriendInvites",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { addPreSendListener, MessageObject, removePreSendListener } from "@api/MessageEvents";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
const re = /https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "iLoveSpam",
|
||||
|
|
|
@ -16,11 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DataStore } from "../api";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import * as DataStore from "@api/DataStore";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
|
||||
interface MatchAndReplace {
|
||||
match: RegExp;
|
||||
|
@ -28,7 +27,7 @@ interface MatchAndReplace {
|
|||
}
|
||||
|
||||
/** Used to re-render the Registered Games tab to update how our button looks like */
|
||||
const RunningGameStoreModule = lazyWebpack(filters.byProps("IgnoreActivities_reRenderGames"));
|
||||
const RunningGameStoreModule = findByPropsLazy("IgnoreActivities_reRenderGames");
|
||||
|
||||
let ignoredActivitiesCache: string[] = [];
|
||||
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { registerCommand, unregisterCommand } from "@api/Commands";
|
||||
import { Settings } from "@api/settings";
|
||||
import Logger from "@utils/Logger";
|
||||
import { Patch, Plugin } from "@utils/types";
|
||||
|
||||
import Plugins from "~plugins";
|
||||
|
||||
import { registerCommand, unregisterCommand } from "../api/Commands";
|
||||
import { Settings } from "../api/settings";
|
||||
import { traceFunction } from "../debug/Tracer";
|
||||
import Logger from "../utils/Logger";
|
||||
import { Patch, Plugin } from "../utils/types";
|
||||
|
||||
const logger = new Logger("PluginManager", "#a6d189");
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DataStore } from "../api";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { ChannelStore, FluxDispatcher, NavigationRouter, SelectedChannelStore, SelectedGuildStore } from "../webpack/common";
|
||||
import * as DataStore from "@api/DataStore";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { ChannelStore, FluxDispatcher, NavigationRouter, SelectedChannelStore, SelectedGuildStore } from "@webpack/common";
|
||||
|
||||
export interface LogoutEvent {
|
||||
type: "LOGOUT";
|
||||
|
|
|
@ -16,43 +16,43 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Link } from "../components/Link";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings, Webpack } from "../Vencord";
|
||||
import { FluxDispatcher, Forms } from "../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Link } from "@components/Link";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { filters, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
|
||||
import { FluxDispatcher, Forms } from "@webpack/common";
|
||||
|
||||
interface ActivityAssets {
|
||||
large_image?: string
|
||||
large_text?: string
|
||||
small_image?: string
|
||||
small_text?: string
|
||||
large_image?: string;
|
||||
large_text?: string;
|
||||
small_image?: string;
|
||||
small_text?: string;
|
||||
}
|
||||
|
||||
interface Activity {
|
||||
state: string
|
||||
details?: string
|
||||
state: string;
|
||||
details?: string;
|
||||
timestamps?: {
|
||||
start?: Number
|
||||
}
|
||||
assets?: ActivityAssets
|
||||
buttons?: Array<string>
|
||||
name: string
|
||||
application_id: string
|
||||
start?: Number;
|
||||
};
|
||||
assets?: ActivityAssets;
|
||||
buttons?: Array<string>;
|
||||
name: string;
|
||||
application_id: string;
|
||||
metadata?: {
|
||||
button_urls?: Array<string>
|
||||
}
|
||||
type: Number
|
||||
flags: Number
|
||||
button_urls?: Array<string>;
|
||||
};
|
||||
type: Number;
|
||||
flags: Number;
|
||||
}
|
||||
|
||||
interface TrackData {
|
||||
name: string
|
||||
album: string
|
||||
artist: string
|
||||
url: string
|
||||
imageUrl?: string
|
||||
name: string;
|
||||
album: string;
|
||||
artist: string;
|
||||
url: string;
|
||||
imageUrl?: string;
|
||||
}
|
||||
|
||||
// only relevant enum values
|
||||
|
@ -67,11 +67,11 @@ enum ActivityFlag {
|
|||
|
||||
const applicationId = "1043533871037284423";
|
||||
|
||||
const presenceStore = lazyWebpack(Webpack.filters.byProps("getLocalPresence"));
|
||||
const assetManager = Webpack.mapMangledModuleLazy(
|
||||
const presenceStore = findByPropsLazy("getLocalPresence");
|
||||
const assetManager = mapMangledModuleLazy(
|
||||
"getAssetImage: size must === [number, number] for Twitch",
|
||||
{
|
||||
getAsset: Webpack.filters.byCode("apply("),
|
||||
getAsset: filters.byCode("apply("),
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -196,9 +196,9 @@ export default definePlugin({
|
|||
state: hideAlbumName ? trackData.artist : `${trackData.artist} - ${trackData.album}`,
|
||||
assets,
|
||||
|
||||
buttons: [ "Open in Last.fm" ],
|
||||
buttons: ["Open in Last.fm"],
|
||||
metadata: {
|
||||
button_urls: [ trackData.url ]
|
||||
button_urls: [trackData.url]
|
||||
},
|
||||
|
||||
type: this.settings.useListeningStatus ? ActivityType.LISTENING : ActivityType.PLAYING,
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
// These are Xor encrypted to prevent you from spoiling yourself when you read the source code.
|
||||
// don't worry about it :P
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addClickListener, removeClickListener } from "../api/MessageEvents";
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { UserStore } from "../webpack/common";
|
||||
import { addClickListener, removeClickListener } from "@api/MessageEvents";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy, findLazy } from "@webpack";
|
||||
import { UserStore } from "@webpack/common";
|
||||
|
||||
let isDeletePressed = false;
|
||||
const keydown = (e: KeyboardEvent) => e.key === "Backspace" && (isDeletePressed = true);
|
||||
|
@ -37,10 +36,10 @@ export default definePlugin({
|
|||
dependencies: ["MessageEventsAPI"],
|
||||
|
||||
start() {
|
||||
const MessageActions = lazyWebpack(filters.byProps("deleteMessage", "startEditMessage"));
|
||||
const PermissionStore = lazyWebpack(filters.byProps("can", "initialize"));
|
||||
const Permissions = lazyWebpack(m => typeof m.MANAGE_MESSAGES === "bigint");
|
||||
const EditStore = lazyWebpack(filters.byProps("isEditing", "isEditingAny"));
|
||||
const MessageActions = findByPropsLazy("deleteMessage", "startEditMessage");
|
||||
const PermissionStore = findByPropsLazy("can", "initialize");
|
||||
const Permissions = findLazy(m => typeof m.MANAGE_MESSAGES === "bigint");
|
||||
const EditStore = findByPropsLazy("isEditing", "isEditingAny");
|
||||
|
||||
document.addEventListener("keydown", keydown);
|
||||
document.addEventListener("keyup", keyup);
|
||||
|
|
|
@ -16,14 +16,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "../../api/settings";
|
||||
import ErrorBoundary from "../../components/ErrorBoundary";
|
||||
import { Devs } from "../../utils/constants";
|
||||
import Logger from "../../utils/Logger";
|
||||
import { lazyWebpack } from "../../utils/misc";
|
||||
import definePlugin, { OptionType } from "../../utils/types";
|
||||
import { filters } from "../../webpack";
|
||||
import { Parser, UserStore } from "../../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import Logger from "@utils/Logger";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Parser, UserStore } from "@webpack/common";
|
||||
|
||||
function addDeleteStyleClass() {
|
||||
if (Settings.plugins.MessageLogger.deleteStyle === "text") {
|
||||
|
@ -74,8 +73,8 @@ export default definePlugin({
|
|||
`,
|
||||
|
||||
start() {
|
||||
this.moment = lazyWebpack(filters.byProps("relativeTimeRounding", "relativeTimeThreshold"));
|
||||
this.timestampModule = lazyWebpack(filters.byProps("messageLogger_TimestampComponent"));
|
||||
this.moment = findByPropsLazy("relativeTimeRounding", "relativeTimeThreshold");
|
||||
this.timestampModule = findByPropsLazy("messageLogger_TimestampComponent");
|
||||
|
||||
const style = this.style = document.createElement("style");
|
||||
style.textContent = this.css;
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DataStore } from "../api";
|
||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, registerCommand, sendBotMessage, unregisterCommand } from "../api/Commands";
|
||||
import { Settings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, registerCommand, sendBotMessage, unregisterCommand } from "@api/Commands";
|
||||
import * as DataStore from "@api/DataStore";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
const EMOTE = "<:luna:1035316192220553236>";
|
||||
const DATA_KEY = "MessageTags_TAGS";
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandInputType, findOption, OptionalMessageOption, RequiredMessageOption, sendBotMessage } from "../api/Commands";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { ApplicationCommandInputType, findOption, OptionalMessageOption, RequiredMessageOption, sendBotMessage } from "@api/Commands";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
|
||||
function mock(input: string): string {
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { findOption, OptionalMessageOption } from "../api/Commands";
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { findOption, OptionalMessageOption } from "@api/Commands";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
migratePluginSettings("MoreKaomoji", "moarKaomojis");
|
||||
export default definePlugin({
|
||||
|
|
|
@ -16,15 +16,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "@api/settings";
|
||||
import { makeRange } from "@components/PluginSettings/components/SettingSliderComponent";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { sleep } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { FluxDispatcher, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Message, ReactionEmoji } from "discord-types/general";
|
||||
|
||||
import { makeRange } from "../components/PluginSettings/components/SettingSliderComponent";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { sleep } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { FluxDispatcher, SelectedChannelStore, UserStore } from "../webpack/common";
|
||||
|
||||
interface IMessageCreate {
|
||||
type: "MESSAGE_CREATE";
|
||||
optimistic: boolean;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "MuteNewGuild",
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { filters } from "../webpack";
|
||||
const RelationshipStore = lazyWebpack(filters.byProps("getRelationships", "isBlocked"));
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
|
||||
const RelationshipStore = findByPropsLazy("getRelationships", "isBlocked");
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoBlockedMessages",
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { addPreSendListener, MessageObject, removePreSendListener } from "@api/MessageEvents";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoCanaryMessageLinks",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
migratePluginSettings("NoDevtoolsWarning", "STFU");
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "No F1",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "No RPC",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoReplyMention",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoSystemBadge",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoTrack",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
|
||||
export default definePlugin({
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "oneko",
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "../api/Commands";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { getGifEncoder } from "../utils/dependencies";
|
||||
import { lazyWebpack, makeLazy } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption, sendBotMessage } from "@api/Commands";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { getGifEncoder } from "@utils/dependencies";
|
||||
import { makeLazy } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||
|
||||
const DRAFT_TYPE = 0;
|
||||
const DEFAULT_DELAY = 20;
|
||||
|
@ -35,9 +35,9 @@ const getFrames = makeLazy(() => Promise.all(
|
|||
))
|
||||
);
|
||||
|
||||
const fetchUser = lazyWebpack(filters.byCode(".USER("));
|
||||
const promptToUpload = lazyWebpack(filters.byCode("UPLOAD_FILE_LIMIT_ERROR"));
|
||||
const UploadStore = lazyWebpack(filters.byProps("getUploads"));
|
||||
const fetchUser = findByCodeLazy(".USER(");
|
||||
const promptToUpload = findByCodeLazy("UPLOAD_FILE_LIMIT_ERROR");
|
||||
const UploadStore = findByPropsLazy("getUploads");
|
||||
|
||||
function loadImage(source: File | string) {
|
||||
const isFile = source instanceof File;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "PlainFolderIcon",
|
||||
|
|
|
@ -16,16 +16,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "@api/settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByCodeLazy } from "@webpack";
|
||||
import { PresenceStore, Tooltip } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import { Settings } from "../api/settings";
|
||||
import ErrorBoundary from "../components/ErrorBoundary";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { PresenceStore, Tooltip } from "../webpack/common";
|
||||
|
||||
function Icon(path: string, viewBox = "0 0 24 24") {
|
||||
return ({ color, tooltip }: { color: string; tooltip: string; }) => (
|
||||
<Tooltip text={tooltip} >
|
||||
|
@ -52,7 +50,7 @@ const Icons = {
|
|||
};
|
||||
type Platform = keyof typeof Icons;
|
||||
|
||||
const getStatusColor = lazyWebpack(filters.byCode("STATUS_YELLOW", "TWITCH", "STATUS_GREY"));
|
||||
const getStatusColor = findByCodeLazy("STATUS_YELLOW", "TWITCH", "STATUS_GREY");
|
||||
|
||||
const PlatformIcon = ({ platform, status }: { platform: Platform, status: string; }) => {
|
||||
const tooltip = platform[0].toUpperCase() + platform.slice(1);
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Link } from "../../../components/Link";
|
||||
import { Forms, React } from "../../../webpack/common";
|
||||
import { Link } from "@components/Link";
|
||||
import { Forms, React } from "@webpack/common";
|
||||
|
||||
export default function PronounsAboutComponent() {
|
||||
return (
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "@api/settings";
|
||||
import { classes, useAwaiter } from "@utils/misc";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { UserStore } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
|
||||
import { Settings } from "../../../Vencord";
|
||||
import { filters } from "../../../webpack";
|
||||
import { UserStore } from "../../../webpack/common";
|
||||
import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
|
||||
import { PronounMapping } from "../types";
|
||||
|
||||
const styles: Record<string, string> = lazyWebpack(filters.byProps("timestampInline"));
|
||||
const styles: Record<string, string> = findByPropsLazy("timestampInline");
|
||||
|
||||
export default function PronounsChatComponentWrapper({ message }: { message: Message; }) {
|
||||
// Don't bother fetching bot or system users
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { useAwaiter } from "../../../utils/misc";
|
||||
import { Settings } from "../../../Vencord";
|
||||
import { UserStore } from "../../../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import { useAwaiter } from "@utils/misc";
|
||||
import { UserStore } from "@webpack/common";
|
||||
|
||||
import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
|
||||
import { PronounMapping, UserProfilePronounsProps, UserProfileProps } from "../types";
|
||||
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../../utils/constants";
|
||||
import definePlugin, { OptionType } from "../../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
import PronounsAboutComponent from "./components/PronounsAboutComponent";
|
||||
import PronounsChatComponent from "./components/PronounsChatComponent";
|
||||
import PronounsProfileWrapper from "./components/PronounsProfileWrapper";
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { VENCORD_USER_AGENT } from "../../utils/constants";
|
||||
import { debounce } from "../../utils/debounce";
|
||||
import { Settings } from "../../Vencord";
|
||||
import { Settings } from "@api/settings";
|
||||
import { VENCORD_USER_AGENT } from "@utils/constants";
|
||||
import { debounce } from "@utils/debounce";
|
||||
|
||||
import { PronounsFormat } from ".";
|
||||
import { PronounCode, PronounMapping, PronounsResponse } from "./types";
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findLazy } from "@webpack";
|
||||
|
||||
const ComponentDispatch = lazyWebpack(m => m.emitter?._events?.INSERT_TEXT);
|
||||
const ComponentDispatch = findLazy(m => m.emitter?._events?.INSERT_TEXT);
|
||||
|
||||
export default definePlugin({
|
||||
name: "QuickMention",
|
||||
|
|
|
@ -16,16 +16,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, FluxDispatcher as Dispatcher, MessageStore, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { ChannelStore, FluxDispatcher as Dispatcher, MessageStore, SelectedChannelStore, UserStore } from "../webpack/common";
|
||||
|
||||
const Kangaroo = lazyWebpack(filters.byProps("jumpToMessage"));
|
||||
const Kangaroo = findByPropsLazy("jumpToMessage");
|
||||
|
||||
const isMac = navigator.platform.includes("Mac"); // bruh
|
||||
let replyIdx = -1;
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "../api/ServerList";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Button, FluxDispatcher, GuildChannelStore, GuildStore, React, ReadStateStore } from "../webpack/common";
|
||||
import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Button, FluxDispatcher, GuildChannelStore, GuildStore, React, ReadStateStore } from "@webpack/common";
|
||||
|
||||
function onClick() {
|
||||
const channels: Array<any> = [];
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Menu } from "../webpack/common";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Menu } from "@webpack/common";
|
||||
|
||||
const Engines = {
|
||||
Google: "https://www.google.com/searchbyimage?image_url=",
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "../../../Vencord";
|
||||
import { Settings } from "@api/settings";
|
||||
|
||||
import { Review } from "../entities/Review";
|
||||
import { authorize, showToast } from "./Utils";
|
||||
|
||||
|
|
|
@ -16,12 +16,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../../../utils/constants";
|
||||
import Logger from "../../../utils/Logger";
|
||||
import { openModal } from "../../../utils/modal";
|
||||
import { Settings } from "../../../Vencord";
|
||||
import { findByProps } from "../../../webpack";
|
||||
import { FluxDispatcher, React, SelectedChannelStore, Toasts, UserUtils } from "../../../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import Logger from "@utils/Logger";
|
||||
import { openModal } from "@utils/modal";
|
||||
import { findByProps } from "@webpack";
|
||||
import { FluxDispatcher, React, SelectedChannelStore, Toasts, UserUtils } from "@webpack/common";
|
||||
|
||||
import { Review } from "../entities/Review";
|
||||
|
||||
export async function openUserProfileModal(userId: string) {
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { classes, LazyComponent } from "../../../utils/misc";
|
||||
import { findByProps } from "../../../webpack";
|
||||
import { classes, LazyComponent } from "@utils/misc";
|
||||
import { findByProps } from "@webpack";
|
||||
|
||||
export default LazyComponent(() => {
|
||||
const { button, dangerous } = findByProps("button", "wrapper", "disabled");
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { classes, LazyComponent } from "../../../utils/misc";
|
||||
import { filters, findBulk } from "../../../webpack";
|
||||
import { Alerts, UserStore } from "../../../webpack/common";
|
||||
import { classes, LazyComponent } from "@utils/misc";
|
||||
import { filters, findBulk } from "@webpack";
|
||||
import { Alerts, UserStore } from "@webpack/common";
|
||||
|
||||
import { Review } from "../entities/Review";
|
||||
import { deleteReview, reportReview } from "../Utils/ReviewDBAPI";
|
||||
import { canDeleteReview, openUserProfileModal, showToast } from "../Utils/Utils";
|
||||
|
|
|
@ -16,14 +16,15 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { classes, useAwaiter } from "@utils/misc";
|
||||
import { findLazy } from "@webpack";
|
||||
import { Forms, Text, UserStore } from "@webpack/common";
|
||||
import type { KeyboardEvent } from "react";
|
||||
|
||||
import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
|
||||
import { Forms, Text, UserStore } from "../../../webpack/common";
|
||||
import { addReview, getReviews } from "../Utils/ReviewDBAPI";
|
||||
import ReviewComponent from "./ReviewComponent";
|
||||
|
||||
const Classes = lazyWebpack(m => typeof m.textarea === "string");
|
||||
const Classes = findLazy(m => typeof m.textarea === "string");
|
||||
|
||||
export default function ReviewsView({ userId }: { userId: string; }) {
|
||||
const [reviews, _, isLoading, refetch] = useAwaiter(() => getReviews(userId), []);
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Settings } from "@api/settings";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Button, UserStore } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import ErrorBoundary from "../../components/ErrorBoundary";
|
||||
import { Devs } from "../../utils/constants";
|
||||
import definePlugin, { OptionType } from "../../utils/types";
|
||||
import { Settings } from "../../Vencord";
|
||||
import { Button, UserStore } from "../../webpack/common";
|
||||
import ReviewsView from "./components/ReviewsView";
|
||||
import { getLastReviewID } from "./Utils/ReviewDBAPI";
|
||||
import { authorize, showToast } from "./Utils/Utils";
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import gitHash from "~git-hash";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { LazyComponent } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import { LazyComponent } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import gitHash from "~git-hash";
|
||||
|
||||
const SettingsComponent = LazyComponent(() => require("../components/VencordSettings").default);
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
*/
|
||||
|
||||
|
||||
import { Flex } from "../components/Flex";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "../utils/modal";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { waitFor } from "../webpack";
|
||||
import { Button, ChannelStore, Text } from "../webpack/common";
|
||||
import { Settings } from "@api/settings";
|
||||
import { Flex } from "@components/Flex";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { waitFor } from "@webpack";
|
||||
import { Button, ChannelStore, Text } from "@webpack/common";
|
||||
|
||||
const CONNECT = 1048576n;
|
||||
const VIEW_CHANNEL = 1024n;
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "SilentTyping",
|
||||
|
|
|
@ -16,13 +16,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import ErrorBoundary from "../../components/ErrorBoundary";
|
||||
import { Flex } from "../../components/Flex";
|
||||
import { Link } from "../../components/Link";
|
||||
import { debounce } from "../../utils/debounce";
|
||||
import { classes, LazyComponent, lazyWebpack } from "../../utils/misc";
|
||||
import { ContextMenu, FluxDispatcher, Forms, Menu, React } from "../../webpack/common";
|
||||
import { filters, find } from "../../webpack/webpack";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Flex } from "@components/Flex";
|
||||
import { Link } from "@components/Link";
|
||||
import { debounce } from "@utils/debounce";
|
||||
import { classes, LazyComponent } from "@utils/misc";
|
||||
import { filters, find, findByCodeLazy } from "@webpack";
|
||||
import { ContextMenu, FluxDispatcher, Forms, Menu, React } from "@webpack/common";
|
||||
|
||||
import { SpotifyStore, Track } from "./SpotifyStore";
|
||||
|
||||
const cl = (className: string) => `vc-spotify-${className}`;
|
||||
|
@ -40,7 +41,7 @@ const useStateFromStores: <T>(
|
|||
idk?: null,
|
||||
compare?: (old: T, newer: T) => boolean
|
||||
) => T
|
||||
= lazyWebpack(filters.byCode("useStateFromStores"));
|
||||
= findByCodeLazy("useStateFromStores");
|
||||
|
||||
function Svg(path: string, label: string) {
|
||||
return () => (
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import cssText from "~fileContent/spotifyStyles.css";
|
||||
import IpcEvents from "@utils/IpcEvents";
|
||||
import { proxyLazy } from "@utils/proxyLazy";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Flux, FluxDispatcher } from "@webpack/common";
|
||||
|
||||
import IpcEvents from "../../utils/IpcEvents";
|
||||
import { lazyWebpack } from "../../utils/misc";
|
||||
import { proxyLazy } from "../../utils/proxyLazy";
|
||||
import { filters } from "../../webpack";
|
||||
import { Flux, FluxDispatcher } from "../../webpack/common";
|
||||
import cssText from "~fileContent/spotifyStyles.css";
|
||||
|
||||
export interface Track {
|
||||
id: string;
|
||||
|
@ -78,8 +77,8 @@ export const SpotifyStore = proxyLazy(() => {
|
|||
// For some reason ts hates extends Flux.Store
|
||||
const { Store } = Flux;
|
||||
|
||||
const SpotifySocket = lazyWebpack(filters.byProps("getActiveSocketAndDevice"));
|
||||
const SpotifyAPI = lazyWebpack(filters.byProps("SpotifyAPIMarker"));
|
||||
const SpotifySocket = findByPropsLazy("getActiveSocketAndDevice");
|
||||
const SpotifyAPI = findByPropsLazy("SpotifyAPIMarker");
|
||||
|
||||
const API_BASE = "https://api.spotify.com/v1/me/player";
|
||||
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../../utils/constants";
|
||||
import definePlugin from "../../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
import { Player } from "./PlayerComponent";
|
||||
|
||||
export default definePlugin({
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { Settings } from "../Vencord";
|
||||
import { migratePluginSettings, Settings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
migratePluginSettings("SpotifyCrack", "Ify");
|
||||
export default definePlugin({
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { lazyWebpack } from "../utils/misc";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters } from "../webpack";
|
||||
import { FluxDispatcher } from "../webpack/common";
|
||||
import { ApplicationCommandInputType, sendBotMessage } from "@api/Commands";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { FluxDispatcher } from "@webpack/common";
|
||||
|
||||
interface Album {
|
||||
id: string;
|
||||
|
@ -54,9 +53,9 @@ interface Track {
|
|||
name: string;
|
||||
}
|
||||
|
||||
const Spotify = lazyWebpack(filters.byProps("getPlayerState"));
|
||||
const MessageCreator = lazyWebpack(filters.byProps("getSendMessageOptionsForReply", "sendMessage"));
|
||||
const PendingReplyStore = lazyWebpack(filters.byProps("getPendingReply"));
|
||||
const Spotify = findByPropsLazy("getPlayerState");
|
||||
const MessageCreator = findByPropsLazy("getSendMessageOptionsForReply", "sendMessage");
|
||||
const PendingReplyStore = findByPropsLazy("getPendingReply");
|
||||
|
||||
function sendMessage(channelId, message) {
|
||||
message = {
|
||||
|
|
|
@ -16,11 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import ErrorBoundary from "../../components/ErrorBoundary";
|
||||
import { Flex } from "../../components/Flex";
|
||||
import { lazyWebpack } from "../../utils/misc";
|
||||
import { Forms, React } from "../../webpack/common";
|
||||
import { filters } from "../../webpack/webpack";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Flex } from "@components/Flex";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Forms, React } from "@webpack/common";
|
||||
|
||||
interface AppStartPerformance {
|
||||
prefix: string;
|
||||
|
@ -46,7 +45,7 @@ interface Log {
|
|||
delta?: number;
|
||||
}
|
||||
|
||||
const AppStartPerformance = lazyWebpack(filters.byProps("markWithDelta", "markAndLog", "markAt")) as AppStartPerformance;
|
||||
const AppStartPerformance = findByPropsLazy("markWithDelta", "markAndLog", "markAt") as AppStartPerformance;
|
||||
|
||||
interface TimerItemProps extends Log {
|
||||
instance: {
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
*/
|
||||
|
||||
|
||||
import { Devs } from "../../utils/constants";
|
||||
import { LazyComponent } from "../../utils/misc";
|
||||
import definePlugin from "../../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { LazyComponent } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "StartupTimings",
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { addPreEditListener, addPreSendListener, MessageObject, removePreEditListener,removePreSendListener } from "../api/MessageEvents";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { addPreEditListener, addPreSendListener, MessageObject, removePreEditListener, removePreSendListener } from "@api/MessageEvents";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "Unindent",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
let ERROR_CODES: any;
|
||||
const CODES_URL =
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { findOption, RequiredMessageOption } from "../api/Commands";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { findOption, RequiredMessageOption } from "@api/Commands";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
const endings = [
|
||||
"owo", "UwU", ">w<", "^w^", "●w●", "☆w☆", "𝗨𝘄𝗨", "(ᗒᗨᗕ)", "(▰˘v˘▰)",
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { migratePluginSettings } from "../api/settings";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { SelectedChannelStore } from "../webpack/common";
|
||||
import { migratePluginSettings } from "@api/settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { SelectedChannelStore } from "@webpack/common";
|
||||
|
||||
const timers = {} as Record<string, {
|
||||
timeout?: NodeJS.Timeout;
|
||||
|
|
|
@ -16,19 +16,18 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "@utils/constants";
|
||||
import { LazyComponent } from "@utils/misc";
|
||||
import { ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { PluginDef } from "@utils/types";
|
||||
import { find, findByPropsLazy } from "@webpack";
|
||||
import { Menu } from "@webpack/common";
|
||||
import type { Guild } from "discord-types/general";
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import { LazyComponent, lazyWebpack } from "../utils/misc";
|
||||
import { ModalRoot, ModalSize, openModal } from "../utils/modal";
|
||||
import { PluginDef } from "../utils/types";
|
||||
import { filters, find } from "../webpack";
|
||||
import { Menu } from "../webpack/common";
|
||||
|
||||
const ImageModal = LazyComponent(() => find(m => m.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE")));
|
||||
const MaskedLink = LazyComponent(() => find(m => m.type?.toString().includes("MASKED_LINK)")));
|
||||
|
||||
const GuildBannerStore = lazyWebpack(filters.byProps("getGuildBannerURL"));
|
||||
const GuildBannerStore = findByPropsLazy("getGuildBannerURL");
|
||||
|
||||
const OPEN_URL = "Vencord.Plugins.plugins.ViewIcons.openImage(";
|
||||
export default new class ViewIcons implements PluginDef {
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { makeRange } from "../components/PluginSettings/components/SettingSliderComponent";
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin, { OptionType } from "../utils/types";
|
||||
import { makeRange } from "@components/PluginSettings/components/SettingSliderComponent";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "VolumeBooster",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "WebContextMenus",
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Devs } from "../utils/constants";
|
||||
import definePlugin from "../utils/types";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "Webhook Tags",
|
||||
|
|
|
@ -16,20 +16,19 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { LazyComponent, sleep, useForceUpdater } from "@utils/misc";
|
||||
import { Queue } from "@utils/Queue";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByCode, findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, FluxDispatcher, React, RestAPI, Tooltip } from "@webpack/common";
|
||||
import { ReactionEmoji, User } from "discord-types/general";
|
||||
|
||||
import ErrorBoundary from "../components/ErrorBoundary";
|
||||
import { Devs } from "../utils/constants";
|
||||
import { LazyComponent, lazyWebpack, sleep, useForceUpdater } from "../utils/misc";
|
||||
import { Queue } from "../utils/Queue";
|
||||
import definePlugin from "../utils/types";
|
||||
import { filters, findByCode } from "../webpack";
|
||||
import { ChannelStore, FluxDispatcher, React, RestAPI, Tooltip } from "../webpack/common";
|
||||
|
||||
const UserSummaryItem = LazyComponent(() => findByCode("defaultRenderUser", "showDefaultAvatarsForNullUsers"));
|
||||
const AvatarStyles = lazyWebpack(filters.byProps("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar"));
|
||||
const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
|
||||
|
||||
const ReactionStore = lazyWebpack(filters.byProps("getReactions"));
|
||||
const ReactionStore = findByPropsLazy("getReactions");
|
||||
|
||||
const queue = new Queue();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue