Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
4a5371a746 | ||
|
77749ed5e1 | ||
|
45aa9fbb6d | ||
|
4a2657f928 | ||
|
6578eb487e | ||
|
c080a0eaac | ||
|
3ea6a96715 | ||
|
af614465a4 | ||
|
7b248ee309 | ||
|
fd25b5f296 | ||
|
77d08c5c28 |
@ -4,7 +4,9 @@
|
|||||||
|
|
||||||
The cutest Discord client mod
|
The cutest Discord client mod
|
||||||
|
|
||||||
![image](https://github.com/Vendicated/Vencord/assets/45497981/706722b1-32de-4d99-bee9-93993b504334)
|
| ![image](https://github.com/Vendicated/Vencord/assets/45497981/706722b1-32de-4d99-bee9-93993b504334) |
|
||||||
|
|:--:|
|
||||||
|
| A screenshot of vencord showcasing the [vencord-theme](https://github.com/synqat/vencord-theme) |
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ function isNewer($new: string, old: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function patchLatest() {
|
function patchLatest() {
|
||||||
|
if (process.env.DISABLE_UPDATER_AUTO_PATCHING) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const currentAppPath = dirname(process.execPath);
|
const currentAppPath = dirname(process.execPath);
|
||||||
const currentVersion = basename(currentAppPath);
|
const currentVersion = basename(currentAppPath);
|
||||||
|
@ -50,7 +50,7 @@ async function embedDidMount(this: Component<Props>) {
|
|||||||
const { titles, thumbnails } = await res.json();
|
const { titles, thumbnails } = await res.json();
|
||||||
|
|
||||||
const hasTitle = titles[0]?.votes >= 0;
|
const hasTitle = titles[0]?.votes >= 0;
|
||||||
const hasThumb = thumbnails[0]?.votes >= 0;
|
const hasThumb = thumbnails[0]?.votes >= 0 && !thumbnails[0].original;
|
||||||
|
|
||||||
if (!hasTitle && !hasThumb) return;
|
if (!hasTitle && !hasThumb) return;
|
||||||
|
|
||||||
@ -58,12 +58,12 @@ async function embedDidMount(this: Component<Props>) {
|
|||||||
enabled: true
|
enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (titles[0]?.votes >= 0) {
|
if (hasTitle) {
|
||||||
embed.dearrow.oldTitle = embed.rawTitle;
|
embed.dearrow.oldTitle = embed.rawTitle;
|
||||||
embed.rawTitle = titles[0].title;
|
embed.rawTitle = titles[0].title;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thumbnails[0]?.votes >= 0 && thumbnails[0].timestamp) {
|
if (hasThumb) {
|
||||||
embed.dearrow.oldThumb = embed.thumbnail.proxyURL;
|
embed.dearrow.oldThumb = embed.thumbnail.proxyURL;
|
||||||
embed.thumbnail.proxyURL = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${videoId}&time=${thumbnails[0].timestamp}`;
|
embed.thumbnail.proxyURL = `https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${videoId}&time=${thumbnails[0].timestamp}`;
|
||||||
}
|
}
|
||||||
|
@ -77,15 +77,6 @@ export default definePlugin({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// Fix search history being disabled / broken with isStaff
|
|
||||||
{
|
|
||||||
find: '("showNewSearch")',
|
|
||||||
predicate: () => settings.store.enableIsStaff,
|
|
||||||
replacement: {
|
|
||||||
match: /(?<=showNewSearch"\);return)\s?/,
|
|
||||||
replace: "!1&&"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
find: 'H1,title:"Experiments"',
|
find: 'H1,title:"Experiments"',
|
||||||
replacement: {
|
replacement: {
|
||||||
|
@ -302,6 +302,7 @@ export default definePlugin({
|
|||||||
match: /attachments:(\i)\((\i)\)/,
|
match: /attachments:(\i)\((\i)\)/,
|
||||||
replace:
|
replace:
|
||||||
"attachments: $1((() => {" +
|
"attachments: $1((() => {" +
|
||||||
|
" if ($self.shouldIgnore($2)) return $2;" +
|
||||||
" let old = arguments[1]?.attachments;" +
|
" let old = arguments[1]?.attachments;" +
|
||||||
" if (!old) return $2;" +
|
" if (!old) return $2;" +
|
||||||
" let new_ = $2.attachments?.map(a => a.id) ?? [];" +
|
" let new_ = $2.attachments?.map(a => a.id) ?? [];" +
|
||||||
|
@ -25,10 +25,6 @@ import definePlugin, { OptionType } from "@utils/types";
|
|||||||
const EMOTE = "<:luna:1035316192220553236>";
|
const EMOTE = "<:luna:1035316192220553236>";
|
||||||
const DATA_KEY = "MessageTags_TAGS";
|
const DATA_KEY = "MessageTags_TAGS";
|
||||||
const MessageTagsMarker = Symbol("MessageTags");
|
const MessageTagsMarker = Symbol("MessageTags");
|
||||||
const author = {
|
|
||||||
id: "821472922140803112",
|
|
||||||
bot: false
|
|
||||||
};
|
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
name: string;
|
name: string;
|
||||||
@ -59,14 +55,12 @@ function createTagCommand(tag: Tag) {
|
|||||||
execute: async (_, ctx) => {
|
execute: async (_, ctx) => {
|
||||||
if (!await getTag(tag.name)) {
|
if (!await getTag(tag.name)) {
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} The tag **${tag.name}** does not exist anymore! Please reload ur Discord to fix :)`
|
content: `${EMOTE} The tag **${tag.name}** does not exist anymore! Please reload ur Discord to fix :)`
|
||||||
});
|
});
|
||||||
return { content: `/${tag.name}` };
|
return { content: `/${tag.name}` };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.plugins.MessageTags.clyde) sendBotMessage(ctx.channel.id, {
|
if (Settings.plugins.MessageTags.clyde) sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} The tag **${tag.name}** has been sent!`
|
content: `${EMOTE} The tag **${tag.name}** has been sent!`
|
||||||
});
|
});
|
||||||
return { content: tag.message.replaceAll("\\n", "\n") };
|
return { content: tag.message.replaceAll("\\n", "\n") };
|
||||||
@ -162,7 +156,6 @@ export default definePlugin({
|
|||||||
|
|
||||||
if (await getTag(name))
|
if (await getTag(name))
|
||||||
return sendBotMessage(ctx.channel.id, {
|
return sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} A Tag with the name **${name}** already exists!`
|
content: `${EMOTE} A Tag with the name **${name}** already exists!`
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -176,7 +169,6 @@ export default definePlugin({
|
|||||||
await addTag(tag);
|
await addTag(tag);
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} Successfully created the tag **${name}**!`
|
content: `${EMOTE} Successfully created the tag **${name}**!`
|
||||||
});
|
});
|
||||||
break; // end 'create'
|
break; // end 'create'
|
||||||
@ -186,7 +178,6 @@ export default definePlugin({
|
|||||||
|
|
||||||
if (!await getTag(name))
|
if (!await getTag(name))
|
||||||
return sendBotMessage(ctx.channel.id, {
|
return sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} A Tag with the name **${name}** does not exist!`
|
content: `${EMOTE} A Tag with the name **${name}** does not exist!`
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -194,14 +185,12 @@ export default definePlugin({
|
|||||||
await removeTag(name);
|
await removeTag(name);
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} Successfully deleted the tag **${name}**!`
|
content: `${EMOTE} Successfully deleted the tag **${name}**!`
|
||||||
});
|
});
|
||||||
break; // end 'delete'
|
break; // end 'delete'
|
||||||
}
|
}
|
||||||
case "list": {
|
case "list": {
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
embeds: [
|
embeds: [
|
||||||
{
|
{
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -224,12 +213,10 @@ export default definePlugin({
|
|||||||
|
|
||||||
if (!tag)
|
if (!tag)
|
||||||
return sendBotMessage(ctx.channel.id, {
|
return sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: `${EMOTE} A Tag with the name **${name}** does not exist!`
|
content: `${EMOTE} A Tag with the name **${name}** does not exist!`
|
||||||
});
|
});
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: tag.message.replaceAll("\\n", "\n")
|
content: tag.message.replaceAll("\\n", "\n")
|
||||||
});
|
});
|
||||||
break; // end 'preview'
|
break; // end 'preview'
|
||||||
@ -237,7 +224,6 @@ export default definePlugin({
|
|||||||
|
|
||||||
default: {
|
default: {
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
author,
|
|
||||||
content: "Invalid sub-command"
|
content: "Invalid sub-command"
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -26,15 +26,13 @@ export default definePlugin({
|
|||||||
authors: [Devs.Ven, Devs.adryd],
|
authors: [Devs.Ven, Devs.adryd],
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/5977144dce83e4d71af1de005d16e38eebeb7b72/oneko.js")
|
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js")
|
||||||
.then(x => x.text())
|
.then(x => x.text())
|
||||||
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif"))
|
.then(s => s.replace("./oneko.gif", "https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif"))
|
||||||
.then(eval);
|
.then(eval);
|
||||||
},
|
},
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
clearInterval(window.onekoInterval);
|
|
||||||
delete window.onekoInterval;
|
|
||||||
document.getElementById("oneko")?.remove();
|
document.getElementById("oneko")?.remove();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -100,10 +100,10 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Fix getRowHeight's check for whether this is the DMs section
|
// Fix getRowHeight's check for whether this is the DMs section
|
||||||
// section === DMS
|
// DMS (inlined) === section
|
||||||
match: /===\i\.DMS&&0/,
|
match: /(?<=getRowHeight=\(.{2,50}?)1===\i/,
|
||||||
// section -1 === DMS
|
// DMS (inlined) === section - 1
|
||||||
replace: "-1$&"
|
replace: "$&-1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// Override scrollToChannel to properly account for pinned channels
|
// Override scrollToChannel to properly account for pinned channels
|
||||||
|
@ -67,7 +67,7 @@ export default definePlugin({
|
|||||||
createHighlighter,
|
createHighlighter,
|
||||||
renderHighlighter: ({ lang, content }: { lang: string; content: string; }) => {
|
renderHighlighter: ({ lang, content }: { lang: string; content: string; }) => {
|
||||||
return createHighlighter({
|
return createHighlighter({
|
||||||
lang,
|
lang: lang?.toLowerCase(),
|
||||||
content,
|
content,
|
||||||
isPreview: false,
|
isPreview: false,
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ export default definePlugin({
|
|||||||
patches: [
|
patches: [
|
||||||
{
|
{
|
||||||
// RenderLevel defines if a channel is hidden, collapsed in category, visible, etc
|
// RenderLevel defines if a channel is hidden, collapsed in category, visible, etc
|
||||||
find: ".CannotShow=",
|
find: '"placeholder-channel-id"',
|
||||||
replacement: [
|
replacement: [
|
||||||
// Remove the special logic for channels we don't have access to
|
// Remove the special logic for channels we don't have access to
|
||||||
{
|
{
|
||||||
@ -82,13 +82,8 @@ export default definePlugin({
|
|||||||
},
|
},
|
||||||
// Make channels we dont have access to be the same level as normal ones
|
// Make channels we dont have access to be the same level as normal ones
|
||||||
{
|
{
|
||||||
match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/,
|
match: /(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,
|
||||||
replace: (_, renderLevelExpression) => renderLevelExpression
|
replace: (_, rest, defaultRenderLevel) => `${rest}${defaultRenderLevel}`
|
||||||
},
|
|
||||||
// Make channels we dont have access to be the same level as normal ones
|
|
||||||
{
|
|
||||||
match: /(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/,
|
|
||||||
replace: (_, RenderLevels) => `${RenderLevels}.Show`
|
|
||||||
},
|
},
|
||||||
// Remove permission checking for getRenderLevel function
|
// Remove permission checking for getRenderLevel function
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ waitFor(["ComponentDispatch", "ComponentDispatcher"], m => ComponentDispatch = m
|
|||||||
export const RestAPI: t.RestAPI = findByPropsLazy("getAPIBaseURL", "get");
|
export const RestAPI: t.RestAPI = findByPropsLazy("getAPIBaseURL", "get");
|
||||||
export const moment: typeof import("moment") = findByPropsLazy("parseTwoDigitYear");
|
export const moment: typeof import("moment") = findByPropsLazy("parseTwoDigitYear");
|
||||||
|
|
||||||
export const hljs: typeof import("highlight.js") = findByPropsLazy("highlight");
|
export const hljs: typeof import("highlight.js") = findByPropsLazy("highlight", "registerLanguage");
|
||||||
|
|
||||||
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user