#CopyFolderID

1 messages · Page 1 of 1 (latest)

buoyant cloak
signal cape
#

Just curious, what did you need a folder ID for?

buoyant cloak
signal cape
#

😭

buoyant cloak
#

doing some debugging and wanted to do some testing with a folder

#

needed the folder id

#

which i didnt want to have to go into components to keep getting

signal cape
#

reasonable

#

react devtools are horrid

warm socket
#

new plugin? yes
is it gonna be helpful? no
will you install it? absloutely

radiant grail
#

could expand this into adding copy id buttons to everything missing it

buoyant cloak
radiant grail
#

shitton of stuff lol

buoyant cloak
radiant grail
#

finding them's the annoying part xd

gusty forge
#

I made a copy sticker ID plugin the other day. was considering posting it but wasnt sure if it was worth it lol

buoyant cloak
#

isnt it already a thing

gusty forge
#

oh that's in the picker?

#

I added it to right clicking one in chat

#

doesnt have that option there

#

actually added it to the message context menu didnt know stickers had their own context menu. should probably fix that

buoyant cloak
#

@gusty forge do you mind if i add it to this plugin

#

might move this to a more copy missing ids

gusty forge
#

Sure, here's all it is. not sure if there's a better way but MRun

const modifyMessageContextMenu: NavContextMenuPatchCallback = (children, props) => {
    const { message } = props;
    const { stickerItems } = message;

    if (!stickerItems || stickerItems.length === 0) {
        return;
    }

    const newMenuItem = (
        <Menu.MenuItem
            id="copy-sticker-id"
            key="copy-sticker-id"
            label={stickerItems.length === 1 ? "Copy Sticker ID" : "Copy Sticker IDs"}
            icon={Icons.IdIcon}
            action={() => {
                const stickerIDs = stickerItems
                    .map(sticker => sticker.id || sticker.name)
                    .filter(idOrName => idOrName)
                    .join("\n");
                if (stickerIDs && Clipboard.SUPPORTS_COPY) {
                    Clipboard.copy(stickerIDs);
                }
            }}
        />
    );

    const copyMessageIdIndex = children.findIndex(child => child?.props?.children?.props?.label === "Copy Message ID");

    if (copyMessageIdIndex !== -1) {
        if (children[copyMessageIdIndex]?.props?.children) {
            children[copyMessageIdIndex].props.children = [children[copyMessageIdIndex].props.children, newMenuItem];
        }
    } else {
        children.push(newMenuItem);
    }
};
#

I think I wrote this before finding out about findGroupChildrenByChildId

valid vector
#

findChildrenAndConsumeThem

signal cape
cosmic lily
#

broken(

#

src/plugins/vc-copyFolderId/index.tsx:10:9: ERROR: No matching export in "src/webpack/common/index.ts" for import "Icons"

unkempt field
#

just import from '@components/Icons' iirc

signal cape
#

wait

#

maybe?

#

those are just replica icons though

buoyant cloak
#

GUHHHH @lethal coyote when you banned me on accident it kicked me off all my plugin threads

signal cape
#

was this ever fixed?

#

nop 😭

buoyant cloak
#

@signal cape you will pr