Compare commits

..

9 Commits

Author SHA1 Message Date
V
1a92d3ff8d bump to v1.4.1 2023-08-01 05:34:43 +02:00
Rawir
45bb1af011 MuteNewGuild: Support lurked guilds (#1546)
Co-authored-by: Rawiros <45668076+Rawiros@users.noreply.github.com01~>
2023-08-01 05:32:29 +02:00
V
39ad88f433 Experiments: Fix canary 2023-08-01 05:23:52 +02:00
V
8cf4d2a2c0 Update 1_INSTALLING.md 2023-07-28 16:44:17 +02:00
V
fe5e041db8 VoiceMessages: Read file from dynamic path (fixes mac & linux support) 2023-07-27 02:06:18 +02:00
V
d18681c197 Delete blank.yml 2023-07-27 01:35:58 +02:00
V
c024db1bc4 Update config.yml 2023-07-27 01:35:44 +02:00
V
d8a0db8bee Update blank.yml 2023-07-27 01:34:41 +02:00
V
f62efa5aa7 Update blank.yml 2023-07-27 01:33:55 +02:00
9 changed files with 25 additions and 34 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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": {

View File

@ -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),
} }
} }
}; };

View File

@ -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;

View File

@ -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*?\|\|/,

View File

@ -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,

View File

@ -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