Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1a92d3ff8d | ||
|
45bb1af011 | ||
|
39ad88f433 | ||
|
8cf4d2a2c0 | ||
|
fe5e041db8 | ||
|
d18681c197 | ||
|
c024db1bc4 | ||
|
d8a0db8bee | ||
|
f62efa5aa7 |
22
.github/ISSUE_TEMPLATE/blank.yml
vendored
22
.github/ISSUE_TEMPLATE/blank.yml
vendored
@ -1,22 +0,0 @@
|
|||||||
name: Blank Template
|
|
||||||
description: Use this only if your issue does not fit into another template. **DO NOT ASK FOR SUPPORT OR REQUEST PLUGINS**
|
|
||||||
labels: []
|
|
||||||
|
|
||||||
body:
|
|
||||||
- type: textarea
|
|
||||||
id: info-sec
|
|
||||||
attributes:
|
|
||||||
label: Tell us all about it.
|
|
||||||
description: Go nuts, let us know what you're wanting to bring attention to.
|
|
||||||
placeholder: ...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: checkboxes
|
|
||||||
id: agreement-check
|
|
||||||
attributes:
|
|
||||||
label: Request Agreement
|
|
||||||
description: DO NOT USE THIS TEMPLATE FOR SUPPORT OR PLUGIN REQUESTS!!! For Support, **join our Discord**. For plugin requests, **use discussions**
|
|
||||||
options:
|
|
||||||
- label: This is not a support or plugin request
|
|
||||||
required: true
|
|
2
.github/ISSUE_TEMPLATE/config.yml
vendored
2
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: true
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Vencord Support Server
|
- name: Vencord Support Server
|
||||||
url: https://discord.gg/D9uwnFnqmd
|
url: https://discord.gg/D9uwnFnqmd
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
> **Warning**
|
> [!WARNING]
|
||||||
> These instructions are only for advanced users. If you're not a Developer, you should use our [graphical installer](https://github.com/Vendicated/VencordInstaller#usage) instead.
|
> These instructions are only for advanced users. If you're not a Developer, you should use our [graphical installer](https://github.com/Vendicated/VencordInstaller#usage) instead.
|
||||||
|
> No support will be provided for installing in this fashion. If you cannot figure it out, you should just stick to a regular install.
|
||||||
|
|
||||||
# Installation Guide
|
# Installation Guide
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vencord",
|
"name": "vencord",
|
||||||
"private": "true",
|
"private": "true",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "The cutest Discord client mod",
|
"description": "The cutest Discord client mod",
|
||||||
"homepage": "https://github.com/Vendicated/Vencord#readme",
|
"homepage": "https://github.com/Vendicated/Vencord#readme",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
@ -64,7 +64,7 @@ export default {
|
|||||||
resolveRedirect: (url: string) => invoke<string>(IpcEvents.OPEN_IN_APP__RESOLVE_REDIRECT, url),
|
resolveRedirect: (url: string) => invoke<string>(IpcEvents.OPEN_IN_APP__RESOLVE_REDIRECT, url),
|
||||||
},
|
},
|
||||||
VoiceMessages: {
|
VoiceMessages: {
|
||||||
readRecording: () => invoke<Uint8Array | null>(IpcEvents.VOICE_MESSAGES_READ_RECORDING),
|
readRecording: (path: string) => invoke<Uint8Array | null>(IpcEvents.VOICE_MESSAGES_READ_RECORDING, path),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ import { IpcEvents } from "@utils/IpcEvents";
|
|||||||
import { app, ipcMain } from "electron";
|
import { app, ipcMain } from "electron";
|
||||||
import { readFile } from "fs/promises";
|
import { readFile } from "fs/promises";
|
||||||
import { request } from "https";
|
import { request } from "https";
|
||||||
import { join } from "path";
|
import { basename, normalize } from "path";
|
||||||
|
|
||||||
// #region OpenInApp
|
// #region OpenInApp
|
||||||
// These links don't support CORS, so this has to be native
|
// These links don't support CORS, so this has to be native
|
||||||
@ -49,10 +49,15 @@ ipcMain.handle(IpcEvents.OPEN_IN_APP__RESOLVE_REDIRECT, async (_, url: string) =
|
|||||||
|
|
||||||
|
|
||||||
// #region VoiceMessages
|
// #region VoiceMessages
|
||||||
ipcMain.handle(IpcEvents.VOICE_MESSAGES_READ_RECORDING, async () => {
|
ipcMain.handle(IpcEvents.VOICE_MESSAGES_READ_RECORDING, async (_, filePath: string) => {
|
||||||
const path = join(app.getPath("userData"), "module_data/discord_voice/recording.ogg");
|
filePath = normalize(filePath);
|
||||||
|
const filename = basename(filePath);
|
||||||
|
const discordBaseDirWithTrailingSlash = normalize(app.getPath("userData") + "/");
|
||||||
|
console.log(filename, discordBaseDirWithTrailingSlash, filePath);
|
||||||
|
if (filename !== "recording.ogg" || !filePath.startsWith(discordBaseDirWithTrailingSlash)) return null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const buf = await readFile(path);
|
const buf = await readFile(filePath);
|
||||||
return new Uint8Array(buf.buffer);
|
return new Uint8Array(buf.buffer);
|
||||||
} catch {
|
} catch {
|
||||||
return null;
|
return null;
|
||||||
|
@ -75,7 +75,7 @@ export default definePlugin({
|
|||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /return\s*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,
|
match: /return\s*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,
|
||||||
replace: (_, user, flags) => `return Vencord.Webpack.Common.UserStore.getCurrentUser().id===${user}.id||${user}.hasFlag(${flags}.STAFF)}`
|
replace: (_, user, flags) => `return Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${user}.id||${user}.hasFlag(${flags}.STAFF)}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
match: /hasFreePremium=function\(\){return this.isStaff\(\)\s*?\|\|/,
|
match: /hasFreePremium=function\(\){return this.isStaff\(\)\s*?\|\|/,
|
||||||
|
@ -36,7 +36,7 @@ const settings = definePluginSettings({
|
|||||||
description: "Suppress All Role @mentions",
|
description: "Suppress All Role @mentions",
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
default: true
|
default: true
|
||||||
},
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
@ -50,6 +50,13 @@ export default definePlugin({
|
|||||||
match: /INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,
|
match: /INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,
|
||||||
replace: (m, guildId) => `${m}$self.handleMute(${guildId});`
|
replace: (m, guildId) => `${m}$self.handleMute(${guildId});`
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
find: "{joinGuild:function",
|
||||||
|
replacement: {
|
||||||
|
match: /guildId:(\w+),lurker:(\w+).{0,20}\)}\)\);/,
|
||||||
|
replace: (m, guildId, lurker) => `${m}if(!${lurker})$self.handleMute(${guildId});`
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
settings,
|
settings,
|
||||||
|
@ -49,7 +49,7 @@ export const VoiceRecorderDesktop: VoiceRecorder = ({ setAudioBlob, onRecordingC
|
|||||||
} else {
|
} else {
|
||||||
discordVoice.stopLocalAudioRecording(async (filePath: string) => {
|
discordVoice.stopLocalAudioRecording(async (filePath: string) => {
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
const buf = await VencordNative.pluginHelpers.VoiceMessages.readRecording();
|
const buf = await VencordNative.pluginHelpers.VoiceMessages.readRecording(filePath);
|
||||||
if (buf)
|
if (buf)
|
||||||
setAudioBlob(new Blob([buf], { type: "audio/ogg; codecs=opus" }));
|
setAudioBlob(new Blob([buf], { type: "audio/ogg; codecs=opus" }));
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user