style: Sort imports
This commit is contained in:
parent
a7dbd73547
commit
61fd38d6d9
|
@ -2,7 +2,7 @@
|
||||||
"root": true,
|
"root": true,
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"ignorePatterns": ["dist", "browser"],
|
"ignorePatterns": ["dist", "browser"],
|
||||||
"plugins": ["header"],
|
"plugins": ["header", "simple-import-sort"],
|
||||||
"rules": {
|
"rules": {
|
||||||
// Since it's only been a month and Vencord has already been stolen
|
// Since it's only been a month and Vencord has already been stolen
|
||||||
// by random skids who rebranded it to "AlphaCord" and erased all license
|
// by random skids who rebranded it to "AlphaCord" and erased all license
|
||||||
|
@ -83,6 +83,9 @@
|
||||||
"no-useless-backreference": "error",
|
"no-useless-backreference": "error",
|
||||||
"use-isnan": "error",
|
"use-isnan": "error",
|
||||||
"prefer-const": "error",
|
"prefer-const": "error",
|
||||||
"prefer-spread": "error"
|
"prefer-spread": "error",
|
||||||
|
|
||||||
|
"simple-import-sort/imports": "error",
|
||||||
|
"simple-import-sort/exports": "error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,21 +16,22 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * as Plugins from "./plugins";
|
|
||||||
export * as Webpack from "./webpack";
|
|
||||||
export * as Api from "./api";
|
export * as Api from "./api";
|
||||||
export * as Updater from "./utils/updater";
|
export * as Plugins from "./plugins";
|
||||||
export * as QuickCss from "./utils/quickCss";
|
|
||||||
export * as Util from "./utils";
|
export * as Util from "./utils";
|
||||||
|
export * as QuickCss from "./utils/quickCss";
|
||||||
|
export * as Updater from "./utils/updater";
|
||||||
|
export * as Webpack from "./webpack";
|
||||||
|
|
||||||
import { popNotice, showNotice } from "./api/Notices";
|
import { popNotice, showNotice } from "./api/Notices";
|
||||||
import { Settings, PlainSettings } from "./api/settings";
|
import { PlainSettings,Settings } from "./api/settings";
|
||||||
import { startAllPlugins } from "./plugins";
|
import { startAllPlugins } from "./plugins";
|
||||||
|
|
||||||
export { Settings, PlainSettings };
|
export { PlainSettings,Settings };
|
||||||
|
|
||||||
import "./webpack/patchWebpack";
|
import "./webpack/patchWebpack";
|
||||||
import "./utils/quickCss";
|
import "./utils/quickCss";
|
||||||
|
|
||||||
import { checkForUpdates, UpdateLogger } from "./utils/updater";
|
import { checkForUpdates, UpdateLogger } from "./utils/updater";
|
||||||
import { onceReady } from "./webpack";
|
import { onceReady } from "./webpack";
|
||||||
import { Router } from "./webpack/common";
|
import { Router } from "./webpack/common";
|
||||||
|
|
|
@ -16,9 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import IPC_EVENTS from "./utils/IpcEvents";
|
|
||||||
import { IpcRenderer, ipcRenderer } from "electron";
|
import { IpcRenderer, ipcRenderer } from "electron";
|
||||||
|
|
||||||
|
import IPC_EVENTS from "./utils/IpcEvents";
|
||||||
|
|
||||||
function assertEventAllowed(event: string) {
|
function assertEventAllowed(event: string) {
|
||||||
if (!(event in IPC_EVENTS)) throw new Error(`Event ${event} not allowed.`);
|
if (!(event in IPC_EVENTS)) throw new Error(`Event ${event} not allowed.`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { filters, waitFor } from "../../webpack";
|
|
||||||
import type { PartialDeep } from "type-fest";
|
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
|
import type { PartialDeep } from "type-fest";
|
||||||
|
|
||||||
import { lazyWebpack, mergeDefaults } from "../../utils/misc";
|
import { lazyWebpack, mergeDefaults } from "../../utils/misc";
|
||||||
|
import { filters, waitFor } from "../../webpack";
|
||||||
import { Argument } from "./types";
|
import { Argument } from "./types";
|
||||||
|
|
||||||
const createBotMessage = lazyWebpack(filters.byCode('username:"Clyde"'));
|
const createBotMessage = lazyWebpack(filters.byCode('username:"Clyde"'));
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
import { makeCodeblock } from "../../utils/misc";
|
import { makeCodeblock } from "../../utils/misc";
|
||||||
import { generateId, sendBotMessage } from "./commandHelpers";
|
import { generateId, sendBotMessage } from "./commandHelpers";
|
||||||
import { ApplicationCommandInputType, ApplicationCommandType, Argument, Command, CommandContext, Option, CommandReturnValue } from "./types";
|
import { ApplicationCommandInputType, ApplicationCommandType, Argument, Command, CommandContext, CommandReturnValue,Option } from "./types";
|
||||||
|
|
||||||
export * from "./types";
|
|
||||||
export * from "./commandHelpers";
|
export * from "./commandHelpers";
|
||||||
|
export * from "./types";
|
||||||
|
|
||||||
export let BUILT_IN: Command[];
|
export let BUILT_IN: Command[];
|
||||||
export const commands = {} as Record<string, Command>;
|
export const commands = {} as Record<string, Command>;
|
||||||
|
|
|
@ -16,7 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Message, Channel } from "discord-types/general";
|
import type { Channel,Message } from "discord-types/general";
|
||||||
|
|
||||||
import Logger from "../utils/logger";
|
import Logger from "../utils/logger";
|
||||||
|
|
||||||
const MessageEventsLogger = new Logger("MessageEvents", "#e5c890");
|
const MessageEventsLogger = new Logger("MessageEvents", "#e5c890");
|
||||||
|
|
|
@ -16,11 +16,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as $MessageEventsAPI from "./MessageEvents";
|
|
||||||
import * as $Notices from "./Notices";
|
|
||||||
import * as $Commands from "./Commands";
|
import * as $Commands from "./Commands";
|
||||||
import * as $DataStore from "./DataStore";
|
import * as $DataStore from "./DataStore";
|
||||||
import * as $MessageAccessories from "./MessageAccessories";
|
import * as $MessageAccessories from "./MessageAccessories";
|
||||||
|
import * as $MessageEventsAPI from "./MessageEvents";
|
||||||
|
import * as $Notices from "./Notices";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An API allowing you to listen to Message Clicks or run your own logic
|
* An API allowing you to listen to Message Clicks or run your own logic
|
||||||
|
@ -58,4 +58,4 @@ const DataStore = $DataStore;
|
||||||
*/
|
*/
|
||||||
const MessageAccessories = $MessageAccessories;
|
const MessageAccessories = $MessageAccessories;
|
||||||
|
|
||||||
export { DataStore, MessageAccessories, MessageEvents, Notices, Commands };
|
export { Commands,DataStore, MessageAccessories, MessageEvents, Notices };
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import plugins from "plugins";
|
import plugins from "plugins";
|
||||||
|
|
||||||
import IpcEvents from "../utils/IpcEvents";
|
import IpcEvents from "../utils/IpcEvents";
|
||||||
import { React } from "../webpack/common";
|
|
||||||
import { mergeDefaults } from "../utils/misc";
|
import { mergeDefaults } from "../utils/misc";
|
||||||
import { OptionType } from "../utils/types";
|
import { OptionType } from "../utils/types";
|
||||||
|
import { React } from "../webpack/common";
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
notifyAboutUpdates: boolean;
|
notifyAboutUpdates: boolean;
|
||||||
|
|
|
@ -16,11 +16,12 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import monacoHtml from "@fileContent/monacoWin.html";
|
||||||
|
|
||||||
import { IpcEvents } from "../utils";
|
import { IpcEvents } from "../utils";
|
||||||
import { debounce } from "../utils/debounce";
|
import { debounce } from "../utils/debounce";
|
||||||
import { find } from "../webpack/webpack";
|
|
||||||
import monacoHtml from "@fileContent/monacoWin.html";
|
|
||||||
import { Queue } from "../utils/Queue";
|
import { Queue } from "../utils/Queue";
|
||||||
|
import { find } from "../webpack/webpack";
|
||||||
|
|
||||||
const queue = new Queue();
|
const queue = new Queue();
|
||||||
const setCss = debounce((css: string) => {
|
const setCss = debounce((css: string) => {
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ISettingElementProps } from ".";
|
|
||||||
import { PluginOptionBoolean } from "../../../utils/types";
|
import { PluginOptionBoolean } from "../../../utils/types";
|
||||||
import { Forms, React, Select } from "../../../webpack/common";
|
import { Forms, React, Select } from "../../../webpack/common";
|
||||||
|
import { ISettingElementProps } from ".";
|
||||||
|
|
||||||
export function SettingBooleanComponent({ option, pluginSettings, id, onChange, onError }: ISettingElementProps<PluginOptionBoolean>) {
|
export function SettingBooleanComponent({ option, pluginSettings, id, onChange, onError }: ISettingElementProps<PluginOptionBoolean>) {
|
||||||
const def = pluginSettings[id] ?? option.default;
|
const def = pluginSettings[id] ?? option.default;
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ISettingElementProps } from ".";
|
|
||||||
import { OptionType, PluginOptionNumber } from "../../../utils/types";
|
import { OptionType, PluginOptionNumber } from "../../../utils/types";
|
||||||
import { Forms, React, TextInput } from "../../../webpack/common";
|
import { Forms, React, TextInput } from "../../../webpack/common";
|
||||||
|
import { ISettingElementProps } from ".";
|
||||||
|
|
||||||
const MAX_SAFE_NUMBER = BigInt(Number.MAX_SAFE_INTEGER);
|
const MAX_SAFE_NUMBER = BigInt(Number.MAX_SAFE_INTEGER);
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ISettingElementProps } from ".";
|
|
||||||
import { PluginOptionSelect } from "../../../utils/types";
|
import { PluginOptionSelect } from "../../../utils/types";
|
||||||
import { Forms, React, Select } from "../../../webpack/common";
|
import { Forms, React, Select } from "../../../webpack/common";
|
||||||
|
import { ISettingElementProps } from ".";
|
||||||
|
|
||||||
export function SettingSelectComponent({ option, pluginSettings, onChange, onError, id }: ISettingElementProps<PluginOptionSelect>) {
|
export function SettingSelectComponent({ option, pluginSettings, onChange, onError, id }: ISettingElementProps<PluginOptionSelect>) {
|
||||||
const def = pluginSettings[id] ?? option.options?.find(o => o.default)?.value;
|
const def = pluginSettings[id] ?? option.options?.find(o => o.default)?.value;
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ISettingElementProps } from ".";
|
|
||||||
import { PluginOptionSlider } from "../../../utils/types";
|
import { PluginOptionSlider } from "../../../utils/types";
|
||||||
import { Forms, React, Slider } from "../../../webpack/common";
|
import { Forms, React, Slider } from "../../../webpack/common";
|
||||||
|
import { ISettingElementProps } from ".";
|
||||||
|
|
||||||
export function makeRange(start: number, end: number, step = 1) {
|
export function makeRange(start: number, end: number, step = 1) {
|
||||||
const ranges: number[] = [];
|
const ranges: number[] = [];
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ISettingElementProps } from ".";
|
|
||||||
import { PluginOptionString } from "../../../utils/types";
|
import { PluginOptionString } from "../../../utils/types";
|
||||||
import { Forms, React, TextInput } from "../../../webpack/common";
|
import { Forms, React, TextInput } from "../../../webpack/common";
|
||||||
|
import { ISettingElementProps } from ".";
|
||||||
|
|
||||||
export function SettingInputComponent({ option, pluginSettings, id, onChange, onError }: ISettingElementProps<PluginOptionString>) {
|
export function SettingInputComponent({ option, pluginSettings, id, onChange, onError }: ISettingElementProps<PluginOptionString>) {
|
||||||
const [state, setState] = React.useState(pluginSettings[id] ?? option.default ?? null);
|
const [state, setState] = React.useState(pluginSettings[id] ?? option.default ?? null);
|
||||||
|
|
|
@ -32,5 +32,5 @@ export interface ISettingElementProps<T extends PluginOptionBase> {
|
||||||
export * from "./SettingBooleanComponent";
|
export * from "./SettingBooleanComponent";
|
||||||
export * from "./SettingNumericComponent";
|
export * from "./SettingNumericComponent";
|
||||||
export * from "./SettingSelectComponent";
|
export * from "./SettingSelectComponent";
|
||||||
export * from "./SettingTextComponent";
|
|
||||||
export * from "./SettingSliderComponent";
|
export * from "./SettingSliderComponent";
|
||||||
|
export * from "./SettingTextComponent";
|
||||||
|
|
|
@ -17,13 +17,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import gitHash from "git-hash";
|
import gitHash from "git-hash";
|
||||||
import { changes, checkForUpdates, getRepo, rebuild, update, UpdateLogger, updateError, isOutdated, isNewer } from "../utils/updater";
|
|
||||||
import { React, Forms, Button, Margins, Alerts, Card, Parser, Toasts } from "../webpack/common";
|
|
||||||
import { Flex } from "./Flex";
|
|
||||||
import { classes, useAwaiter } from "../utils/misc";
|
import { classes, useAwaiter } from "../utils/misc";
|
||||||
import { Link } from "./Link";
|
import { changes, checkForUpdates, getRepo, isNewer,isOutdated, rebuild, update, updateError, UpdateLogger } from "../utils/updater";
|
||||||
|
import { Alerts, Button, Card, Forms, Margins, Parser, React, Toasts } from "../webpack/common";
|
||||||
import ErrorBoundary from "./ErrorBoundary";
|
import ErrorBoundary from "./ErrorBoundary";
|
||||||
import { ErrorCard } from "./ErrorCard";
|
import { ErrorCard } from "./ErrorCard";
|
||||||
|
import { Flex } from "./Flex";
|
||||||
|
import { Link } from "./Link";
|
||||||
|
|
||||||
function withDispatcher(dispatcher: React.Dispatch<React.SetStateAction<boolean>>, action: () => any) {
|
function withDispatcher(dispatcher: React.Dispatch<React.SetStateAction<boolean>>, action: () => any) {
|
||||||
return async () => {
|
return async () => {
|
||||||
|
|
|
@ -16,6 +16,6 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export { default as Settings } from "./Settings";
|
|
||||||
export { default as PluginSettings } from "./PluginSettings";
|
export { default as PluginSettings } from "./PluginSettings";
|
||||||
|
export { default as Settings } from "./Settings";
|
||||||
export { default as Updater } from "./Updater";
|
export { default as Updater } from "./Updater";
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { join } from "path";
|
|
||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
|
import { join } from "path";
|
||||||
|
|
||||||
export const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (
|
export const DATA_DIR = process.env.VENCORD_USER_DATA_DIR ?? (
|
||||||
process.env.DISCORD_USER_DATA_DIR
|
process.env.DISCORD_USER_DATA_DIR
|
||||||
|
|
|
@ -16,13 +16,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import https from "https";
|
|
||||||
import { mkdir, rm, writeFile, access } from "fs/promises";
|
|
||||||
import { constants as fsConstants } from "fs";
|
|
||||||
import { join } from "path";
|
|
||||||
import { DATA_DIR } from "./constants";
|
|
||||||
import { unzip } from "fflate";
|
|
||||||
import { session } from "electron";
|
import { session } from "electron";
|
||||||
|
import { unzip } from "fflate";
|
||||||
|
import { constants as fsConstants } from "fs";
|
||||||
|
import { access,mkdir, rm, writeFile } from "fs/promises";
|
||||||
|
import https from "https";
|
||||||
|
import { join } from "path";
|
||||||
|
|
||||||
|
import { DATA_DIR } from "./constants";
|
||||||
import { crxToZip } from "./crxToZip";
|
import { crxToZip } from "./crxToZip";
|
||||||
|
|
||||||
const extensionCacheDir = join(DATA_DIR, "ExtensionCache");
|
const extensionCacheDir = join(DATA_DIR, "ExtensionCache");
|
||||||
|
|
|
@ -16,17 +16,18 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import "./updater";
|
||||||
|
|
||||||
|
import monacoHtml from "@fileContent/../components/monacoWin.html;base64";
|
||||||
import { app, BrowserWindow, desktopCapturer, ipcMain, shell } from "electron";
|
import { app, BrowserWindow, desktopCapturer, ipcMain, shell } from "electron";
|
||||||
import { mkdirSync, readFileSync, watch } from "fs";
|
import { mkdirSync, readFileSync, watch } from "fs";
|
||||||
import { open, readFile, writeFile } from "fs/promises";
|
import { open, readFile, writeFile } from "fs/promises";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
|
|
||||||
import { debounce } from "../utils/debounce";
|
import { debounce } from "../utils/debounce";
|
||||||
import IpcEvents from "../utils/IpcEvents";
|
import IpcEvents from "../utils/IpcEvents";
|
||||||
import monacoHtml from "@fileContent/../components/monacoWin.html;base64";
|
|
||||||
|
|
||||||
import "./updater";
|
|
||||||
import { Queue } from "../utils/Queue";
|
import { Queue } from "../utils/Queue";
|
||||||
import { QUICKCSS_PATH, ALLOWED_PROTOCOLS, SETTINGS_DIR, SETTINGS_FILE } from "./constants";
|
import { ALLOWED_PROTOCOLS, QUICKCSS_PATH, SETTINGS_DIR, SETTINGS_FILE } from "./constants";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ipcMain } from "electron";
|
|
||||||
import { promisify } from "util";
|
|
||||||
import IpcEvents from "../utils/IpcEvents";
|
|
||||||
import { execFile as cpExecFile } from "child_process";
|
import { execFile as cpExecFile } from "child_process";
|
||||||
import { join } from "path";
|
|
||||||
import { createReadStream } from "fs";
|
|
||||||
import { createHash } from "crypto";
|
import { createHash } from "crypto";
|
||||||
|
import { ipcMain } from "electron";
|
||||||
|
import { createReadStream } from "fs";
|
||||||
|
import { join } from "path";
|
||||||
|
import { promisify } from "util";
|
||||||
|
|
||||||
|
import IpcEvents from "../utils/IpcEvents";
|
||||||
|
|
||||||
const VENCORD_SRC_DIR = join(__dirname, "..");
|
const VENCORD_SRC_DIR = join(__dirname, "..");
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { app, autoUpdater } from "electron";
|
import { app, autoUpdater } from "electron";
|
||||||
import { dirname, basename, join } from "path";
|
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "fs";
|
||||||
import { readdirSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
import { basename, dirname, join } from "path";
|
||||||
|
|
||||||
const { setAppUserModelId } = app;
|
const { setAppUserModelId } = app;
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,12 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import electron, { app, BrowserWindowConstructorOptions } from "electron";
|
import electron, { app, BrowserWindowConstructorOptions } from "electron";
|
||||||
|
import { readFileSync } from "fs";
|
||||||
import { dirname, join } from "path";
|
import { dirname, join } from "path";
|
||||||
|
|
||||||
import { initIpc } from "./ipcMain";
|
import { initIpc } from "./ipcMain";
|
||||||
import { installExt } from "./ipcMain/extensions";
|
import { installExt } from "./ipcMain/extensions";
|
||||||
import { readSettings } from "./ipcMain/index";
|
import { readSettings } from "./ipcMain/index";
|
||||||
import { readFileSync } from "fs";
|
|
||||||
|
|
||||||
console.log("[Vencord] Starting up...");
|
console.log("[Vencord] Starting up...");
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "STFU",
|
name: "STFU",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin, { OptionType } from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin, { OptionType } from "../utils/types";
|
||||||
import { Settings } from "../Vencord";
|
import { Settings } from "../Vencord";
|
||||||
|
|
||||||
enum Methods {
|
enum Methods {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "CommandsAPI",
|
name: "CommandsAPI",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin, { OptionType } from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin, { OptionType } from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "BANger",
|
name: "BANger",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "BetterUploadButton",
|
name: "BetterUploadButton",
|
||||||
|
|
|
@ -16,15 +16,15 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { defaultRules } from "./defaultRules";
|
|
||||||
import {
|
import {
|
||||||
addPreSendListener,
|
|
||||||
addPreEditListener,
|
addPreEditListener,
|
||||||
|
addPreSendListener,
|
||||||
MessageObject,
|
MessageObject,
|
||||||
removePreSendListener,
|
|
||||||
removePreEditListener,
|
removePreEditListener,
|
||||||
|
removePreSendListener,
|
||||||
} from "../../api/MessageEvents";
|
} from "../../api/MessageEvents";
|
||||||
import definePlugin from "../../utils/types";
|
import definePlugin from "../../utils/types";
|
||||||
|
import { defaultRules } from "./defaultRules";
|
||||||
|
|
||||||
// From lodash
|
// From lodash
|
||||||
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
const re = /https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g;
|
const re = /https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g;
|
||||||
|
|
||||||
|
|
|
@ -16,13 +16,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
|
||||||
import { FluxDispatcher as Dispatcher, ChannelStore, SelectedChannelStore, UserStore } from "../webpack/common";
|
|
||||||
import { filters } from "../webpack";
|
|
||||||
import { lazyWebpack } from "../utils/misc";
|
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
|
|
||||||
|
import { Devs } from "../utils/constants";
|
||||||
|
import { lazyWebpack } from "../utils/misc";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
import { filters } from "../webpack";
|
||||||
|
import { ChannelStore, FluxDispatcher as Dispatcher, SelectedChannelStore, UserStore } from "../webpack/common";
|
||||||
|
|
||||||
const MessageStore = lazyWebpack(filters.byProps(["getRawMessages"]));
|
const MessageStore = lazyWebpack(filters.byProps(["getRawMessages"]));
|
||||||
|
|
||||||
const isMac = navigator.platform.includes("Mac"); // bruh
|
const isMac = navigator.platform.includes("Mac"); // bruh
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
import { ApplicationCommandInputType, findOption, OptionalMessageOption, RequiredMessageOption,sendBotMessage } from "../api/Commands";
|
||||||
import { ApplicationCommandInputType, OptionalMessageOption, sendBotMessage, findOption, RequiredMessageOption } from "../api/Commands";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
|
|
||||||
function mock(input: string): string {
|
function mock(input: string): string {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MuteNewGuild",
|
name: "MuteNewGuild",
|
||||||
|
|
|
@ -16,12 +16,12 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { addPreSendListener, addPreEditListener, removePreSendListener, removePreEditListener } from "../api/MessageEvents";
|
import { addPreEditListener, addPreSendListener, removePreEditListener,removePreSendListener } from "../api/MessageEvents";
|
||||||
import { findByProps } from "../webpack";
|
|
||||||
import definePlugin, { OptionType } from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import { UserStore } from "../webpack/common";
|
import definePlugin, { OptionType } from "../utils/types";
|
||||||
import { Settings } from "../Vencord";
|
import { Settings } from "../Vencord";
|
||||||
|
import { findByProps } from "../webpack";
|
||||||
|
import { UserStore } from "../webpack/common";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NitroBypass",
|
name: "NitroBypass",
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
import { addPreSendListener, MessageObject, removePreSendListener } from "../api/MessageEvents";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NoCanaryMessageLinks",
|
name: "NoCanaryMessageLinks",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "No F1",
|
name: "No F1",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "No RPC",
|
name: "No RPC",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NoTrack",
|
name: "NoTrack",
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { ApplicationCommandOptionType, findOption, ApplicationCommandInputType, Argument, CommandContext } from "../api/Commands";
|
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext,findOption } from "../api/Commands";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import { lazyWebpack,makeLazy } from "../utils/misc";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
import { makeLazy, lazyWebpack } from "../utils/misc";
|
|
||||||
import { filters } from "../webpack";
|
import { filters } from "../webpack";
|
||||||
|
|
||||||
const DRAFT_TYPE = 0;
|
const DRAFT_TYPE = 0;
|
||||||
|
|
|
@ -17,12 +17,13 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
import { fetchPronouns, formatPronouns } from "../utils";
|
|
||||||
import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
|
import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
|
||||||
import { PronounMapping } from "../types";
|
import { Settings } from "../../../Vencord";
|
||||||
import { filters } from "../../../webpack";
|
import { filters } from "../../../webpack";
|
||||||
import { UserStore } from "../../../webpack/common";
|
import { UserStore } from "../../../webpack/common";
|
||||||
import { Settings } from "../../../Vencord";
|
import { PronounMapping } from "../types";
|
||||||
|
import { fetchPronouns, formatPronouns } from "../utils";
|
||||||
|
|
||||||
const styles: Record<string, string> = lazyWebpack(filters.byProps(["timestampInline"]));
|
const styles: Record<string, string> = lazyWebpack(filters.byProps(["timestampInline"]));
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { UserStore } from "../../../webpack/common";
|
import { classes,useAwaiter } from "../../../utils";
|
||||||
import { Settings } from "../../../Vencord";
|
import { Settings } from "../../../Vencord";
|
||||||
|
import { UserStore } from "../../../webpack/common";
|
||||||
import { PronounMapping, UserProfileProps } from "../types";
|
import { PronounMapping, UserProfileProps } from "../types";
|
||||||
import { useAwaiter, classes } from "../../../utils";
|
|
||||||
import { fetchPronouns, formatPronouns } from "../utils";
|
import { fetchPronouns, formatPronouns } from "../utils";
|
||||||
|
|
||||||
export default function PronounsProfileWrapper(props: UserProfileProps, pronounsComponent: JSX.Element) {
|
export default function PronounsProfileWrapper(props: UserProfileProps, pronounsComponent: JSX.Element) {
|
||||||
|
|
|
@ -17,9 +17,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import gitHash from "git-hash";
|
import gitHash from "git-hash";
|
||||||
import { PronounsFormat } from ".";
|
|
||||||
import { debounce } from "../../utils";
|
import { debounce } from "../../utils";
|
||||||
import { Settings } from "../../Vencord";
|
import { Settings } from "../../Vencord";
|
||||||
|
import { PronounsFormat } from ".";
|
||||||
import { PronounCode, PronounMapping, PronounsResponse } from "./types";
|
import { PronounCode, PronounMapping, PronounsResponse } from "./types";
|
||||||
|
|
||||||
// A map of cached pronouns so the same request isn't sent twice
|
// A map of cached pronouns so the same request isn't sent twice
|
||||||
|
|
|
@ -16,13 +16,14 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { lazyWebpack } from "../utils";
|
|
||||||
import { filters } from "../webpack";
|
|
||||||
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
|
||||||
import { Devs } from "../utils/constants";
|
|
||||||
import { PartialDeep } from "type-fest";
|
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
|
import { PartialDeep } from "type-fest";
|
||||||
|
|
||||||
|
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
||||||
|
import { lazyWebpack } from "../utils";
|
||||||
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
import { filters } from "../webpack";
|
||||||
import { FluxDispatcher } from "../webpack/common";
|
import { FluxDispatcher } from "../webpack/common";
|
||||||
|
|
||||||
interface Album {
|
interface Album {
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "SilentTyping",
|
name: "SilentTyping",
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
import { addPreEditListener, addPreSendListener, MessageObject, removePreEditListener,removePreSendListener } from "../api/MessageEvents";
|
||||||
import { addPreSendListener, addPreEditListener, MessageObject, removePreSendListener, removePreEditListener } from "../api/MessageEvents";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "Unindent",
|
name: "Unindent",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
let ERROR_CODES: any;
|
let ERROR_CODES: any;
|
||||||
const CODES_URL =
|
const CODES_URL =
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { findOption, RequiredMessageOption } from "../api/Commands";
|
import { findOption, RequiredMessageOption } from "../api/Commands";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
const endings = [
|
const endings = [
|
||||||
"owo", "UwU", ">w<", "^w^", "●w●", "☆w☆", "𝗨𝘄𝗨", "(ᗒᗨᗕ)", "(▰˘v˘▰)",
|
"owo", "UwU", ">w<", "^w^", "●w●", "☆w☆", "𝗨𝘄𝗨", "(ᗒᗨᗕ)", "(▰˘v˘▰)",
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
const timers = {} as Record<string, {
|
const timers = {} as Record<string, {
|
||||||
timeout?: NodeJS.Timeout;
|
timeout?: NodeJS.Timeout;
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { lazyWebpack, makeLazy } from "../utils/misc";
|
import { lazyWebpack, makeLazy } from "../utils/misc";
|
||||||
import { ModalRoot, ModalSize, openModal } from "../utils/modal";
|
import { ModalRoot, ModalSize, openModal } from "../utils/modal";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
import { find } from "../webpack";
|
import { find } from "../webpack";
|
||||||
import { React } from "../webpack/common";
|
import { React } from "../webpack/common";
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import definePlugin from "../utils/types";
|
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "Webhook Tags",
|
name: "Webhook Tags",
|
||||||
|
|
|
@ -16,12 +16,13 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import electron, { contextBridge, webFrame, ipcRenderer } from "electron";
|
import electron, { contextBridge, ipcRenderer, webFrame } from "electron";
|
||||||
import { readFileSync } from "fs";
|
import { readFileSync } from "fs";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import VencordNative from "./VencordNative";
|
|
||||||
import IpcEvents from "./utils/IpcEvents";
|
|
||||||
import { debounce } from "./utils/debounce";
|
import { debounce } from "./utils/debounce";
|
||||||
|
import IpcEvents from "./utils/IpcEvents";
|
||||||
|
import VencordNative from "./VencordNative";
|
||||||
|
|
||||||
if (electron.desktopCapturer === void 0) {
|
if (electron.desktopCapturer === void 0) {
|
||||||
// Fix for desktopCapturer being main only in Electron 17+
|
// Fix for desktopCapturer being main only in Electron 17+
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Guild } from "discord-types/general";
|
import { Guild } from "discord-types/general";
|
||||||
import { ChannelStore, SelectedChannelStore, GuildStore } from "../webpack/common";
|
|
||||||
|
import { ChannelStore, GuildStore,SelectedChannelStore } from "../webpack/common";
|
||||||
|
|
||||||
export function getCurrentChannel() {
|
export function getCurrentChannel() {
|
||||||
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
|
return ChannelStore.getChannel(SelectedChannelStore.getChannelId());
|
||||||
|
|
|
@ -17,13 +17,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./ChangeList";
|
export * from "./ChangeList";
|
||||||
|
export * as Constants from "./constants";
|
||||||
export * from "./debounce";
|
export * from "./debounce";
|
||||||
export * from "./misc";
|
export * as Discord from "./discord";
|
||||||
export * from "./proxyLazy";
|
|
||||||
|
|
||||||
export { default as IpcEvents } from "./IpcEvents";
|
export { default as IpcEvents } from "./IpcEvents";
|
||||||
export { default as Logger } from "./logger";
|
export { default as Logger } from "./logger";
|
||||||
|
export * from "./misc";
|
||||||
export * as Constants from "./constants";
|
|
||||||
export * as Discord from "./discord";
|
|
||||||
export * as Modals from "./modal";
|
export * as Modals from "./modal";
|
||||||
|
export * from "./proxyLazy";
|
||||||
|
|
|
@ -16,10 +16,11 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import gitHash from "git-hash";
|
||||||
|
|
||||||
import IpcEvents from "./IpcEvents";
|
import IpcEvents from "./IpcEvents";
|
||||||
import Logger from "./logger";
|
import Logger from "./logger";
|
||||||
import { IpcRes } from "./types";
|
import { IpcRes } from "./types";
|
||||||
import gitHash from "git-hash";
|
|
||||||
|
|
||||||
export const UpdateLogger = new Logger("Updater", "white");
|
export const UpdateLogger = new Logger("Updater", "white");
|
||||||
export let isOutdated = false;
|
export let isOutdated = false;
|
||||||
|
|
|
@ -16,14 +16,13 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type Components from "discord-types/components";
|
||||||
import { User } from "discord-types/general";
|
import { User } from "discord-types/general";
|
||||||
|
import type Other from "discord-types/other";
|
||||||
|
import type Stores from "discord-types/stores";
|
||||||
|
|
||||||
import { lazyWebpack } from "../utils/misc";
|
import { lazyWebpack } from "../utils/misc";
|
||||||
import { _resolveReady, filters, waitFor, mapMangledModuleLazy } from "./webpack";
|
import { _resolveReady, filters, mapMangledModuleLazy,waitFor } from "./webpack";
|
||||||
|
|
||||||
import type Components from "discord-types/components";
|
|
||||||
import type Stores from "discord-types/stores";
|
|
||||||
import type Other from "discord-types/other";
|
|
||||||
export const Margins = lazyWebpack(filters.byProps(["marginTop20"]));
|
export const Margins = lazyWebpack(filters.byProps(["marginTop20"]));
|
||||||
|
|
||||||
export let FluxDispatcher: Other.FluxDispatcher;
|
export let FluxDispatcher: Other.FluxDispatcher;
|
||||||
|
|
|
@ -16,5 +16,5 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./webpack";
|
|
||||||
export * as Common from "./common";
|
export * as Common from "./common";
|
||||||
|
export * from "./webpack";
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { WebpackInstance } from "discord-types/other";
|
import type { WebpackInstance } from "discord-types/other";
|
||||||
|
|
||||||
import { proxyLazy } from "../utils/proxyLazy";
|
import { proxyLazy } from "../utils/proxyLazy";
|
||||||
|
|
||||||
export let _resolveReady: () => void;
|
export let _resolveReady: () => void;
|
||||||
|
|
Loading…
Reference in a new issue