mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 07:25:10 +00:00
CustomVoiceFilter: Add download response interface
This commit is contained in:
parent
ba431e78b1
commit
c5698f9032
1 changed files with 8 additions and 1 deletions
|
@ -23,9 +23,16 @@ interface IVoiceFilter {
|
||||||
downloadUrl?: string;
|
downloadUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IDownloadResponse {
|
||||||
|
success: boolean;
|
||||||
|
voiceFilter: IVoiceFilter;
|
||||||
|
path: string | null;
|
||||||
|
response: Response | null;
|
||||||
|
}
|
||||||
|
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
|
||||||
export async function downloadCustomVoiceFilter(_: IpcMainInvokeEvent, modulePath: string, voiceFilter: IVoiceFilter): Promise<{ success: boolean, voiceFilter: IVoiceFilter, path: string | null, response: Response | null; }> {
|
export async function downloadCustomVoiceFilter(_: IpcMainInvokeEvent, modulePath: string, voiceFilter: IVoiceFilter): Promise<IDownloadResponse> {
|
||||||
if (!fs.existsSync(modulePath + "/discord_voice_filters")) {
|
if (!fs.existsSync(modulePath + "/discord_voice_filters")) {
|
||||||
fs.mkdirSync(modulePath + "/discord_voice_filters");
|
fs.mkdirSync(modulePath + "/discord_voice_filters");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue