mirror of
https://github.com/RobinRMC/VencordPlus.git
synced 2025-05-11 18:05:39 +02:00
31 lines
869 B
TypeScript
31 lines
869 B
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2024 Vendicated and contributors
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import { Devs } from "@utils/constants";
|
|
import { copyWithToast } from "@utils/misc";
|
|
import definePlugin from "@utils/types";
|
|
import { Icons, Menu } from "@webpack/common";
|
|
|
|
export default definePlugin({
|
|
name: "CopyFolderId",
|
|
description: "Adds an option to copy (server) folder IDs",
|
|
authors: [Devs.sadan],
|
|
|
|
contextMenus: {
|
|
"guild-context"(arr, { folderId }: { folderId?: number }) {
|
|
if(!folderId) return;
|
|
|
|
arr.push((<Menu.MenuItem
|
|
id="vc-copyFolderId"
|
|
label="Copy Folder ID"
|
|
icon={Icons.IdIcon}
|
|
action={() => {
|
|
copyWithToast(`${folderId}`);
|
|
}}
|
|
/>));
|
|
}
|
|
}
|
|
});
|