Less confusing plugin names (bulk plugin rename) (#214)
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
This commit is contained in:
parent
a96f8a89f3
commit
82e444e196
@ -19,10 +19,12 @@
|
|||||||
import plugins from "~plugins";
|
import plugins from "~plugins";
|
||||||
|
|
||||||
import IpcEvents from "../utils/IpcEvents";
|
import IpcEvents from "../utils/IpcEvents";
|
||||||
|
import Logger from "../utils/Logger";
|
||||||
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";
|
import { React } from "../webpack/common";
|
||||||
|
|
||||||
|
const logger = new Logger("Settings");
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
notifyAboutUpdates: boolean;
|
notifyAboutUpdates: boolean;
|
||||||
useQuickCss: boolean;
|
useQuickCss: boolean;
|
||||||
@ -169,3 +171,21 @@ export function addSettingsListener(path: string, onUpdate: (newValue: any, path
|
|||||||
(onUpdate as SubscriptionCallback)._path = path;
|
(onUpdate as SubscriptionCallback)._path = path;
|
||||||
subscriptions.add(onUpdate);
|
subscriptions.add(onUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function migratePluginSettings(name: string, ...oldNames: string[]) {
|
||||||
|
const { plugins } = settings;
|
||||||
|
if (name in plugins) return;
|
||||||
|
|
||||||
|
for (const oldName of oldNames) {
|
||||||
|
if (oldName in plugins) {
|
||||||
|
logger.info(`Migrating settings from old name ${oldName} to ${name}`);
|
||||||
|
plugins[name] = plugins[oldName];
|
||||||
|
delete plugins[oldName];
|
||||||
|
VencordNative.ipc.invoke(
|
||||||
|
IpcEvents.SET_SETTINGS,
|
||||||
|
JSON.stringify(settings, null, 4)
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* 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 { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
@ -33,8 +34,9 @@ const nameMap = {
|
|||||||
customitem: "MenuItem",
|
customitem: "MenuItem",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
migratePluginSettings("MenuItemDeobfuscatorAPI", "MenuItemDeobfuscatorApi");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MenuItemDeobfuscatorApi",
|
name: "MenuItemDeobfuscatorAPI",
|
||||||
description: "Deobfuscates Discord's Menu Item module",
|
description: "Deobfuscates Discord's Menu Item module",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
patches: [
|
patches: [
|
||||||
|
@ -16,11 +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 { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
|
migratePluginSettings("NoticesAPI", "NoticesApi");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NoticesApi",
|
name: "NoticesAPI",
|
||||||
description: "Fixes notices being automatically dismissed",
|
description: "Fixes notices being automatically dismissed",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -21,8 +21,9 @@ import {
|
|||||||
addPreSendListener,
|
addPreSendListener,
|
||||||
MessageObject,
|
MessageObject,
|
||||||
removePreEditListener,
|
removePreEditListener,
|
||||||
removePreSendListener,
|
removePreSendListener
|
||||||
} from "../../api/MessageEvents";
|
} from "../../api/MessageEvents";
|
||||||
|
import { migratePluginSettings } from "../../api/settings";
|
||||||
import { Devs } from "../../utils/constants";
|
import { Devs } from "../../utils/constants";
|
||||||
import definePlugin from "../../utils/types";
|
import definePlugin from "../../utils/types";
|
||||||
import { defaultRules } from "./defaultRules";
|
import { defaultRules } from "./defaultRules";
|
||||||
@ -31,8 +32,9 @@ import { defaultRules } from "./defaultRules";
|
|||||||
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
||||||
const reHasRegExpChar = RegExp(reRegExpChar.source);
|
const reHasRegExpChar = RegExp(reRegExpChar.source);
|
||||||
|
|
||||||
|
migratePluginSettings("ClearURLs", "clearURLs");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "clearURLs",
|
name: "ClearURLs",
|
||||||
description: "Removes tracking garbage from URLs",
|
description: "Removes tracking garbage from URLs",
|
||||||
authors: [Devs.adryd],
|
authors: [Devs.adryd],
|
||||||
dependencies: ["MessageEventsAPI"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
|
@ -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 { Settings } from "../api/settings";
|
import { migratePluginSettings, Settings } from "../api/settings";
|
||||||
import { CheckedTextInput } from "../components/CheckedTextInput";
|
import { CheckedTextInput } from "../components/CheckedTextInput";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
|
import Logger from "../utils/Logger";
|
||||||
import { lazyWebpack, makeLazy } from "../utils/misc";
|
import { lazyWebpack, makeLazy } from "../utils/misc";
|
||||||
import { ModalContent, ModalHeader, ModalRoot, openModal } from "../utils/modal";
|
import { ModalContent, ModalHeader, ModalRoot, openModal } from "../utils/modal";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
@ -60,12 +61,12 @@ async function doClone(guildId: string, id: string, name: string, isAnimated: bo
|
|||||||
image: reader.result
|
image: reader.result
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
Toasts.show({
|
Toasts.show({
|
||||||
message: `Successfully yoinked ${name}!`,
|
message: `Successfully cloned ${name}!`,
|
||||||
type: Toasts.Type.SUCCESS,
|
type: Toasts.Type.SUCCESS,
|
||||||
id: Toasts.genId()
|
id: Toasts.genId()
|
||||||
});
|
});
|
||||||
}).catch(e => {
|
}).catch((e: any) => {
|
||||||
console.error("[EmoteYoink] Failed to upload emoji", e);
|
new Logger("EmoteCloner").error("Failed to upload emoji", e);
|
||||||
Toasts.show({
|
Toasts.show({
|
||||||
message: "Oopsie something went wrong :( Check console!!!",
|
message: "Oopsie something went wrong :( Check console!!!",
|
||||||
type: Toasts.Type.FAILURE,
|
type: Toasts.Type.FAILURE,
|
||||||
@ -174,18 +175,19 @@ function CloneModal({ id, name: emojiName, isAnimated }: { id: string; name: str
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
migratePluginSettings("EmoteCloner", "EmoteYoink");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "EmoteYoink",
|
name: "EmoteCloner",
|
||||||
description: "Clone emotes to your own server",
|
description: "Adds a Clone context menu item to emotes to clone them your own server",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
dependencies: ["MenuItemDeobfuscatorApi"],
|
dependencies: ["MenuItemDeobfuscatorAPI"],
|
||||||
|
|
||||||
patches: [{
|
patches: [{
|
||||||
// Literally copy pasted from ReverseImageSearch lol
|
// Literally copy pasted from ReverseImageSearch lol
|
||||||
find: "open-native-link",
|
find: "open-native-link",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /id:"open-native-link".{0,200}\(\{href:(.{0,3}),.{0,200}\},"open-native-link"\)/,
|
match: /id:"open-native-link".{0,200}\(\{href:(.{0,3}),.{0,200}\},"open-native-link"\)/,
|
||||||
replace: "$&,Vencord.Plugins.plugins.EmoteYoink.makeMenu(arguments[2])"
|
replace: "$&,Vencord.Plugins.plugins.EmoteCloner.makeMenu(arguments[2])"
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -214,9 +216,9 @@ export default definePlugin({
|
|||||||
const isAnimated = new URL(htmlElement.src).pathname.endsWith(".gif");
|
const isAnimated = new URL(htmlElement.src).pathname.endsWith(".gif");
|
||||||
|
|
||||||
return <Menu.MenuItem
|
return <Menu.MenuItem
|
||||||
id="yoink"
|
id="emote-cloner"
|
||||||
key="yoink"
|
key="emote-cloner"
|
||||||
label="Yoink"
|
label="Clone"
|
||||||
action={() =>
|
action={() =>
|
||||||
openModal(modalProps => (
|
openModal(modalProps => (
|
||||||
<ModalRoot {...modalProps}>
|
<ModalRoot {...modalProps}>
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "../api/MessageEvents";
|
import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "../api/MessageEvents";
|
||||||
|
import { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import { ApngDisposeOp, getGifEncoder, importApngJs } from "../utils/dependencies";
|
import { ApngDisposeOp, getGifEncoder, importApngJs } from "../utils/dependencies";
|
||||||
import { lazyWebpack } from "../utils/misc";
|
import { lazyWebpack } from "../utils/misc";
|
||||||
@ -55,8 +56,10 @@ interface StickerPack {
|
|||||||
stickers: Sticker[];
|
stickers: Sticker[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
migratePluginSettings("FakeNitro", "NitroBypass");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "NitroBypass",
|
name: "FakeNitro",
|
||||||
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven],
|
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven],
|
||||||
description: "Allows you to stream in nitro quality and send fake emojis/stickers.",
|
description: "Allows you to stream in nitro quality and send fake emojis/stickers.",
|
||||||
dependencies: ["MessageEventsAPI"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
@ -64,7 +67,7 @@ export default definePlugin({
|
|||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseAnimatedEmojis:function",
|
||||||
predicate: () => Settings.plugins.NitroBypass.enableEmojiBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true,
|
||||||
replacement: [
|
replacement: [
|
||||||
"canUseAnimatedEmojis",
|
"canUseAnimatedEmojis",
|
||||||
"canUseEmojisEverywhere"
|
"canUseEmojisEverywhere"
|
||||||
@ -77,7 +80,7 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseAnimatedEmojis:function",
|
||||||
predicate: () => Settings.plugins.NitroBypass.enableStickerBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStickerBypass === true,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /canUseStickersEverywhere:function\(.+?}/,
|
match: /canUseStickersEverywhere:function\(.+?}/,
|
||||||
replace: "canUseStickersEverywhere:function(e){return true;}"
|
replace: "canUseStickersEverywhere:function(e){return true;}"
|
||||||
@ -92,7 +95,7 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "canUseAnimatedEmojis:function",
|
find: "canUseAnimatedEmojis:function",
|
||||||
predicate: () => Settings.plugins.NitroBypass.enableStreamQualityBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStreamQualityBypass === true,
|
||||||
replacement: [
|
replacement: [
|
||||||
"canUseHighVideoUploadQuality",
|
"canUseHighVideoUploadQuality",
|
||||||
"canStreamHighQuality",
|
"canStreamHighQuality",
|
||||||
@ -106,7 +109,7 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "STREAM_FPS_OPTION.format",
|
find: "STREAM_FPS_OPTION.format",
|
||||||
predicate: () => Settings.plugins.NitroBypass.enableStreamQualityBypass === true,
|
predicate: () => Settings.plugins.FakeNitro.enableStreamQualityBypass === true,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(userPremiumType|guildPremiumTier):.{0,10}TIER_\d,?/g,
|
match: /(userPremiumType|guildPremiumTier):.{0,10}TIER_\d,?/g,
|
||||||
replace: ""
|
replace: ""
|
||||||
@ -154,7 +157,7 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
|
|
||||||
getStickerLink(stickerId: string) {
|
getStickerLink(stickerId: string) {
|
||||||
return `https://media.discordapp.net/stickers/${stickerId}.png?size=${Settings.plugins.NitroBypass.stickerSize}`;
|
return `https://media.discordapp.net/stickers/${stickerId}.png?size=${Settings.plugins.FakeNitro.stickerSize}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
async sendAnimatedSticker(stickerLink: string, stickerId: string, channelId: string) {
|
async sendAnimatedSticker(stickerLink: string, stickerId: string, channelId: string) {
|
||||||
@ -167,7 +170,7 @@ export default definePlugin({
|
|||||||
const { frames, width, height } = await parseURL(stickerLink);
|
const { frames, width, height } = await parseURL(stickerLink);
|
||||||
|
|
||||||
const gif = new GIFEncoder();
|
const gif = new GIFEncoder();
|
||||||
const resolution = Settings.plugins.NitroBypass.stickerSize;
|
const resolution = Settings.plugins.FakeNitro.stickerSize;
|
||||||
|
|
||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement("canvas");
|
||||||
canvas.width = resolution;
|
canvas.width = resolution;
|
||||||
@ -210,7 +213,7 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
const settings = Settings.plugins.NitroBypass;
|
const settings = Settings.plugins.FakeNitro;
|
||||||
if (!settings.enableEmojiBypass && !settings.enableStickerBypass) {
|
if (!settings.enableEmojiBypass && !settings.enableStickerBypass) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { addClickListener, removeClickListener } from "../api/MessageEvents";
|
import { addClickListener, removeClickListener } from "../api/MessageEvents";
|
||||||
|
import { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import { lazyWebpack } from "../utils/misc";
|
import { lazyWebpack } from "../utils/misc";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
@ -27,9 +28,11 @@ let isDeletePressed = false;
|
|||||||
const keydown = (e: KeyboardEvent) => e.key === "Backspace" && (isDeletePressed = true);
|
const keydown = (e: KeyboardEvent) => e.key === "Backspace" && (isDeletePressed = true);
|
||||||
const keyup = (e: KeyboardEvent) => e.key === "Backspace" && (isDeletePressed = false);
|
const keyup = (e: KeyboardEvent) => e.key === "Backspace" && (isDeletePressed = false);
|
||||||
|
|
||||||
|
migratePluginSettings("MessageClickActions", "MessageQuickActions");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "MessageQuickActions",
|
name: "MessageClickActions",
|
||||||
description: "Quick Delete, Quick edit",
|
description: "Hold Delete and click to delete, double click to edit",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
dependencies: ["MessageEventsAPI"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
|
|
||||||
|
@ -17,12 +17,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { findOption, OptionalMessageOption } from "../api/Commands";
|
import { findOption, OptionalMessageOption } from "../api/Commands";
|
||||||
|
import { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
|
migratePluginSettings("MoreKaomoji", "moarKaomojis");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "moarKaomojis",
|
name: "MoreKaomoji",
|
||||||
description: "Adds more Kaomojis to discord. ヽ(´▽`)/",
|
description: "Adds more Kaomoji to discord. ヽ(´▽`)/",
|
||||||
authors: [Devs.JacobTm],
|
authors: [Devs.JacobTm],
|
||||||
dependencies: ["CommandsAPI"],
|
dependencies: ["CommandsAPI"],
|
||||||
commands: [
|
commands: [
|
@ -16,11 +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 { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
|
|
||||||
|
migratePluginSettings("NoDevtoolsWarning", "STFU");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "STFU",
|
name: "NoDevtoolsWarning",
|
||||||
description: "Disables the 'HOLD UP' banner in the console",
|
description: "Disables the 'HOLD UP' banner in the console",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
patches: [{
|
patches: [{
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
import { Message } from "discord-types/general";
|
import { Message } from "discord-types/general";
|
||||||
|
|
||||||
|
import { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import { lazyWebpack } from "../utils/misc";
|
import { lazyWebpack } from "../utils/misc";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
@ -30,8 +31,10 @@ const isMac = navigator.platform.includes("Mac"); // bruh
|
|||||||
let replyIdx = -1;
|
let replyIdx = -1;
|
||||||
let editIdx = -1;
|
let editIdx = -1;
|
||||||
|
|
||||||
|
migratePluginSettings("QuickReply", "InteractionKeybinds");
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "InteractionKeybinds",
|
name: "QuickReply",
|
||||||
authors: [Devs.obscurity, Devs.Ven],
|
authors: [Devs.obscurity, Devs.Ven],
|
||||||
description: "Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",
|
description: "Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",
|
||||||
|
|
@ -30,9 +30,9 @@ const Engines = {
|
|||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "ReverseImageSearch",
|
name: "ReverseImageSearch",
|
||||||
description: "yes",
|
description: "Adds ImageSearch to image context menus",
|
||||||
authors: [Devs.Ven],
|
authors: [Devs.Ven],
|
||||||
dependencies: ["MenuItemDeobfuscatorApi"],
|
dependencies: ["MenuItemDeobfuscatorAPI"],
|
||||||
patches: [{
|
patches: [{
|
||||||
find: "open-native-link",
|
find: "open-native-link",
|
||||||
replacement: {
|
replacement: {
|
||||||
|
@ -24,7 +24,7 @@ export default definePlugin({
|
|||||||
name: "SpotifyControls",
|
name: "SpotifyControls",
|
||||||
description: "Spotify Controls",
|
description: "Spotify Controls",
|
||||||
authors: [Devs.Ven, Devs.afn, Devs.KraXen72],
|
authors: [Devs.Ven, Devs.afn, Devs.KraXen72],
|
||||||
dependencies: ["MenuItemDeobfuscatorApi"],
|
dependencies: ["MenuItemDeobfuscatorAPI"],
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
find: "showTaglessAccountPanel:",
|
find: "showTaglessAccountPanel:",
|
||||||
|
@ -16,13 +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 { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin, { OptionType } from "../utils/types";
|
import definePlugin, { OptionType } from "../utils/types";
|
||||||
import { Settings } from "../Vencord";
|
import { Settings } from "../Vencord";
|
||||||
|
|
||||||
|
migratePluginSettings("SpotifyCrack", "Ify");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "Ify",
|
name: "SpotifyCrack",
|
||||||
description: "Disables Spotify auto-pausing, allows activity to continue playing when idling and bypasses premium checks, allowing you to listen along with others.",
|
description: "Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",
|
||||||
authors: [
|
authors: [
|
||||||
Devs.Cyn,
|
Devs.Cyn,
|
||||||
Devs.Nuckyz
|
Devs.Nuckyz
|
||||||
@ -36,14 +38,14 @@ export default definePlugin({
|
|||||||
}],
|
}],
|
||||||
}, {
|
}, {
|
||||||
find: '.displayName="SpotifyStore"',
|
find: '.displayName="SpotifyStore"',
|
||||||
predicate: () => Settings.plugins.Ify.noSpotifyAutoPause,
|
predicate: () => Settings.plugins.SpotifyCrack.noSpotifyAutoPause,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /function (.{1,2})\(\).{0,200}SPOTIFY_AUTO_PAUSED\);.{0,}}}}/,
|
match: /function (.{1,2})\(\).{0,200}SPOTIFY_AUTO_PAUSED\);.{0,}}}}/,
|
||||||
replace: "function $1(){}"
|
replace: "function $1(){}"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
find: '.displayName="SpotifyStore"',
|
find: '.displayName="SpotifyStore"',
|
||||||
predicate: () => Settings.plugins.Ify.keepSpotifyActivityOnIdle,
|
predicate: () => Settings.plugins.SpotifyCrack.keepSpotifyActivityOnIdle,
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(shouldShowActivity=function\(\){.{1,50})&&!.{1,6}\.isIdle\(\)(.{0,}?})/,
|
match: /(shouldShowActivity=function\(\){.{1,50})&&!.{1,6}\.isIdle\(\)(.{0,}?})/,
|
||||||
replace: (_, functionDeclarationAndExpression, restOfFunction) => `${functionDeclarationAndExpression}${restOfFunction}`
|
replace: (_, functionDeclarationAndExpression, restOfFunction) => `${functionDeclarationAndExpression}${restOfFunction}`
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
|
||||||
|
import { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import { lazyWebpack } from "../utils/misc";
|
import { lazyWebpack } from "../utils/misc";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
@ -74,9 +75,10 @@ function sendMessage(channelId, message) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
migratePluginSettings("SpotifyShareCommands", "Sendify");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "Sendify",
|
name: "SpotifyShareCommands",
|
||||||
description: "Send your current Spotify music to chat",
|
description: "Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",
|
||||||
authors: [Devs.katlyn],
|
authors: [Devs.katlyn],
|
||||||
dependencies: ["CommandsAPI"],
|
dependencies: ["CommandsAPI"],
|
||||||
commands: [
|
commands: [
|
@ -16,6 +16,7 @@
|
|||||||
* 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 { migratePluginSettings } from "../api/settings";
|
||||||
import { Devs } from "../utils/constants";
|
import { Devs } from "../utils/constants";
|
||||||
import definePlugin from "../utils/types";
|
import definePlugin from "../utils/types";
|
||||||
import { SelectedChannelStore } from "../webpack/common";
|
import { SelectedChannelStore } from "../webpack/common";
|
||||||
@ -25,9 +26,10 @@ const timers = {} as Record<string, {
|
|||||||
i: number;
|
i: number;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
migratePluginSettings("VoiceChatDoubleClick", "vcDoubleClick");
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "vcDoubleClick",
|
name: "VoiceChatDoubleClick",
|
||||||
description: "Join VCs via DoubleClick instead of single click",
|
description: "Join voice chats via double click instead of single click",
|
||||||
authors: [Devs.Ven, Devs.D3SOX],
|
authors: [Devs.Ven, Devs.D3SOX],
|
||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
@ -40,12 +42,12 @@ export default definePlugin({
|
|||||||
// voice channels
|
// voice channels
|
||||||
{
|
{
|
||||||
match: /onClick:(.*)function\(\)\{(e\.handleClick.+?)}/g,
|
match: /onClick:(.*)function\(\)\{(e\.handleClick.+?)}/g,
|
||||||
replace: "onClick:$1function(){Vencord.Plugins.plugins.vcDoubleClick.schedule(()=>{$2}, e)}",
|
replace: "onClick:$1function(){Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{$2}, e)}",
|
||||||
},
|
},
|
||||||
// stage channels
|
// stage channels
|
||||||
{
|
{
|
||||||
match: /onClick:(.{0,15})this\.handleClick,/g,
|
match: /onClick:(.{0,15})this\.handleClick,/g,
|
||||||
replace: "onClick:$1(...args)=>Vencord.Plugins.plugins.vcDoubleClick.schedule(()=>{this.handleClick(...args);}, args[0]),",
|
replace: "onClick:$1(...args)=>Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{this.handleClick(...args);}, args[0]),",
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -36,7 +36,7 @@ export default new class ViewIcons implements PluginDef {
|
|||||||
authors = [Devs.Ven];
|
authors = [Devs.Ven];
|
||||||
description = "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";
|
description = "Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";
|
||||||
|
|
||||||
dependencies = ["MenuItemDeobfuscatorApi"];
|
dependencies = ["MenuItemDeobfuscatorAPI"];
|
||||||
|
|
||||||
openImage(url: string) {
|
openImage(url: string) {
|
||||||
const u = new URL(url);
|
const u = new URL(url);
|
||||||
|
@ -216,10 +216,10 @@ interface Menu {
|
|||||||
/**
|
/**
|
||||||
* Discord's Context menu items.
|
* Discord's Context menu items.
|
||||||
* To use anything but Menu.ContextMenu, your plugin HAS TO
|
* To use anything but Menu.ContextMenu, your plugin HAS TO
|
||||||
* depend on MenuItemDeobfuscatorApi. Otherwise they will throw
|
* depend on MenuItemDeobfuscatorAPI. Otherwise they will throw
|
||||||
*/
|
*/
|
||||||
export const Menu = proxyLazy(() => {
|
export const Menu = proxyLazy(() => {
|
||||||
const hasDeobfuscator = Vencord.Settings.plugins.MenuItemDeobfuscatorApi.enabled;
|
const hasDeobfuscator = Vencord.Settings.plugins.MenuItemDeobfuscatorAPI.enabled;
|
||||||
const menuItems = ["MenuSeparator", "MenuGroup", "MenuItem", "MenuCheckboxItem", "MenuRadioItem", "MenuControlItem"];
|
const menuItems = ["MenuSeparator", "MenuGroup", "MenuItem", "MenuCheckboxItem", "MenuRadioItem", "MenuControlItem"];
|
||||||
|
|
||||||
const map = mapMangledModule("♫ ⊂(。◕‿‿◕。⊂) ♪", {
|
const map = mapMangledModule("♫ ⊂(。◕‿‿◕。⊂) ♪", {
|
||||||
|
Loading…
Reference in New Issue
Block a user