settingsSync: include date in filename for better sorting

Co-authored-by: cd CreepArghhh_ <65649991+cd-CreepArghhh@users.noreply.github.com>
This commit is contained in:
Vendicated 2024-05-12 02:00:29 +02:00 committed by Luna
parent c84be11d28
commit a01991333b
2 changed files with 4 additions and 4 deletions

View file

@ -111,7 +111,7 @@ const hyperLinkRegex = /\[.+?\]\((https?:\/\/.+?)\)/;
const settings = definePluginSettings({ const settings = definePluginSettings({
enableEmojiBypass: { enableEmojiBypass: {
description: "Allow sending fake emojis", description: "Allows sending fake emojis (also bypasses missing permission to use custom emojis)",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: true, default: true,
restartNeeded: true restartNeeded: true
@ -129,7 +129,7 @@ const settings = definePluginSettings({
restartNeeded: true restartNeeded: true
}, },
enableStickerBypass: { enableStickerBypass: {
description: "Allow sending fake stickers", description: "Allows sending fake stickers (also bypasses missing permission to use stickers)",
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
default: true, default: true,
restartNeeded: true restartNeeded: true

View file

@ -18,7 +18,7 @@
import { showNotification } from "@api/Notifications"; import { showNotification } from "@api/Notifications";
import { PlainSettings, Settings } from "@api/Settings"; import { PlainSettings, Settings } from "@api/Settings";
import { Toasts } from "@webpack/common"; import { moment, Toasts } from "@webpack/common";
import { deflateSync, inflateSync } from "fflate"; import { deflateSync, inflateSync } from "fflate";
import { getCloudAuth, getCloudUrl } from "./cloud"; import { getCloudAuth, getCloudUrl } from "./cloud";
@ -49,7 +49,7 @@ export async function exportSettings({ minify }: { minify?: boolean; } = {}) {
} }
export async function downloadSettingsBackup() { export async function downloadSettingsBackup() {
const filename = "vencord-settings-backup.json"; const filename = `vencord-settings-backup-${moment().format("YYYY-MM-DD")}.json`;
const backup = await exportSettings(); const backup = await exportSettings();
const data = new TextEncoder().encode(backup); const data = new TextEncoder().encode(backup);