Compare commits
1 Commits
dev
...
ci/contrib
Author | SHA1 | Date | |
---|---|---|---|
|
fb963b6887 |
45
.github/workflows/contributor-issue-enforcement.yml
vendored
Normal file
45
.github/workflows/contributor-issue-enforcement.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: Enforce contributor requirement
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- created
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
enforcement:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Delay to allow contributor comment
|
||||||
|
run: sleep 180
|
||||||
|
|
||||||
|
- name: Find potential contributor comment
|
||||||
|
uses: peter-evans/find-comment@d362b58d73ad53d089dd54460397ec1b8b47dbfd
|
||||||
|
id: comment
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.number }}
|
||||||
|
body-includes: /ok
|
||||||
|
|
||||||
|
- name: Check commenter is contributor
|
||||||
|
uses: actions-cool/check-user-permission@a0668c9aec87f3875fc56170b6452a453e9dd819
|
||||||
|
id: comment-contrib
|
||||||
|
if: ${{ !steps.comment.outputs.comment-id }}
|
||||||
|
with:
|
||||||
|
username: ${{ steps.comment.outputs.comment-author }}
|
||||||
|
check-contributor: true
|
||||||
|
|
||||||
|
- name: Check author is contributor
|
||||||
|
uses: actions-cool/check-user-permission@a0668c9aec87f3875fc56170b6452a453e9dd819
|
||||||
|
id: author-contrib
|
||||||
|
if: ${{ !steps.comment-contrib.check-result }}
|
||||||
|
with:
|
||||||
|
# no username means it checks the person who triggered the workflow run i.e. the issue creator
|
||||||
|
check-contributor: true
|
||||||
|
|
||||||
|
- name: Tag and close issue
|
||||||
|
if: ${{ !steps.comment-contrib.check-result && !steps.author-contrib.check-result }}
|
||||||
|
run: |
|
||||||
|
gh issue close $ISSUE -c "Your issue does not comply with our contributor requirement. Please do not ignore the issue template." -r "not planned"
|
||||||
|
gh issue edit $ISSUE --add-label "ignored contributor requirement"
|
||||||
|
gh issue lock $ISSUE
|
||||||
|
env:
|
||||||
|
ISSUE: ${{ github.event.issue.html_url }}
|
12
README.md
12
README.md
@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
@ -30,14 +28,6 @@ Visit https://vencord.dev/download
|
|||||||
|
|
||||||
https://discord.gg/D9uwnFnqmd
|
https://discord.gg/D9uwnFnqmd
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
| **Thanks a lot to all Vencord [sponsors](https://github.com/sponsors/Vendicated)!!** |
|
|
||||||
|:--:|
|
|
||||||
| [![](https://meow.vendicated.dev/sponsors.png)](https://github.com/sponsors/Vendicated) |
|
|
||||||
| *generated using [github-sponsor-graph](https://github.com/Vendicated/github-sponsor-graph)* |
|
|
||||||
|
|
||||||
|
|
||||||
## Star History
|
## Star History
|
||||||
|
|
||||||
<a href="https://star-history.com/#Vendicated/Vencord&Timeline">
|
<a href="https://star-history.com/#Vendicated/Vencord&Timeline">
|
||||||
|
@ -32,8 +32,6 @@ 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 && !thumbnails[0].original;
|
const hasThumb = thumbnails[0]?.votes >= 0;
|
||||||
|
|
||||||
if (!hasTitle && !hasThumb) return;
|
if (!hasTitle && !hasThumb) return;
|
||||||
|
|
||||||
@ -58,12 +58,12 @@ async function embedDidMount(this: Component<Props>) {
|
|||||||
enabled: true
|
enabled: true
|
||||||
};
|
};
|
||||||
|
|
||||||
if (hasTitle) {
|
if (titles[0]?.votes >= 0) {
|
||||||
embed.dearrow.oldTitle = embed.rawTitle;
|
embed.dearrow.oldTitle = embed.rawTitle;
|
||||||
embed.rawTitle = titles[0].title;
|
embed.rawTitle = titles[0].title;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasThumb) {
|
if (thumbnails[0]?.votes >= 0 && thumbnails[0].timestamp) {
|
||||||
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,6 +77,15 @@ 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,7 +302,6 @@ 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,6 +25,10 @@ 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;
|
||||||
@ -55,12 +59,14 @@ 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") };
|
||||||
@ -156,6 +162,7 @@ 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!`
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -169,6 +176,7 @@ 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'
|
||||||
@ -178,6 +186,7 @@ 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!`
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -185,12 +194,14 @@ 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
|
||||||
@ -213,10 +224,12 @@ 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'
|
||||||
@ -224,6 +237,7 @@ 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,13 +26,15 @@ export default definePlugin({
|
|||||||
authors: [Devs.Ven, Devs.adryd],
|
authors: [Devs.Ven, Devs.adryd],
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js")
|
fetch("https://raw.githubusercontent.com/adryd325/oneko.js/5977144dce83e4d71af1de005d16e38eebeb7b72/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
|
||||||
// DMS (inlined) === section
|
// section === DMS
|
||||||
match: /(?<=getRowHeight=\(.{2,50}?)1===\i/,
|
match: /===\i\.DMS&&0/,
|
||||||
// DMS (inlined) === section - 1
|
// section -1 === DMS
|
||||||
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?.toLowerCase(),
|
lang,
|
||||||
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: '"placeholder-channel-id"',
|
find: ".CannotShow=",
|
||||||
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,8 +82,13 @@ 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: /(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,
|
match: /(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/,
|
||||||
replace: (_, rest, defaultRenderLevel) => `${rest}${defaultRenderLevel}`
|
replace: (_, renderLevelExpression) => renderLevelExpression
|
||||||
|
},
|
||||||
|
// 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", "registerLanguage");
|
export const hljs: typeof import("highlight.js") = findByPropsLazy("highlight");
|
||||||
|
|
||||||
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
export const lodash: typeof import("lodash") = findByPropsLazy("debounce", "cloneDeep");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user