#๐Ÿงฉ-plugin-development

1 messages ยท Page 59 of 1

jagged briar
#

me when findByProps

iron epoch
cedar olive
#

you should generally avoid manually wreqing things

#

always use the cache, and if the thing is not loaded, load the chunk that has it

flint bronze
#

also horror

flint bronze
# flint bronze

need advice i will actually submit PR for these if I make them btw

#

for context i did a shitty reimplementation of this whole invite rows list thing bc cba making special guild thingy case; should I migrate it to the actual exported component for that

#

y'all want everything don't you

#

deobfuscating the shit to make sense of what I need to patch

#

i renamed that

granite dune
#

i think my autofill rec looks a bit broken blobcatcozy

balmy sky
balmy sky
#

I just added an exported svg component in a seperate tsx file and my vencord stopped working ENTIRELY, no errors in console but all plugins and features have disappeared- is there even a way to diagnose the issue/error there? no errors in console either

dull magnet
#

there are gonna be errors in console lol

#

unless ur discord updated so it unpatched xd

balmy sky
#

One sec let me make a gist

#

I wouldn't be surprised if it's something really stupid, the svg is taken almost directly from discotools

dull magnet
#
- svgIcon: sproutIcon()
+ svgIcon: sproutIcon
#
<rank.svgIcon />
balmy sky
#

i updated gist

dull magnet
#

check errors

balmy sky
#

nothing in terminal when building, or the devtools console

dull magnet
#

there has to be

balmy sky
iron epoch
#

thanks, you saved me a lot of time

stable moss
#

does anyone know how to drag an drop at all?

#

cause just creating a div element with draggable=true doesnt even work for me

stable moss
granite dune
#

lemme find the css

frosty otter
granite dune
#

well,-well im a perfectionist when it comes to these things and i love modern things. It would have been too big a project for me and too time-consuming. plus, ummm Im a very lazy person ๐Ÿ‘ฏ ๐Ÿคญ

#

i can share the project code, if someone wanna continue or smh

granite dune
#

maybe in the future i'll

#

idk

dull magnet
#

try findByProps("useDrag")

stable moss
stable moss
meager palm
#

can i use web to develop a plugin?

amber basin
#

yes but itd be extremely tedious and not practical

#

youd need to reinstall the extension everytime you make a change

meager palm
#

ah ok

#

will i need the discord client installed then?

amber basin
#

yes

granite dune
#

am i stupid or am i stupid?

dull magnet
#

the method is called del not delete

granite dune
#

oh f

dull magnet
#

it looks like the type is wrong so it's hardly your fault

dull magnet
granite dune
#

happens ๐Ÿ™†โ€โ™‚๏ธ

dull magnet
#

you can just findByProps it

granite dune
#

ah, alr

#

thanks

dull magnet
#

andtry to avoid using manual paths, use Constants.Endpoints.ROUTE() instead

granite dune
#

alr, will do

#

๐Ÿซถ

cedar marsh
#

If I made a plugin that makes the VC popout always on top, would it get merged?

dull magnet
#

cant you right click the titlebar > pin on top

cedar marsh
#

I currently use powertoys to pin it to top

granite dune
#

all u need is better imagination

cedar marsh
#

what

safe glade
dull magnet
cedar marsh
dull magnet
#

oh hmm

#

honestly windows should just have this natively

#

pinning windows to top should be handled by the os imo

cedar marsh
safe glade
#

should

cedar marsh
#

Microsoft devs make good features, but aren't allowed to put them in windows, so they put them in powertoys

dull magnet
#

like gnome has it natively

#

i think most linux DEs do

safe glade
#

idk i3wm has always on top on anything popped out

median flare
safe glade
#

but it's tiling sooo it plays by its own rules

#

for windows though I could see this being useful

granite dune
cedar marsh
#

oh

tight canyon
#

Is that an awful idea to reassign component children like this?

#

well, it works like that, but maybe I shouldn't do that?

dull magnet
#

show full code pleae

tight canyon
#

Replace is awful rn, i know

granite dune
#

escape a literal ๐Ÿคทโ€โ™‚๏ธ

tight canyon
sonic copper
#

@deep atlas yo

#

okay..

meager palm
#

can i use dependencies

#

like an npm dependency

jagged briar
#

not for a plugin

#

if you really need it you can add it in utils/dependencies.ts

granite dune
# tight canyon
function getColoredText(text: any) {
  if (!Array.isArray(text)) {
    text = [text];
  }

  return text.map((p: any) => {
    if (React.isValidElement(p) && p.props) {
      return React.cloneElement(p, {
        ...p.props,
        children: <ColoredMessage text={p.props.children as string} />
      });
    }
    return p;
  });
}

umm maybe try to use something like this, im not sure this that good or works, i cant test rn, also im kinda bango noob, but give it a try, 516395crythumbsup maybe there is syntax error too, as i said i cant test rn kekPat

meager palm
#

how can i uhh... intercept an user popup?

#

specifically from clicking the profile picture or username from a message

#

(because i need the message id)

dull magnet
#

what are you actually trying to do

meager palm
#

pluralkit integration kind of thing

#

pk has an api to fetch details about a message by id

#

i want to be able to click on the webhook and make the system's author pop up instead of it showing invalid user

dull magnet
#

so you want to make it so that the profile popout has the actual author instead of the webhook user?

meager palm
#

yes

dull magnet
#

you need to patch the onClick handler

#

or you could go the easier route and patch the context menu to add a button like view original author

meager palm
#

im going with a MessagePopover rn, but having the popout automatically be the author would be nice

meager palm
#

is this always like finding a needle in a haystack or am i missing something

dull magnet
#

it's very easy with react devtools

#

you just inspect the element and get all its props including onClick

tight canyon
#

I really love how it looks :3

drowsy chasm
#

ooo

honest stump
granite dune
indigo ferry
#

anyone know how to wait for a key event in vencord?

granite dune
# indigo ferry anyone know how to wait for a key event in vencord?

idk wym exactly, and what u wanna do, but maybe this? ๐Ÿ˜•

function onKeyPress(event) {
    if (event.key === 'Enter') {
        console.log('meow');
    }
}

window.addEventListener('keydown', onKeyPress);

or


const EnterKeyListener: React.FC = () => {
    useEffect(() => {
        const handleKeyDown = (e: KeyboardEvent) => {
            if (e.key === "Enter") {
                console.log("meow");
            }
        };

        window.addEventListener("keydown", handleKeyDown);

        return () => {
            window.removeEventListener("keydown", handleKeyDown);
        };
    }, []);

    return null;
};

export default EnterKeyListener;
amber basin
#

looks like useAwaiter isnt re-running when the url from that hook updates, and it always returns false and doesnt re-run

#

it works correctly if i scroll down in the member list and back up

iron epoch
amber basin
#
const [shouldShow, e, isPending] = useAwaiter(async () => {
    if (!settings.store.animate) {
        if (url!.includes("cdn.discordapp.com")) return true;
        return await new Promise(async (resolve) => {
            usrbgQueue.push(() => fetch(url!.replace(".gif", ".png"), { method: "HEAD" }).then(async res => {
                console.log(res);
                await new Promise<void>(resolve => setTimeout(resolve, 1000));
                resolve(res.ok && res.headers.get("content-type")?.startsWith("image/png"));
                return;
            }));
        });
    }
    return true;
});

console.log(shouldShow, e, isPending, url);

if (!shouldShow) return null;
return (
    <img src={url} className="vc-banners-everywhere-memberlist"></img>
);```
amber basin
#

oh sorry

#
// code above the earlier
let url: string | null = null;
if (Vencord.Plugins.isPluginEnabled("USRBG")) {
    const USRBG = Vencord.Plugins.plugins.USRBG as unknown as typeof import("../usrbg/index").default;
    url = USRBG.getImageUrl(user.id);
}
if (!url) {
    url = useFetchMemberProfile(user.id);
}```
#
const useFetchMemberProfile = (userId: string): string => {
    const profile = useStateFromStores([UserProfileStore], () => UserProfileStore.getUserProfile(userId));

    useEffect(() => {
        let cancel = false;

        discordQueue.push(() => {
            if (cancel) return Promise.resolve(void 0);
            return fetchUserProfile(userId).finally(async () => {
                await new Promise<void>(resolve => setTimeout(resolve, 1000));
            });
        });

        return () => { cancel = true; };
    }, []);

    if (!profile?.banner) return "";
    const extension = settings.store.animate && profile.banner.startsWith("a_")
        ? ".gif"
        : ".png";
    return `https://cdn.discordapp.com/banners/${userId}/${profile.banner}${extension}`;
};```
granite dune
#

maybe try add url as a dependency to re run usea waiter when url changes and the same with userid

#
return () => { cancel = true; };
    }, [userId]);

and

await new Promise<void>(resolve => setTimeout(resolve, 1000));
                    resolve(res.ok && res.headers.get("content-type")?.startsWith("image/png"));
                    return;
                }));
            });
        }
        return true;
    }, [url]); 

maybe like this

dull magnet
# amber basin
useAwaiter(() => {}, {
  deps: [dep1, dep2, dep3],
  fallbackValue: ...
})
amber basin
#

ohhhh i didnt see u could specify deps for useawaiter

#

tysm

#

still getting this tho

#

i am using a queue for the fetches

dull magnet
#

thats an internal react error xd u dont need a queue

granite dune
#

๐Ÿ™†โ€โ™‚๏ธ

amber basin
dull magnet
#

hooks need to always be called

#
if (!url) {
  url = useFetchMemberProfile
}
#

this is invalid

#

(also prefer ??= for that, url ??= ...)

amber basin
#

alright, ill make useFetchMemberProfile not fetch if its in the usrbg data, and call it always

amber basin
amber basin
#

works now!! tysm

#

pushed

#

@dull magnet do i not need enableStyle if it isnt managed?

dull magnet
#

if its not managed you dont get any export

#

just import "./style.css"

amber basin
#

fixed

#

tysmmmm

granite dune
#

my brain go brr, i forgot from where import these ๐Ÿ™†โ€โ™‚๏ธ

#

nvm im stupido

cedar olive
#

you need to findByPropsLazy btw

granite dune
#

thanks the reminder, u actually just fixed my biggest problem harold1

#

no sleep is can be kinda insane ๐Ÿ™†โ€โ™‚๏ธ

#

now everything works fine

#

yes, im sleepy ngl, when u type bun instead of git

amber basin
#

why are u using bun instead of node for vencord

#

or is it just in musclememory

granite dune
#

musclememory

#

also 0sleep

amber basin
#

ah

#

fair

iron epoch
#

I need help, I am unable to get this state

#

its for the automod, module id: 727072

#

I am trying to get the automod rules

iron epoch
#

done

iron epoch
#

new problem, is there a way to get the guild id when looking in guild settings?

flint bronze
#

this is horror

            {loaded && (invites.length ? invites.toSorted((a, b) => (new Date(a.expires_at) as unknown as number) - (new Date(b.expires_at) as unknown as number)).map((fi: { code: any; uses: any; max_uses: any; expires_at: string; }) => <InviteRow
#

one line

#

i made it longer

iron epoch
#

is there a way to listen for AnalyticsUtils tracks?
trying to get this

#

and get the guild id

flint bronze
iron epoch
flint bronze
#

i ran FluxDispatcher.addInterceptor(console.warn) for testing stuff a while ago and i can still find tracking events after trying again

#
{
    "type": "TRACK",
    "event": "impression_guild_settings_overview",
    "properties": {
        "impression_type": "pane",
        "guild_id": "1015060230222131221",
        "guild_size_total": 46037,
        "guild_num_channels": 42,
        "guild_num_text_channels": 39,
        "guild_num_voice_channels": 3,
        "guild_num_roles": 193,
        "guild_member_num_roles": 7,
        "guild_member_perms": "2222085187161793",
        "guild_is_vip": false,
        "is_member": true,
        "num_voice_channels_active": 1,
        "channel_id": "1032770730703716362",
        "channel_type": 0,
        "channel_size_total": 0,
        "channel_member_perms": "2222085187161793",
        "channel_hidden": false,
        "location_section": "impression_guild_settings_overview",
        "client_performance_memory": 0,
        "accessibility_features": 524544,
        "rendered_locale": "en-GB",
        "uptime_app": 3198,
        "client_rtc_state": "DISCONNECTED",
        "client_app_state": "focused"
    },
    "flush": false
}
iron epoch
#

oh okay, this seems useful.

#

lemme give it a try thenn

flint bronze
#

dont be confident the event will be exactly the same

dull magnet
#

what are you trying to do

#

why do u need tracking events

dull magnet
#

SelectedGuildStore.getGuildId()

flint bronze
#

you can right click a guild in the sidebar and open server settings from there

#

smh

iron epoch
#

nice, its working better then expected

#

just need to fix the sudden react error

#

I am so confused, the first one is fine but the second one crashes discord

    const [inputValue, setInputValue] = useState("");
    const [warningText, setWarningText] = useState("");
    const { rulesByTriggerType }: { rulesByTriggerType: Array<Array<AutoModRule>>; } = useAutomodRulesStore.useAutomodRulesList(guildId);
    const { rulesByTriggerType }: { rulesByTriggerType: Array<Array<AutoModRule>>; } = useAutomodRulesStore.useAutomodRulesList(guildId);
    if (rulesByTriggerType.length === 0 || !rulesByTriggerType[1] || rulesByTriggerType[1].length === 0) return null;
    const [inputValue, setInputValue] = useState("");
    const [warningText, setWarningText] = useState("");
iron epoch
#

oh okay, why is this a thing tho?

dull magnet
#

i should revive my change that adds react eslint rules

#

i put it on hiatus because i broke some things

flint bronze
dull magnet
#

yes

#

it's just a queue basically

#

if you call a hook conditionally it messes up all other hooks

iron epoch
#

smarty

    renderInputBox: () => {
        const { rulesByTriggerType }: { rulesByTriggerType: AutoModRule[][]; } = useAutomodRulesStore.useAutomodRulesList(currentGuild);
        if (rulesByTriggerType.length === 0 || !rulesByTriggerType[1] || rulesByTriggerType[1].length === 0) return null;
        return <TestInputBoxComponent currentRules={rulesByTriggerType[1]} />;
    },
balmy sky
#

Is there a util to send a message? i know there's one to enter text into the chat box but i couldn't find one to actually sent it (or think of a plugin that does that)

#

NVM I JUST FOUND IT AS SOON AS I SAID THAT NAH

granite dune
balmy sky
#

That's really nice looking actually

#

I would probably use it if i didn't already have a color picker widget

granite dune
#

yeah, u can just download one and use as external, so kinda pointless use as a plugin, but pain is pain

iron epoch
balmy sky
granite dune
balmy sky
granite dune
#

watch plugged into canary and yeah

#

XD

#

i test on my alt

#

ofc i can login to my main, but im a lazy ppl ๐Ÿ™†โ€โ™‚๏ธ

granite dune
balmy sky
#

You should totally make that open source tho because it would be sick as a plasma widget

balmy sky
#

Qhar

granite dune
#

here is the code for colorpicker, but still unfinished and maybe hardcoded ๐Ÿคทโ€โ™‚๏ธ

brazen pumice
#

are external domains allowed in a vencord plugin? i would def give the user a prompt tho.

granite dune
iron epoch
tight canyon
iron epoch
#

nothing..

iron epoch
#

I am failling to enable this experiment again

flint bronze
#

they added a dismiss button

#

idk how to get it back

#

lol

brazen pumice
# dull magnet for what

i'm thinking of making a plugin that connects via ws to a domain that just only transmits you're discord ID and says if you're a vencord user using that plugin-

dull magnet
#

why ๐Ÿ˜ญ

brazen pumice
#

idk like isVencordUser plugin ;-;

flint bronze
#

horror

#

you.... are self aware this is effectively useless unless everyone uses it trolley

brazen pumice
#

yes

#

ovs nobodys gonna use it

flint bronze
#

vee its time for you to joke about vencord analytics again

#

does this look like something discord would make

dull magnet
#

tf is that qr code

flint bronze
#

i blanked it out

#

real version (no the invite doesnt work)

#

it's for friend invites

trim cedar
#

That's really cool

iron epoch
#

and pretty much I see discord making this

flint bronze
#

blame discord

#

i stole discords stock thing

#

its actually an SVG

#

and also

#

see that thing at the bottom

#

it would be dum to right click downloa

iron epoch
stone egret
#

Anyone know how to always show the 'Pop Out' button even when no one is screensharing

#
div.wrapper__6bf2d.poppedOut_db58f7
  { display: none; } /* dupe call ui */```
#

I recently added this to hide call ui when i have things popped out, but i want to be able to pop that ui out even if no one is sharing

#

plays better with vertical monitor

iron epoch
stone egret
#

only shows for me when someone is screensharing or camera on, is that just me?

stone egret
flint bronze
#

you need to click into the channel

stone egret
#

oh i dont care about the server behavior, this is in group dms

#

should have specified

dusk kernel
#

how come 99% of vencord forks exist just to add a bunch of plugins

dull magnet
#

cause vencord is perfect people just want more plugins

iron moon
#

๐Ÿ’ช

dusk kernel
#

(i wouldn't know, i've never done it)

dull magnet
#

not really, but you have to build from source

dusk kernel
#

why don't most of the bigger forks (equicord, suncord, tobleronecord) merge into origin

flint bronze
balmy sky
#

WRONG!!!1

#

The answer is i'm lazy and don't really care that much

#

Also i would 100% find a way to screw it up

stone crag
#

hostile fork?

#

just learned waht that means

#

bruh doesn't this discourage open sourcing until u have a reputation already

swift delta
dull magnet
#

i wouldnt say its hostile

flint bronze
#

idk i was told the developer kinda hated vencord upstream stuff afaik

dull magnet
#

the owner is a nice person

flint bronze
#

but you are right it isnt hostile

swift delta
dull magnet
#

but there are some bad people involved in that fork, mainly coolesding

flint bronze
swift delta
dull magnet
#

thororen is cool tho

flint bronze
#

i mean they have my stuff in there blobcatcozy

dull magnet
#

theyre here @signal goblet

signal goblet
dull magnet
flint bronze
dull magnet
signal goblet
#

Cooles is only there because of userpfp

flint bronze
#

i think thats why i am confused about the fork as a whole

signal goblet
#

Literally the only reason

flint bronze
#

userpfp

dull magnet
#

oh i see

flint bronze
#

horror

dull magnet
#

it seemed like they had more involvement

signal goblet
#

And since I worked on userpfp (the plugin) back a few months ago

flint bronze
#

what even is the point is userpfp? animated pfps?

signal goblet
#

They are in equicord

signal goblet
#

Idrk

flint bronze
#

wtf do you mean idrk ๐Ÿ˜ญ you literally contributed to it

swift delta
signal goblet
#

I won't ban someone out of hate I need an actual reason tbf

#

Ofc I say that and now I need to go unban someone brb

#

Fixed

dull magnet
#

like i said

#

i think sqakoi misunderstood

signal goblet
dull magnet
#

huuh why

#

f53 so cool

signal goblet
swift delta
dull magnet
#

i love f53 blobcatcozy ||as a friend if that wasnt obvious||

signal goblet
#

But it was because of their reasoning of "I want x removed because this client isn't cute"

dull magnet
#

wtf is vencord unofficial

signal goblet
#

Donno

dull magnet
swift delta
dull magnet
brazen pumice
#

lmao nice

dull magnet
signal goblet
#

Anyways I gotta dip got work

swift delta
dull magnet
#

oh that

#

i think they dont like me (? /us ) cause i recjedted a bunch of their plugins

brazen pumice
#

lol

swift delta
brazen pumice
#

i only use my fork for customization cuz my plugins in it r stupid

swift delta
gloomy terrace
#

why does that look like the perfect recipe for disaster?

flint bronze
signal goblet
flint bronze
swift delta
gloomy terrace
signal goblet
#

Off topic but Eminem's Houdini song has a good beat

flint bronze
swift delta
flint bronze
# swift delta I honestly donโ€™t even remember where I put the server

Lol video leeks. We've gone off the rails...
Navigate Discord with nothing but a keyboard. Hit CTRL+K and type away.

The best communication app for yelling at your friends. Discord is the only free and secure all-in-one voice+text app designed for gamers that works on your desktop and phone. https://www.discordapp.com

Tweets: http://www.twitt...

โ–ถ Play video
#

such an abandoned feature

swift delta
flint bronze
#

sounds like new mobile app issue actually

swift delta
#

Bunny user Aliucord hater (joke about being a hater)

ruby turtle
#

SearchableSelect has a multi option that does not work

#

smh

ruby turtle
dull magnet
#

its just discord component

#

either discords component is broken (unlikely) or our types are outdated (more likely) or you're using it wrong (maybe)

ruby turtle
#

the value field only allows for a single SelectOption instead of an array of SelectOptions

vale spear
#

resolving git conflicts due to force pushes

#

lol most of these commits are updating the branch to remove git conflicts

dull magnet
#

there shouldn't be any conflicts

#

but also i recommend waiting a day or so before merging new changes to make sure it's not force pushed

#

or just base on main

vale spear
#

skill issue on my part

amber mantle
#

live on the edge

#

be used to nuckyz or v forcepush

cedar olive
#

yeah you are only gonna have conflicts if you depend on dev

amber mantle
#

dev2* (?)

#

love

#

well both

signal goblet
cobalt radish
#

hey, question, I'm planning to make a plugin based on one that already exists... that would be pretty much a replacement of the original one, would it be publishable? would it actually replace the original one?

tight canyon
#

Why not just update an original one?

cobalt radish
#

yea, im really wondering how that would work

#

Im planning on, based on the Anonymise File Names, make a Anonymise Files, which will include some features like stripping metadata

dull magnet
#

striping what metadata?

#

discord already strips exif on their server

cobalt radish
#

pnginfo

#

I just checked, it is not removed

#

and im paranoid about that now lmao

#

I don't want to replace the original plugin, but since it would be pretty muc hthe same thing with extra functionality..

#

anyway.. I'll make it for myself, maybe I come back some time to publish it =P

#

nvm, I just realized im stupid. I accidentally tested the same file 2 times instead of the file with metadata and the file uploaded on discord, discord do indeed remove it facepalm

granite dune
#

๐Ÿ™†โ€โ™‚๏ธ

granite dune
#

when a video hovered, there is a button, anyone know how can i add extra button there?

vivid hamlet
#

For @api/Commands, how would I give a required arg. I know RequiredMessageOption exists, but I have absolutely no clue how to add args to a slash command.

dull magnet
#

required: true

#

look at other commands plugins

vivid hamlet
#

I have been looking at them but as I said, not sure how to like actually add an arg

#

Or am I just stupid and cant read stx

#

tsx*

green vessel
#

ยฏ\_(ใƒ„)_/ยฏ

#

also suncord does merge into origin, it has auto merging actually (still hate conflicts i gotta resolve ๐Ÿ™)

vivid hamlet
#

Managed to find out how to add an arg, but now whenever I try to run the slash command:

Uncaught TypeError: (0 , s.default)[t.type] is not a function
    at Module.l (27519.e978630bea52e4d936cf.js:1:2781703)
    at 27519.e978630bea52e4d936cf.js:1:3190124
    at Array.map (<anonymous>)
    at Module.p (27519.e978630bea52e4d936cf.js:1:3190094)
    at 27519.e978630bea52e4d936cf.js:1:3170928
    at 27519.e978630bea52e4d936cf.js:1:3171131
    at Object.onKeyDown (27519.e978630bea52e4d936cf.js:1:3251503)
    at O.handleKeyDown (27519.e978630bea52e4d936cf.js:1:3208305)
    at tg (91463.9b4a57d4335d665553c8.js:12:1274496)
    at 91463.9b4a57d4335d665553c8.js:12:1270862

Get's spat out to the console

granite dune
#

show code

vivid hamlet
#

(the name is plugin.tsx cause I symbol linked)

granite dune
#

in general there is an issue with ApplicationCommandInputType

dull magnet
#

?

granite dune
#

i mean

#

simple type mismatch

#

what he did

granite dune
# vivid hamlet
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import definePlugin, { OptionType } from "@utils/types";
import { definePluginSettings } from "@api/Settings";

const getIpInfo = async (ip: string, apiUri: string) => {
    const response = await fetch(`${apiUri}?ip=${ip}`);
    if (!response.ok) {
        throw new Error("Failed to fetch IP info");
    }
    return response.json();
};

const settings = definePluginSettings({
    apiUri: {
        type: OptionType.STRING,
        description: "Place an IP Info URL here (Will be used when running /getinfo and /ip2map so make sure it is valid)",
        default: 'https://ipinfo.littlekai.co.uk/lookup',
        restartNeeded: false,
    }
});

export default definePlugin({
    name: "ipInformationCommands",
    description: "Adds commands to get information of an IP address. Make sure to abide by Discord's ToS whilst using this command.",
    authors: [
        {
            name: "Kai :3",
            id: 1205727693811879997n
        }
    ],
    dependencies: ["CommandsAPI"],
    settings,
    commands: [
        {
            name: "ipinfo",
            description: "Gets information on a provided IP.",
            inputType: ApplicationCommandInputType.BUILT_IN,
            options: [
                {
                    name: "ip",
                    description: "IP to get information on. Example: 1.1.1.1",
                    type: ApplicationCommandOptionType.STRING,
                    required: true
                }
            ],
            execute: async (args, ctx) => {
                console.log("Options received:", args);
                const api_uri = settings.store.apiUri;
                const ipOption = findOption(args, "ip");

                const ip = typeof ipOption === 'string' ? ipOption : String(ipOption);

                console.log("IP found:", ip);

                if (!ip) {
                    return sendBotMessage(ctx.channel.id, { content: "IP address is required." });
                }

                try {
                    const data = await getIpInfo(ip, api_uri);
                    sendBotMessage(ctx.channel.id, { content: `IP Information: ${JSON.stringify(data)}` });
                } catch (error) {
                    sendBotMessage(ctx.channel.id, { content: `Error fetching IP info` });
                }
            }
        }
    ]
});

try this

#

probaly still have some issue in this code, i just fixed the syntax error

tight canyon
#

Is there any way to catch notify before receiving a push? I want to disable it in specific cases

granite dune
#

i have refactorized ur code, also used a better api, cuz the one u used before is sucks, here we go boddie:

import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import definePlugin, { OptionType } from "@utils/types";
import { definePluginSettings } from "@api/Settings";

interface IpInfo {
    ipVersion: number;
    ipAddress: string;
    latitude: number;
    longitude: number;
    countryName: string;
    countryCode: string;
    timeZone: string;
    zipCode: string;
    cityName: string;
    regionName: string;
    continent: string;
    continentCode: string;
}

const settings = definePluginSettings({
    apiKey: {
        type: OptionType.STRING,
        description: "API key for FreeIPAPI (Leave empty if using the free plan)",
        default: "",
        restartNeeded: false,
    },
});

const getIpInfo = async (ip: string, apiKey: string): Promise<IpInfo> => {
    try {
        const url = `https://freeipapi.com/api/json/${ip}`;
        const headers: HeadersInit = {};
        if (apiKey) {
            headers.Authorization = `Bearer ${apiKey}`;
        }
        const response = await fetch(url, { headers });
        if (!response.ok) {
            throw new Error(`Failed to fetch IP info. Status: ${response.status}`);
        }
        return await response.json();
    } catch (error) {
        console.error("Error fetching IP info:", error);
        throw error;
    }
};

export default definePlugin({
    name: "idk",
    description: "idk",
    authors: [
        {
            name: "Kai :3",
            id: 1205727693811879997n,
        },
    ],
    dependencies: ["CommandsAPI"],
    settings,
    commands: [
        {
            name: "ipinfo",
            description: "Gets information on a provided IP.",
            inputType: ApplicationCommandInputType.BUILT_IN,
            options: [
                {
                    name: "ip",
                    description: "IP to get information on. Example: 1.1.1.1",
                    type: ApplicationCommandOptionType.STRING,
                    required: false,
                },
            ],
            execute: async (args, ctx) => {
                const apiKey = settings.store.apiKey;
                const ipOption = findOption(args, "ip");
                const ip = typeof ipOption === "string" ? ipOption : "";

                try {
                    const data = await getIpInfo(ip, apiKey);
                    const formattedData = JSON.stringify(data, null, 2);
                    sendBotMessage(ctx.channel.id, { content: `IP Information:\n\`\`\`json\n${formattedData}\n\`\`\`` });
                } catch (error) {
                    sendBotMessage(ctx.channel.id, { content: "Error fetching IP info." });
                }
            },
        },
    ],
});
#

response example with 1.1.1.1

{
  "ipVersion": 4,
  "ipAddress": "1.1.1.1",
  "latitude": 37.33939,
  "longitude": -121.894958,
  "countryName": "United States of America",
  "countryCode": "US",
  "timeZone": "-08:00",
  "zipCode": "95101",
  "cityName": "San Jose",
  "regionName": "California",
  "isProxy": false,
  "continent": "Americas",
  "continentCode": "AM",
  "currency": {
    "code": "USD",
    "name": "US Dollar"
  },
  "language": "English",
  "timeZones": [
    "America/Adak",
    "America/Anchorage",
    "America/Boise",
    "America/Chicago",
    "America/Denver",
    "America/Detroit",
    "America/Indiana/Indianapolis",
    "America/Indiana/Knox",
    "America/Indiana/Marengo",
    "America/Indiana/Petersburg",
    "America/Indiana/Tell_City",
    "America/Indiana/Vevay",
    "America/Indiana/Vincennes",
    "America/Indiana/Winamac",
    "America/Juneau",
    "America/Kentucky/Louisville",
    "America/Kentucky/Monticello",
    "America/Los_Angeles",
    "America/Menominee",
    "America/Metlakatla",
    "America/New_York",
    "America/Nome",
    "America/North_Dakota/Beulah",
    "America/North_Dakota/Center",
    "America/North_Dakota/New_Salem",
    "America/Phoenix",
    "America/Sitka",
    "America/Yakutat",
    "Pacific/Honolulu"
  ],
  "tlds": [
    ".us"
  ]
}
#

idk why u need this and for what, but okay

tight canyon
granite dune
#

sorry blobcatcozy

granite dune
#

why husk 516395crythumbsup maybe someone learn something new from this :c

flint bronze
#

I love husking idk

granite dune
#

looks so scary

#

๐Ÿคญ

honest stump
granite dune
#

u can check wha inside

honest stump
#

im joking

granite dune
worthy frost
#

tryna add custom style to a name, and the name element successfully changes, but for some reason the style isnt added, any idea why? (if someone replies, if you could ping me, that would be great)

tight canyon
tight canyon
dull magnet
#

patch the shouldNotify function

tight canyon
#

Thanks

jovial crystal
#

is there a plugin which shows me all my friends connections as a network graph? i could help develop it!

sand ember
#

I am not fully sure what do you want, but it probably would require mass-fetching common friends for all your friends, which could count as selfbotting

clear parcel
#

idk if this would be better as a plugin or snippet

#

probably a first party plugin isnt the best idea

scenic stirrup
#

small thing was figured out about the user volume
if you put it above 100%, it just resets to 0

cold flax
#

Is there a way to overwrite the function of the update discord button to run a script I have locally stored on my machine?

#

my reasoning for this is after restarting discord for the update, i have to manually run the script which updates everything and builds vencord

left kernel
#

Is there no way to create and test a plugin without having to recompile all of Vencord? I just wanna get rid of the "Activity" section.

left kernel
# viral roost that can be done with css

I'll ask in Theme Development then, but I was under the impression there's no way to hide it using CSS since it doesn't really have any selectors they just dumped it in with the members list. It's not even it's own div.

viral roost
#

oh

#

that activity thing

#

not sure about that one

flint bronze
#

also correct me if I'm wrong, but there is supposed to be a dismiss button for that

#

idk what discord was doing but there is no way to get it back afaik shiddohwell

safe glade
flint bronze
#

(afaik)

#

could've changed

left kernel
flint bronze
#

sounds about right

safe glade
#

sounds like discord

left kernel
iron epoch
#

I have this code, should I care about generating a new id or leave it?

proud parrotBOT
#

index.tsx: Lines 98-104

if (field.name !== "channel_id") { return; }
message.echoed = true;
message.flags = /* ephemeral */ 1 << 6;
message.author.bot = false; // making sure the bot badge don't show up (a bug from discord)
message.channel_id = field.value;
message.id = Array.from({ length: 19 }, () => Math.floor(Math.random() * 10).toString()).join(""); // generating a random id
sendBotMessage(field.value, message);
dull magnet
#

don't do that

#

there's a function createBotMessage

iron epoch
#

and what the diffs

granite dune
#

interesting question

#

some madness and badness combination

flint bronze
iron epoch
flint bronze
#

not even that

iron epoch
#

then no idea of what you mean

flint bronze
#

from experience trying to send fake messages on the client; the client can use that author data to update the instance of that user in the store

#

it has lead to funky things for me in the past be careful with it

#

one time I accidentally renamed my friend to clyde because of it

iron epoch
#

ah okay

#

not what I was thinking but had thought of the same effects

dull magnet
#

just use createBotMessage omg

iron epoch
#

but alr..

flint bronze
fleet flax
#

hi, is there somehow a tutorial how plugin development for vencord works?

flint bronze
#

theres a few pages about it in that same directory

#

uh

fleet flax
#

ok thx

flint bronze
#

take a look in the docs directory

fleet flax
#

oh and another question but i dont know if this is the right place for it... why does the plugin TextReplace don't use the settings file fo it's expressions to store them?

flint bronze
#

idk blobcatnom

#

some people love datastore for some reason even though you can technically set arrays and objects in settings

#

datastore downside is no settings sync huisk

fleet flax
flint bronze
#

datastore is just a wrapper for IndexedDB btw

flint bronze
#

lol what

#

????

dull magnet
#

not anti feature

#

but possibly sensitive

iron epoch
#

I am playing the guessing game to know how and where to put createBotMessage

iron epoch
#

so


message.echoed = true;
sendBotMessage(field.value, {
    ...message,
    bot: false,
    flags: /* ephemeral */ 1 << 6,
    channel_id: field.value,
    id: generateId(),
});
#

that's the limit ig

sand ember
#

what did happen here

amber mantle
#

settings is also just meh

#

no arbitrary data right now unless u store it in a string or whatever other optiontype

#

gotta make ui for that too

elfin geyser
#

so i need to get a user from the id, ways? how?

#

well it cant be that much different from channelStore...

jagged briar
#

UserStore

elfin geyser
#

wait you can do that?!

#

well isnt that a good thing to know (im referring to the console btw)

elfin geyser
# jagged briar

so banner is undefined until i actually click onto a users profile (which kind of ruins my idea),
ideas maybe on how to get around that?

jagged briar
#

not sure

amber basin
#

what are you trying to make

elfin geyser
elfin geyser
#

just idk if the api is gonna be super happy when someone loads like 50 friends at the same time... Talking when i do 3 requests in the same hour it complains

amber basin
#

ill just add that to my plugin

#

look for bannerseverywhere in the prs

flint bronze
#

wait

elfin geyser
#

hmm that looks cool

flint bronze
#

where are you putting the banners

elfin geyser
#

i had an idea like bannerseverywhere

#

just obviously it exists so i dont actually have to spend an hour trying to make it

flint bronze
elfin geyser
#

im mainly just trying to learn more on how to make plugins...

flint bronze
#

is there anything you're struggling to understand

fallen flint
#

vencords plugin api is nice asf imo, only issue ive ever really ran into is one niche thing with context menus

elfin geyser
#

the lack of docs makes it an itsy bit hard to understand but typings are there to save the day

flint bronze
#

@elfin geyser do you know about the \i regex that vencord adds

elfin geyser
#

"oh ill just check the do--"

#

there is none.

flint bronze
#

the docs:
how to setup dev environment
random shit that assumes you know what you're doing
more random shit that assumes you know what you're doing

fallen flint
# flint bronze which is?

for checkboxes - it didnt automatically update the ui becuase the context menu doesnt rerender until you hover or close and open etc... and you can't pass custom components either

flint bronze
#

yes you can

fallen flint
fallen flint
flint bronze
#

Yop

fallen flint
#

when i tried it threw an error

elfin geyser
#

the docs:
how to install and build in the most detail possible
... Now coding plugins? Hahahahaahh... Good luck.

fallen flint
#

is there an example?

flint bronze
#

well at least I remember its possible

#

what is the code you have for that?

elfin geyser
#

microsoft api docs...

dull magnet
#

you just need to use a hook like usual

flint bronze
# elfin geyser ... No?

okay; regarding vencord's patch system, it uses regex to match sections of code to replace
vencord adds a hacky \i operator for matching keywords and variable names

dull magnet
#

also tbf if you need extensive docs to understand how the api works then you are in the wrong project

flint bronze
#

it is very useful

elfin geyser
#

yeah see ive been using flux for 99% of things instead of patches

flint bronze
#

hot take but some docs just feel like typings for browsers

flint bronze
#

if you can do something with flux events and vencord's built-in apis then you should

dull magnet
elfin geyser
#

wonder what this does...

flint bronze
#

i dont know and i have never seen that before

#

oh its a flux event

#

probably some captcha thing

elfin geyser
#

verifying that it failed

#

thats what i got out of that

flint bronze
#

huh

#

seems like its used for verifying new sessions (authorizing IP address) and payment 2fa where it sends you an email so someone cant just hack your account and buy nitro gifts

dull magnet
#

just ignore stuff that you don't understand

#

it's irrelevant usually

flint bronze
#

real

dull magnet
#

this is you

flint bronze
#

also, discord minified code too confusing? find what imports it and hack that to your needs instead

fallen flint
# flint bronze what is the code you have for that?
let enabled = false;

const Component = () => {
    const [_enabled, setEnabled] = useState(enabled);

    useEffect(() => {
        enabled = _enabled;
    }, [_enabled]);
    
    return (
        <Menu.MenuCheckboxItem
            id="example"
            label={"Example Checkbox"}
            checked={_enabled}
            action={() => {
                setEnabled(!_enabled);
            }}
        />
    );
};

const ContextMenuPatch: NavContextMenuPatchCallback = (children, ...args) => {
    if (!children.some(child => child?.props?.id === "example")) {
        children.push(
            <Menu.MenuSeparator />,

            <Component />
        );
    }
};
dull magnet
#

read the error message

flint bronze
#

huh

dull magnet
#

you can't use custom components

fallen flint
dull magnet
#

get rid of the extra component

flint bronze
#

also there is no real need to anyway

fallen flint
dull magnet
#

put it inside your patch function

flint bronze
fallen flint
flint bronze
#

if you need react hooks you can just define them in your patch callback function

fallen flint
#

thank you guys lol sorry for my stupidity

flint bronze
#

its okay

#

i had a dum moment too

hushed loom
#

i am trying to make a plugin and the devtools keep hanging whenever i click on the source tab

#

has anyone experienced this before

hushed loom
iron epoch
#

oh, I have never experienced that

#

gl

hushed loom
#

is it possible to add css to a plugin

amber mantle
#

yes

hushed loom
amber mantle
#

add it to your plugin folder and import it

flint bronze
#

do note: that css is loaded even if your plugin isnt

#

so be careful with your CSS selectors

hushed loom
#

Thanks both of you

daring obsidian
#

hey new year. i just made the switch from better discord to this and am so far loving it, it has pretty much all the features i used and then some>
but there is one plugin im missing and am just curious if im just missing something that has this function
is there any plugin for vencord that provides the ability to add custom notification sounds

iron epoch
daring obsidian
#

ah damn

iron epoch
#
  • stock feature
#

its going to be on discord soon nvm we are not sure

daring obsidian
#

nitro only i assume

iron epoch
#

ye

daring obsidian
#

sadness

balmy sky
#

There's a pr that already exists for it

#

Probably won't be continued now, and will just be added to fakenitro

silent edge
balmy sky
#

Oh yeah true

#

I didn't consider actually adding custom sounds

silent edge
#

like isnt the discord one just a preset u can choose for certain servers

balmy sky
#

I think you can change it on a global level too

silent edge
#

and its only notification sounds

#

the plugin can change most sounds in the client

iron epoch
silent edge
#

so that includes vc sound effects and some other stuff

#

i feel like the plugin itself is already mergable unless theres somethin wrong with the code, been working fine for me for a while now on my dev install with no issues

iron epoch
#

reviewing code takes a while, + having a pr every single day to review, is suffering

finite beacon
#

I would love to be able to change the mute and deafen sounds too

daring obsidian
#

oh sick

#

thanks if someone actually adds it

worthy frost
#

would there be any way to simulate a profile popup? like build a modal thats formatted similar to this?

#

(if anyone replies, please ping)

subtle sandal
#

test message 1

#

test message 2

#

any way i could add the same badge into here?

#

really unsure which one to use

balmy sky
#

None of them

#

You need to write a custom patch for that

subtle sandal
#

any idea which plugins use that?

heavy isle
#

just overwrite the time

#

custom patch is part of a plugin you need to make

subtle sandal
balmy sky
#

The source code is the documentation

heavy isle
#

real

#

regex is wild

#

I just looked at other plugins

subtle sandal
balmy sky
#

ok so speaking of regex being wild, i'm trying to optimise patch i made- right now all of the variable names are hardcoded and looking at other patch logic or the cheat sheat really doesn't explain anything bruhcat

#

Could anyone give me pointers on how to not be stupid

jagged briar
#

\i matches variable names

#

$& will insert the match in your replacement so you dont have to write it out

#

if you need to use a variable from the module then use $n where n is the capturing group number

tight canyon
#

Settings > patcher helper kinda explains it and shows the result with diff

jagged briar
#

and yeah the patch helper cheat sheet is really helpful

tight canyon
balmy sky
#

Alright that makes sense

#

This is the webpack module code of the patch right now, i've replaced the variable names with \i and used $& to insert the patch, but i still don't understand how to get the name of the g variable from the function

flint bronze
#

Use arguments[0].property

#

like arguments[0].message

jagged briar
#

how did i not know about this

tight canyon
#

Or you can use =(\i) in regex and $1.message in replacement

#

But using argument is really easier

jagged briar
#

i was gonna say make your patch match that

#

yet another random javascript feature

flint bronze
#

useful though trolley

tight canyon
flint bronze
#

I didnt even read that blobcatnom

tight canyon
safe glade
balmy sky
#

YEAHH IT WORKS

#

Let's go

#

Thanks guys :3

#

So i'm doing the second patch now, and i'm trying to get the channel value of the parameter (passed as e), but when i log arguments[0] it's a module seemingly?

#

This is what is logged

jagged briar
#

try logging all of the arguments, that might be this or something idfk

safe glade
#

arguments[1] perchance?, [0] might be this, if it's in a class, yeah

jagged briar
#

I tried it and it wouldnโ€™t be this so idk

cedar olive
#

it's be gonna be complicated to explain but add this at the end of your match (?<=channel:(\i).+?)

#

that should get you the channel as the last capturing group blobcatcozy

chrome elbow
#

the 2nd patch isnt inside the $(e) function lol
it is in the arrow function below that

cedar olive
#

scratch my solution then

balmy sky
#

I know it's not much help but most plugins use findbyprops or another findby function to get a component

#

Then you can just use the exact same thing and pass the relevant parameters

worthy frost
#

alright, tyty, ill look into that

balmy sky
#

Ignore the console.log in that i forgot to remove it ๐Ÿ’€

safe glade
#

can you console.log arguments[0] and arguments[1]

balmy sky
#

But yeah i will log 1

safe glade
#

also the hell is that screenshotting tool thingyโ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹

balmy sky
#

Codesnap on vscode

junior cove
#

Is handy. It matches your vscode theme, and you can customise it to remove all the bits and bobs like the border and the mac buttons

safe glade
#

just screenshot the code with a normal screenshotting tool or post it as a codeblock?

junior cove
#

The pictures make it a whole lot easier for people on mobile to read, I guess. The extension also makes them good deal cleaner than if you were to do the selection manually

tight canyon
safe glade
#

it may not show, arguments is not just an array IIRC

chrome elbow
safe glade
#

TIL

safe glade
#

but function $(e) {...} is not an arrow function, unless I'm dumb and I can't see something

balmy sky
#

It's not

#

But that's not the component

#

The component is inside of that function

balmy sky
#

Yop

stone shuttle
#

are plugins allowed to have local assets? like images or sound files

viral roost
#

afaik if you try to add any local assets with a plugin they just wont get bundled in

#

and if you just wanna pull smth from your drive for personal use i doubt u can do that from chromium

stone shuttle
#

o okay i'll host it somewhere else just in case then

#

thx

safe glade
#

use base64 blobs โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹โ€‹:3

hushed loom
#

hello, what is the difference between the AFK and IDLE flux events?

#

also what would be the best one to use for when the client is idle (not the status)

granite dune
balmy sky
#

So i'm trying to patch this return statement to add another element to the children, but i don't know how to identify that specific return, since there's a bunch of almost identical functions in the same module. I tried to use a lookbehind to check for .ModalContentContext.Provider, (its unique) but the patch just has no effect

jagged briar
#

well your patch is deleting everything leading up to children:, and then probably makes a syntax error cause it inserts $self.extraContent() and doesn't do anything to replace the old child

balmy sky
#

OH

#

Wait i'm stupid

#

Can i do a lookbehind that just checks if it's there any doesn't include the whole thing in the match?

jagged briar
#

just use a capturing group to put it back in the replacement

rocky falcon
#

oh- i can send messages here? neat.

strange ferry
#

dont need support but reporting GameActivityToggle / Game Activity Toggle no longer can hide PreMiD's activity(s)

flint bronze
#

lets them do more stuff compared to discord rpc server in stock clients

strange ferry
#

ahh ok i figured that, the new system. thanks for the details

flint bronze
#

๐Ÿ˜ญ why is this my browser autocomplete

#

@clear parcel what did you do

strange ferry
#

lmaooo

flint bronze
#

discord dot sex so good

strange ferry
#

yea but you got protection?

flint bronze
flint bronze
#

yes this happened to other people before

#

dont ask about it husk

strange ferry
#

so condom level not birth control yet

flint bronze
clear parcel
hushed loom
#

how would you store simple key-value pairs that persist

balmy sky
#

You can use datastore

#
Datastore.Set("keyname", value);
#

Caps may be wrong

hushed loom
balmy sky
dull magnet
#

either settings or datastore

hushed loom
#

im pretty sure i'll need datastore

hushed loom
#

how would someone open a file picker/have a user load a file

#

ive tried the electron dialog but i cant figure out how to import it

hushed loom
#

oh ๐Ÿ˜ญ my dumbass only thought of the vesktop source location picker thing, then failed to find it

stone crag
delicate kraken
#

[re-asked from #๐Ÿฅ-vencord-support-๐Ÿฅ ]

ok so i wanted to ask a question but i dont really know where to actually ask.

its about creating plugin for vencord, i've followed this guide from github, and i've followed every single step shown.
https://gist.github.com/sunnniee/28bd595f8c07992f6d03289911289ba8

but it seemed im very lost at the part of "looking element".

which ever element im looked (the pic in particular), i could not find the same line of code that has "EMOJI_POPOUT_STANDARD_EMOJI_DESCRIPTION" through react dev tools, however, it is indeed exist in the same source code if i searched it through "ctrl+F".

so could anyone enlighten me in these matter? Thank you in advance.

Gist

GitHub Gist: instantly share code, notes, and snippets.

#

This is what i've got from selecting the element from the guide

#

this is what the guide shows (it looked like it) crycat~1

balmy sky
#

How can i get an array of members with a role from the role ID? the only information i need is the member ids

rocky falcon
#

is the settings icon located in some variable somewhere? or do i gotta grab the path and make it myself

balmy sky
balmy sky
dull magnet
#

look at support helper

#

well that's for one single member

#

look at the role objects and check how the guild role settings tab gets role members

balmy sky
rocky falcon
#

how would i get the current notification settings for a specific guild?

#

theres probably a findbyprops i can use, i just cant find it

junior cove
#

Should all be stored in the UserGuildSettingsStore

dull magnet
#

oh its an api call

balmy sky
#

Yeah i saw that

#

I was thinking of calling the api manually but i don't know if that's dodgy and potentially bannable

#

Because the method definitely exists

dull magnet
#

pretty sure u need some mod perm

#

like manage server or view audit log

balmy sky
#

I think i'm going to hell for writing this but it works for some reason

swift delta
flint bronze
swift delta
flint bronze
#

so

#

they remove the updater tab

#

but not the updater

#

did they remove the update modal

#

if you have auto updates off

#

but checking on

swift delta
#

iโ€™d assume forceful auto update

#

plus if you hide that tab, then people canโ€™t know exactly whatโ€™s updating without going to the GitHub and the average person isnโ€™t gonna bother with that

balmy sky
#

Instantly disqualified

swift delta
balmy sky
#

Add files via upload

tight canyon
swift delta
balmy sky
#

This is so great

swift delta
swift delta
balmy sky
#

NO I WANT THEM TO BE REMOVED

swift delta
#

this is the best part too this whole page

balmy sky
#

- languages
- css

misery

swift delta
#

does it count as programming if the most you know how to do is say โ€œHello Worldโ€

granite dune
#

he uploaded the whole vencord zipped folder to ai

#

with a prompt like

balmy sky
granite dune
#

refactorize the code

dull magnet
#

why ping them

#

you're basically just bullying them at this point

#

kinda uncool

swift delta
#

iโ€™m sorry for ping them

granite dune
#

mhm nice save, nice ๐Ÿ‘ฏ

subtle sandal
#

any way i could recieve and send http requests via a plugin?

dull magnet
subtle sandal
#

i want to delete the icon when i send an http request

#

just realized it sounds like im making a malicious plugin

#

gg

gentle tulip
#

Hello, I saw the new plugin MaskedLinkPaste and I got inspiration to do something similar, but when you type a character instead. E.g. wrap something in parentheses or backticks when you type `` or(`, similar to how VSC does, however I'm a bit lost on these Transform things, and can't seem to detect a single character being inserted whilst I have something selected. I've just been messing around with the afforementioned plugin's source, but perhaps that's not the right approach, since that does stuff when things are pasted. https://leo.might-be.gay/YXRABQ.gif

jagged briar
#

add an event listener for keydown and handle it if its ` or (

scenic stirrup
#

hmm

#

trying to figure out what i need to do with this volume booster is a goddamn nightmare

#

all of the audio in a call is easily accessible as a single audio track

#

but i need each user individually

#

to apply a gainNode

#

bcaFedupUghh time to dig more

dull magnet
#

xd

#

u got this!!

stable moss
#

dndrop is fucking stupid

#

please someone spare my life

dull magnet
#

what u trying to make

stable moss
#

But

#

When you drag after the first time

#

the reference doesnt update

#

lemme make a draft pull

dull magnet
#

ohh i see

flint bronze
#

i love when people fix discord's own lack of quality of life functionality โค๏ธ

stable moss
#

I think

#

I have it

#

Memoization

#

fuck

#

react

#

still doesnt work perfectly

scenic stirrup
# dull magnet u got this!!

ive been waiting for one of my friends to join call so i can test
they said they'd join when they woke up
they just woke up
its currently 5pm

#

oml

dull magnet
#

test with ur alt lmao

#

thats what i do

swift delta
scenic stirrup
stable moss
#

Okay

#

fun

#

my plugin works, but, I need help making my patches not suck ass

balmy sky
proud parrotBOT
iron epoch
subtle sandal
#

any way i could add the same badge into here?

#

test message 2

#

maybe replace the timestamp?

#

everything i have is this

#
return (0, i.jsx)("span", {
                className: s()(n, A, {
                    [d.timestamp]: !0,
                    [d.timestampVisibleOnHover]: c,
                    [d.timestampInline]: I,
                    [d.alt]: E
                }),
                children: (0,
                i.jsx)(a.Tooltip, {
                    text: (0,
                    l.dateFormat)(_, "LLLL"),
                    "aria-label": m,
                    tooltipClassName: d.timestampTooltip,
                    delay: 750,
                    children: e=>(0,
                    i.jsx)("time", {
                        ...e,
                        id: T,
                        dateTime: _.toISOString(),
                        children: null != t ? t : (0,
                        i.jsxs)(i.Fragment, {
                            children: [(0,
                            i.jsx)("i", {
                                className: d.separator,
                                "aria-hidden": !0,
                                children: r ? "[" : " โ€” "
                            }), h, r && (0,
                            i.jsxs)("i", {
                                className: d.separator,
                                "aria-hidden": !0,
                                children: ["]", " "]
                            })]
                        })
                    })
                })
            })
#

although no idea on how to clone a reference to that exact timestamp position

#

(if it's even possible to cloneref an icon from one point to another)

#

any ideas?

swift delta
# iron epoch looks fishy

real, but also most of these are fake and the only thing on them is when they were created as like one or two changes to make it look like theyโ€™ve done a lot

subtle sandal
#

anyone?

iron epoch
subtle sandal
iron epoch
subtle sandal
#

i was talking about that thing with a different guy too

#

he helped me to find out the thing

iron epoch
subtle sandal
#

oh come on, don't you have that?

iron epoch
#

I don't always have vencord in my packets

subtle sandal
#

fair enough

orchid linden
#

i want to disable this anyone have plugin?

safe glade
#

just click cancel

subtle sandal
flint bronze
#

what is that icon even for?

gentle tulip
jagged briar
#

this is just a basic vanilla js way of doing it so you'd probably have to find a proper way to modify the state of the message input component

gentle tulip
#

aha, .value! thanks.

#

nvm, it's undefined

jagged briar
#

yeah your gonna have to hack your way into the input component

median flare
#

if you are this lazy you do not deserve any of the little oxygen you are using /hj

subtle sandal
jagged briar
balmy sky
#

I'm trying to make a plugin that removes server profile pictures, by patching the message object then replacing the avatar value with the global pfp, if i log the author object of a message, it seems the avatar is stored as a hash type string instead of a URL like i expected. How can i get the (non server) profile picture of a user in the same format? i looked in the user object type definition but i'm not sure, it could be getAvatarSource potentially

amber basin
#

if youre patching it out set the server avatar to null

#

itll fallback to the global one

balmy sky
#

Wtf it's that easy?

#

I'll try that, thanks

#

Is the server avatar property just author.avatar or is there a specific field that i somehow missed

#

I DON'T THINK IT'S THAT ๐Ÿ’€

amber basin
#

UH OH

#

then youre patching global avi

#

not server

balmy sky
#

Oh i could very much be patching the wrong component actually

#

I'll try pick a different one

balmy sky
dull magnet
#

theresa pr alr

#

for removing server pfps

balmy sky
#

WHY DO I NEVER CHECK THIS SHIT BEFORE NAH

#

Welp rip

vital mist
#

It's possible to add custom react components to plugin settings, right?

#

I want to add the keybind customization button from the actual Discord settings to my plugin

nimble laurel
#

currently working on a deuteranopia filter since discord won't do it

kind pike
#

at this point ive gotten so used to seeing the colors differently that the filters look weird to me

#

i just go based off memory husk

nimble laurel
kind pike
#

yeah lol

nimble laurel
# kind pike yeah lol

could you say if the color correction actually makes a significant difference for you?

nimble laurel
#

i'm relieved

kind pike
#

i think you could do somerthing similar with css

nimble laurel
nimble laurel
nimble laurel
kind pike
#

you could use a generator to quickly generator a full sheet for it

nimble laurel
#

i see, but is there any specific incentive turning it into css? other than turning it into a theme i guess

kind pike
#

well, seeing that the only way to currently implement js snippets is thru dev mode, having a theme alternative may be helpful

nimble laurel
#

would be good to have this to be more accessible

iron epoch