#🪅-progaming
1 messages · Page 4 of 1
i feel like it's better to mark things as deleted
that will happen in like 1/1000 cases
or noo... pretend they don't exist when they've expired
that too
and when that happens then just call the cleanup
end user will never know
there might be a library for this
how does oceanic and discord.js handle caching
surely it doesn't just keep users forever
are you seriously writing a discord bot without a library
you will cope very hard when i tell you d.js has callbacks for message interaction buttons btw
now
cope
i'm using oceanic.js
(i dont use oceanic)
all i know about oceanic is that it is better than d.js for some reason
what is better about it do tell me
more lightweight
if you look at big bots you'll see they usually use eris instead of discordjs
but eris is prehistoric
oceanic.js is like an alternative i think
this is not what you want
oh wow
INTERACTION COLLECTOR
Vee ripoff wtf
i figured it out ```css
@keyframes animation {
from {
transform: translateY(25%);
opacity: 0;
}
to {
transform: translateY(0%);
opacity: 1;
}
}
@media not (prefers-reduced-motion) {
h1 {
transform: translateY(50%);
opacity: 0;
animation: animation 400ms ease-in-out 100ms forwards;
}
main :not(h1) {
transform: translateY(50%);
opacity: 0;
animation: animation 400ms ease-in-out 200ms forwards;
}
}
i did this once

in go
implemented basic gateway myself
horror
i thought it would be funny to make another discord bot lib for js
but caching :pain:
maybe this could be more efficient if you stored an array and a map
and the array had most recent stuff at the start so it could stop once the expiry condition isn't met
what even.. why even

so many things what is happeninggg
was messing around with the remix boolean on the attachment object
this shit
is so fucked up
txt file
video
What the fuck
@royal nymph hiii!! haiii :3 heyy haiii!! hiiii!!!
also custom ids need not be strings, they can be any bytes
use compat binary representation, this is too bloated
nah i think a ttl map wil suffice
this is what i use to have a map of message ids => message ids to handle command edits, you can use this to hold message ids => callbacks
🤫
🤫 🧏
is there any way to do live collab in unity? I wanna make a project with my friend and i'm not sure how to do that together

there's codetogether for vscode, not sure how well it works with unity
liveshare better innit
i wouldnt know
Hi guys, I have this powershell script and im having trouble defining $outputfile for each $file from $files
`cd "J:\Yuki\Media\test"
$path = "J:\Yuki\Media\test"
$files = Get-ChildItem "$path" -Recurse -Filter *.flac -Name
$file = Get-ChildItem $files
$outputfile = "$file" -replace '.flac'
foreach ($file in $files) {
.\opusenc --bitrate 384 --vbr --comp 10 --framesize 40 --expect-loss 0 "$file" "Output$outputfile.opus"
}`
I literally don't know anything about powershell and im just stuck
What I want to achieve is to have every output file in corresponding path from source file, but in different end folder without .flac in the filename
I also wondered if I can make it queue on next cpu thread for any next file, for instance by setting affinity mask for certain powershell process ? I mean f.e. on 12 thread CPU it can queue operation for 12 files, then after single thread ends, just queue next file
welp @royal nymph my webrtc impl reaches 50MB/s
its a drop in replacement for google's
[outside of media tracks]
which reaches 30MB/s
while raw TCP does 150MB/s
wdym "google's"
i mean googles webrtc implementation in JS?
the "drop in" should be implied
isnt webrtc spec written out by ietf
saying "drop in for google's" makes no sense
okay its by w3c
same thing nonetheless
no, its the W3C spec for webrtc for JS
que
i didnt implement the network stack
i implemented the w3c compliant interfaces
so if you have any library which uses https://devdocs.io/dom/rtcpeerconnection in browser
or on node if you compiled and embedded google's library there
you can instead use my library
my point was comparing it with a webtrc implementaion by google doesnt make sense
since the spec is listed out by w3c it being compliant by other implementations (and compliant with the spec) is expected if not a must
and it will work the same, while being faster
it makes sense
because its faster
and smaller
okay
by sacrificing adaptive codec handling
instead it just pushes raw RTSP media data
without adaptive encoding
but thats for media
even its raw data transfer is faster
so its trading features for speed?
not really?
it just lacks features
but the features it lacks, dont give it the speed edge
its just faster at its core, even if those features were there it'd be faster
for now they arent
aka adaptive streaming isnt there
function o(e, t, n, o) {
(0,
i.setIncludeNSFW)(t, e),
o && (t.search_everywhere = !0);
let u = Object.keys(t);
a.default.trackWithMetadata(r.AnalyticEvents.SEARCH_STARTED, {
search_type: l.default.getSearchType(),
prev_search_id: l.default.getAnalyticsId(e),
num_modifiers: u.length,
modifiers: u.reduce((e,n)=>{
let s = t[n];
return e[n] = Array.isArray(s) ? s.length : 1,
e
}
, {})
}),
s.default.dispatch({
type: "SEARCH_START",
query: t,
searchId: e,
queryString: n,
searchEverywhere: o
})
}
Code for search sends tracking requests, if i want to dispatch search start myself do i add these?
no
see where it says dispatch thats all you care about, everything else is junk
wait how do i clear searchbar
wdym by clear?
clear the state... ?
oopsies
:3
would anyone know how to fix this
oopsie i almost forgot
export default function Addons() {
//@ts-ignore
useProxy(settings)
const [selectedTab, setSelectedTab] = React.useState("");
const SelectedTab = () => {
switch (selectedTab) {
case 'Plugins':
return <AddonPage<Plugin> items={plugins} card={PluginCard}></AddonPage>
case 'Shaders':
return <AddonPage<Theme> items={themes} card={ThemeCard}></AddonPage>
}
}
return (
<RN.View style={{ flexDirection:"row", marginTop: 5, padding: 5, zIndex: 3, }}>
<Button
color={Button.Colors.BRAND}
size={Button.Sizes.MEDIUM}
look={Button.Looks.FILLED}
onPress={() => setSelectedTab('Plugins') }
text="Plugins"
/>
<Button
color={Button.Colors.BRAND}
size={Button.Sizes.MEDIUM}
look={Button.Looks.FILLED}
onPress={() => setSelectedTab('Shaders') }
text="Shaders"
/>
<RN.View>
{SelectedTab()}
</RN.View>
</RN.View>
)
}```
also uhhhh on another note
description style doesn't seem to work
card: {
backgroundColor: semanticColors.BACKGROUND_SECONDARY,
borderRadius: 7,
borderColor: semanticColors.BACKGROUND_TERTIARY,
borderWidth: 1,
},
header: {
padding: 0,
backgroundColor: semanticColors.PRIMARY_DARK,
color: semanticColors.HEADER_PRIMARY,
borderTopLeftRadius: 5,
borderTopRightRadius: 5,
fontFamily: constants.Fonts.PRIMARY_BOLD,
},
description: {
color: semanticColors.TEXT_MUTED,
fontFamily: constants.Fonts.CODE_SEMIBOLD,
fontSize: 12,
},
actions: {
flexDirection: "row-reverse",
alignItems: "center",
},
icon: {
width: 22,
height: 22,
marginLeft: 5,
tintColor: semanticColors?.INTERACTIVE_NORMAL,
},
})
export default function Card(props: CardProps) {
let pressableState = props.toggleValue ?? false;
return (
<RN.View style={[styles.card, { marginTop: props.index !== 0 ? 10 : 0 }]}>
<FormRow
style={styles.header}
label={props.headerLabel}
leading={props.headerIcon && <FormRow.Icon source={getAssetIDByName(props.headerIcon)} />}
trailing={props.toggleType && (props.toggleType === "switch" ?
(<FormSwitch
style={RN.Platform.OS === "android" && { marginVertical: -15 }}
value={props.toggleValue}
onValueChange={props.onToggleChange}
/>)
:
(<RN.Pressable onPress={() => {
pressableState = !pressableState;
props.onToggleChange?.(pressableState)
}}>
<FormRadio
selected={props.toggleValue}
/>
</RN.Pressable>)
)}
/>
<FormRow
style={styles.description}
label={props.descriptionLabel}
trailing={
<RN.View style={styles.actions}>
{props.overflowActions && <RN.TouchableOpacity
onPress={() => showSimpleActionSheet({
key: "CardOverflow",
header: {
title: props.overflowTitle,
icon: props.headerIcon && <FormRow.Icon style={{ marginRight: 8 }} source={getAssetIDByName(props.headerIcon)} />,
onClose: () => hideActionSheet(),
},
options: props.overflowActions?.map(i => ({ ...i, icon: getAssetIDByName(i.icon) })),
})}
>
<RN.Image style={styles.icon} source={getAssetIDByName("ic_more_24px")} />
</RN.TouchableOpacity>}
{props.actions?.map(({ icon, onPress }) => (
<RN.TouchableOpacity
onPress={onPress}
>
<RN.Image style={styles.icon} source={getAssetIDByName(icon)} />
</RN.TouchableOpacity>
))}
</RN.View>
}
/>
</RN.View>
)
}```
had to remove small bits of code to make it fit the character limit but it wasn't related to the issue
and here's what the cards look like
hey
i have this css code on my site
body {
background-image: repeating-radial-gradient(circle at 31rem 25rem, transparent 0, #47d3ff 50px), repeating-linear-gradient(#379bba, #379bba);
background-color: #47d3ff;
}
how can I make the background perfectly in the middle
wait cant i just use background-position
nop
im.
im stupid.
dont answer the question
How do I see the vencord guilds I am in?
Vencord.Webpack.Common.GuildStore.getGuilds()
I figured it out lol
what is this absolute horror of generics syntax
WHEN TF DID WE GET REPEATING rADIAL GRADIENTS
vendetta 
looks like someone forgor tsx is also accepted as script type for highlighting
@royal nymph can we make this a requirement to submit new plugins https://jimbly.github.io/regex-crossword/ /s
it only took me like an hour and a half to do
oh my god
its really weird to me that there isnt a way to get every string that matches a regex
(i do not mean /w+/.test)
(you provide regex and it generates a bunch of strings that match)
ig?
w+ matches w, ww, www, etc
gimme a random (hopefully decently simple) sorting algorithm to try my hand at
gnomesort (very simple, not horribly slow)
java, swift, v8 (nodejs / chromium), android
actually not heard of this one but i'll take a look
how have u not heard of timsort O.O
they don't teach you anything more than bubble sort in school
and it's never shown in any of those stupidly long sorting algorithm videos
i see
Bitonic Sort my beloved
insertion is pretty much the simplest out there, when .sort() was broken on some weird buggy online python thing i just made an insertion sort quickly to get round that
why do you need sorting algorithms when you can just array.sort() 😂
|| im so sorry ||
i'm doing it for fun at the moment
i wasn't being serious 😭
ah
I would never unironically use 😂
that's true
unless im chatting with my mum
idk why they teach bubble sort first in schools, it is really slow and isn't even the absolute simplest
you might get asked a question on your test paper about a common algorithm that uses a temporary variable when sorting a list, bubble sort is the answer
meanwhile that can be skipped entirely with a list.insert(i, list.pop(i+1))
now do bubblesort on plain c arrays
without the common list helpers you find in high level languages like push and pop
also wdym it's not simple i doubt it gets any simpler than bubblesort
what do you consider to be simpler?
that is true, this also happens to be a high level course
insertion or selection feels simpler to me
easiest sorting algorithm is time sort
to sort an array of positive, integers, spawn a thread for each element that sleeps n milliseconds then pushes to the output array

they dont teach multithreading so
it's so easy
yop
anything that's gonna be significantly different between languages they probably won't teach
today's unethical code
i wonder how slow this is
idk how to remove something in an ordered list without searching the whole list
is that even possible
binary search tree?
I wonder why they bother teaching anything besides mergesort or quicksort given how much faster they are. I get insertion sort could be a good introduction to the concept but why the fuck care about bubble sort when it’s inefficient. Hell, spend more time explaining why some algorithms CAN BE faster than merge sort on already partially sorted arrays
i mean it's not like purpose is to teach you the fastest algorithm
just about introducing you to the concept of algorithms and helping you understand specifically sorting
there's basically no reason to ever write your own sorting implementation when you can just use the stdlib or a more specific library for your use case
easy
i did this too but i dont recommend the now = ...; for (...){ if (isExpired(now, ...)) {...} } pattern, especially in iterators (forEach, map, Symbol.iterator, etc)
if you're doing an expensive task the succeding keys may have expired but the value of now is in the past, potentially yielding false positives
the alternative is not storing now so the value will change

ig it's a generator so it will potentially suspend
apparently mergesort is part of the GCSE curriculum, just my school doesn't teach it
there but optional
fr
this is so dumb
why
I don't know
I just liked the plugin so I ported it to bd for some reason
The scary part is that it works
I also shouldn't call it "inspired"
50% of the plugin is ported straight from vencord
really
pray that it's a linter thing and try to run it
Pylint
I wanna put my pkgbuilds on GitHub but idk how that would work
I found a GitHub action
Jumpscare
WHAT IS THAT
you
That is not me
its really easy
just push to both repos
@royal nymph you
why does go do annotations as comments
its dumb
no type safety or intellisense
@SomeFunction
no it's good
@royal nymph https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile did you know about this
vee is an enemy of mine
oh well
go is literally strictly typed
insane
doesn't stop you from putting // dndnfndnfn
bad design
nop
yop
why would it stop me from putting //
WHY DO YOU NEED TYPE SAFETY ON COMMENTS
its strictly typed idk what you are talking about
weird feature imo
if in browser you have to use proxy
if not browser then doesn't matter
if someone managed to bypass cors it would be security nightmare
yeah ill just use a proxy
do u control the server
why does it not set cors
i dont
if i would then i wouldnt have the issue
if you're needing to fetch for vencord, you can work around it without proxy
by fetching in nodejs
i will PR my modern replacement for messagetags never

😭


is this bad practice
OH
i meant to put guildID
thanks for reviewing my code

anyway tbh i'm using oceanic which uses camelCase and my bot uses snake case for its own stuff
and i need a way to use permissionsOf (that throws) even if the member isn't cached
idk whether you need to explicitly fetch the bot member
how would I go about pushing an online theme to the settings
i'm doing Vencord.Settings.themeLinks.push() which does work, the issue is the theme itself doesnt apply 🫠
also either im tripping or there's missing a )
**ThemesTab.tsx: **Lines 116-120
IS_WEB && (
<div style={{ cursor: "pointer", color: "var(--status-danger" }} onClick={onDelete}>
<DeleteIcon />
</div>
)
this is unrelated
source: was working in this file recently
make a new array and overwrite it entirely
[...oldarray, newitem]
let me try that, thanks
worked, thanks a lot
Banger
how do i prevent a user from accessing a custom setting tab after I removed it from customSections (tab wont disappear until reload/tab switched)
if they access that tab itll explod their discord

uh maybe code could help?
stop() {
(Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record<string, unknown>) => any)[]; }).customSections = [];
},
lol
start() {
const customSettingsSections = (
Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record<string, unknown>) => any)[]; }
).customSections;
const ThemeSection = () => ({
section: "ThemeLibrary",
label: "Theme Library",
element: require("./components/ThemeTab").default,
className: "vc-vesktop-settings"
});
customSettingsSections.push(ThemeSection);
},
stop() {
(Vencord.Plugins.plugins.Settings as any as { customSections: ((ID: Record<string, unknown>) => any)[]; }).customSections = [];
},
it works fine after switching the tab, but if you click the tab after disabling the plugin your discord explodes
don't set customSections to empty array you will explode vesktop and such
it shall explode
use splice to remove elements from array
@every1
is there a cleaner way of chaining two methods together that isnt just wrapping them both in an arrow function?
audio.addEventListener("ended", () => {next(); audio.play()});
this looks kind of ugly to me
ill just wait until the tc39 pipe proposal gets in i guess
you can also do this
audio.addEventListener("ended", () => (next(), audio.play()));
@glacial mirage
is it better? idk
how does that work lol
comma operator
return (console.log("asdfdsfads"), 1) // 1
it evaluates everything and returns the last one
oh odd
cursed stuff of the language
javascript never ceases to amaze me
cursed
also the bundler discord uses abuses it all the time
of course, i imagine this would be really good for minimizing
you can find things like
return something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
something(),
createReactElement()
and you can prob expect what is the return
what the hell
its called a SequenceExpression
as its name implies
its a sequence of expressions
it executes each, and returns the result of the last
Is there no secondary/gray button type for the button component or am i blind
oh
(property) Colors: Record<"BRAND" | "RED" | "GREEN" | "YELLOW" | "PRIMARY" | "LINK" | "WHITE" | "BLACK" | "TRANSPARENT" | "BRAND_NEW" | "CUSTOM", string>

nvm
tbh stuff like that i just like to avoid
shorter ≠ better
() => {
next();
audio.play();
}
it looks less ugly if you actually have one semicolon per line (which i think is the usual practice)
bad
also that probably won't work cause you're calling the instance method without an instance xd
simply do next() + audio.play()
fear
I lost send msg perms in #🧩-plugin-development
Can i have the programming role?
I was told I just have to ask for the role
did you have the programming role before?
no
I have image sender
and image sender had perms for sending msgs in plugin dev before, but not anymore
oh ty
how does vencord actually change the activity name dynamically?
SET_ACTIVITY flux event afaik
Take a look at CustomRPC source
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
what the
ya
i didnt know it also stops u from pushing with that mail xd
ig its a good feature
i enabled that switch cause i had some other emails linked to my account that i wanted private but i just ended up removing them
so i turned it off again
how does discord have live updates from the spotify player? i want to have live updates for a personal app im making
well damn
eric moment
you can still use the websocket and api with premium
its just that discord's client id/auth tokens are the only ones that let you do certain things for free
i know you can use api
its just a websocket
cause spotify's docs are and always will be dogshit
no?
i swear to god it is
actually i just realized stream deck has a spotify plugin that does what i need and they themselves say you need premium so it's def possible
not open source sadly
the guy who made it (BarRaider) is kinda the DevilBro of stream deck plugins lol
many plugins and half dont work
well sure
but thats proprietary / private api lmao
its not an open api
if u wanna go the official api route the only option is polling 
its the same shit discord does is it not?
why not use it anyway
using undocumented stuff is fun!!
there is not a single drop of documentation anywhere
there isnt for client modding either
literally impossible to use lol
well at least you have devtools
no examples with this lib?
and you do too on open.spotify.com
its not electron
oh?
it is
its just custom cef shit
ah
i thought it was at least
always has been, always will be
ofc u cant
have you ever considered that they host the ws server? https://toaster.sh/i/kwz8hkzp.png
me when my guc3 dealer is out of guc3 and only has crack
oh i thought it would be more like with discord
If you like Spotify, buy a Premium account and tell the industry that it's a great payment model for music.
is this genuine or do they want their github repo to stay on github
latter
considering you have idiots that lock a one line change behind a private fork of a library and a public ssh key
alright im just gonna do polling until i find a better solution
i love spotify <3 best platform in the world
just play cds with vlc and use MPRIS to track playback
oh wait i think that probably works with spotify too

probably something on windows too? :O
yeah windows has its own api
we love spotify not giving any numbers and just giving you a graph with no point of reference
although 1 req/s works fine and there's no rate limit so i think im chilling
lmao
yippie
nop
that would give the illusion that it's not just polling

fake it till you make it
it actually looks totally fine when it's running
is that the discord spotify plugin?
no it's a custom app i made
oh cool
just a reminder the entire godot engine is just on the Google play store
reminder that godot is cool as fuck
that is simply a fact
so I built one of my godot games with the mobile app
and it built faster than my pc built
literally outperformed by godot mobile
was it the same game?
i love when windows randomly decides a file i just created shouldn't be deleted
it just said that i need an admin to delete it
(i am the admin)
anyway time to fight with gh workflows again
I might make an iframe plasmoid to use this lmao
Literally built into stock KDE what are you talking about.
Just modify the existing one to not have an address bar
Why is this querySelectorAll not working when the same thing used as in css works fine
javascript: (() => {
var maxScore = 0;
var yourScore = 0;
var items = document.querySelectorAll(".contentListPlain .clearfix.liItem.read .contentListRight .taskbuttondiv");
items.forEach(function (item) {
var textContent = item.textContent;
console.log("text: " + textContent);
var match = textContent.match(/([\d.]+) out of ([\d.]+) points/);
if (match) {
totalScore += parseFloat(match[1]);
maxScore += parseFloat(match[2]);
}
});
alert(`max: ${maxScore} your: ${yourScore}`);
})();
.contentListPlain.clearfix.liItem.read .contentListRight .taskbuttondiv try this
still doesnt work
I had a bookmarklet that worked, but it recently stopped working, and it sucked bc I didn't know how to write bookmarklets when i first "made" it so it was mostly made by chatgpt, so I'm just rewriting it
idk why it stopped working though
doesn't seem like the classes changed
hello friends, can i ask for some opinions on this app i'm considering making?
i mainly want to know a couple things:
- what programming language would be best suited for this application?
- is there anything in the description/mockups i should consider changing/amending?
- is vscode suitable for creating this application?
not too worried about whether i know the language(s) suggested, i want to create this project purely to learn how the language i ultimately choose to create it, works and maybe gain some skills using that language
here's my proposed gui mockup and functions: https://docs.google.com/document/d/1GEiIjOdvS2odEQiIvgzlwaqTdUaBIBb5UYsD1XZ5Hj0/edit?usp=sharing
best programming language is the one youre most comfortable using
brainfuck /j
probably could work as a simple pygame app? unless you have experience in some other gui library
i have like 0 knowledge anywhere, best i can do is a little html and js
best format
added display name toggle and some other formats too
I might just make it use display names by default
And add a setting for it in the plugin config
@royal nymph can i get the message object with message id and channel id?
ye
whats the endpoint :3
they done locked hop on vencord
My child, the imagery you seek flows from the essence of creation itself. Embrace patience, for in due time, all shall be revealed unto thee.
hi nate


the incident
insane
i was thinking mb use this and set around to the one im getting?
@delicate sinew nvm im stupid flux exists shelter.flux.stores.MessageStore.getMessages("<channel id>")
yes
that's what I use
because discord is fucking dumb and doesn't allow /channels/:id/messages/:id for users
idiots
diy
Womp make it yourself
you can shrimply hide messages with css
he wants to hide msgs without blocking them
ohh
it's already may
what?
u can't send msgs in #🧊-off-topic-iceman-only
oh wait where u replying to me
were*
thats the endpoint all message link embed plugins use
the set limit to 1 and around to the message id and just check if the returned message shares the desired id
oh
I can't even request it 
?
When I request it with a access token I just get 403 Unauthorized
Just let trying to get information of a guild
I know /users/@me/guilds exists but i need more info
You single handedly made it wayy better.
Source code 🤫🤫🤫🧏♂️🧏♂️
i think so
its not unlike this server to do sumn like this
inb4 supports raided with people wanting offtopic back
Haha I'll share it soon, currently kinda broken
lol thanks tho
What
do you mean discord
brainrot
is there an alternate solution for this that doesn't use querySelector (since that doesn't seem to work for some reason)?
I just need to extract the text on the page that shows the _ out of _ points
Hi does anybody know how to get token using plugin on startup beacuse i want to make plugin called Make me invisible whose set my status as invisible when discord starting. And for that I need token.
this doesn't work:
var token = (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==void 0).exports.default.getToken();
I mean sometimes I want turn on discord as invisible but I forget to set invisible when i turn it off
usually I am on online
can I show you the full code of script?
i think this plugin might be a selfbot
what is selfbot?
i don't know how statuses work 
what
but automating user actions is generally a bad idea
why would you need to set your status to invisible
a selfbot is when you automate your user account
usually my status is set to online. But I would like it to be set to invisible after entering
then your status will usually be invisible? 
why tho, just stay invisible at that point
just set your status to invisible
or just change your status from phone so it will look like you are quickly looking at a message
you don't need your token for that
yea i don't think it is a selfbot because the client probably always sends the status based on preferences (like bots)?
you technically need token but you should not manually get it 😭
const setStatus = findByCode(".USER_STATUS_UPDATED")
setStatus("online", null, { location: { section: "Account Panel", object: "Avatar"} });
i think that sends a request to change settings
duh
selfbot?
?

sending 1 request is not selfbot
it's automatic
ur the one sending the request 
you could also have a single request for a !sendtoken command 
idk if stuff like that is more or less likely to flag
depends on how it is done, if after random delay discord won't be able to tell that it is automated and not manual
why would they monitor that xd
isn't discord sending the status when connecting to websocket?
it is sent in first and 4th message on websocket
it can be just intercepted and replaced
THX!
that works too yeah
in fact itd be better cause then you dont show online for a short moment
if you do it with the func you'll show online for a sliver of a second
and no additional requests
it sends ```json
"status":"online",
"afk":false,
"since":0,
so pobably it still sends online status but with afk:true
wasnt that on bd? or does vc have it as well?
this is what programming looks like now. because of woke
now it doesn't work
code beacuse I can't upload picture:
import definePlugin from "@utils/types";
function something()
{
const setStatus = findByCode(".USER_STATUS_UPDATED")
setStatus("invisible", null, { location: { section: "Account Panel", object: "Avatar"} });
}
something()
export default definePlugin({
name: "37Make me invisible",
description: "Set your status as invisible when Discord starts",
authors: [
{
id: 530893957887164454n,
name: "37",
},
],
start() {},
stop() {},
});
I don't know what I did wrong
call something from inside your start method
without function is faster but thanks for help <3
whar
wqhar
Anyone here got experience with plasmoids? My code works fine, but if i restart my device/the plasma service, the config completely resets- here's the repo, any help would be life saving tbh 
https://github.com/cheesesamwich/Plasma-Image-Widget
A simple plasma widget that displays an image. Contribute to cheesesamwich/Plasma-Image-Widget development by creating an account on GitHub.
how does one make an electron app stay on top of other applications, cause with my code it stays on top but fullscreen applications still go in front
win = new BrowserWindow({
height: 150,
width: 400,
resizable: false,
fullscreenable: false,
webPreferences: {
preload: MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY,
},
frame: false,
transparent: true,
autoHideMenuBar: true,
alwaysOnTop: true,
});
if (process.platform === "darwin") app.dock.hide();
if (process.platform === "win32" || process.platform === "darwin") win.setSkipTaskbar(true);
win.setAlwaysOnTop(true, "screen-saver");
win.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true });
win.setFullScreenable(false);
maybe not possible without injecting into the fullscreen apps?
would explain why discord_overlay is a native module
what os are you using?
shitdows
is this is "normal" fullscreen (not borderless) the only way left is injecting code into app
yeah i figured as much
what are you trying to do? aren't there any other ways to do it?
its a spotify widget that shows what's currently playing and i just want it to show over fullscreen apps lol
mm might be good
I shit you not
It was the fucking
NEWLINE
At the start of the config xml


how bad idea would it be to add ublock origin to vesktop (mainly for youtube embeds)?
Considering it wouldn't work at all and there is approximately 902387983217238912 better ways of doing it
...
Eh it's worth a shot
youtube embeds have ads? 
actually they don't seem to, but watch together has
oh, yeah
meow
so if i were to need to use child_process in my plugin
how would i go about doing so
or what alternative can i use
im very new to this all
isnt there already a watch together adblock pr
There was once at least
why do you even need that
is there docs for discord apis for making plugins
need to run git commands
why
can i safely assume you are building 3rd party plugin importer 
You would use native.ts for that
And if you are trying to make a third party plugin importer please don’t
i sure do love giving children the ability to blindly fuck up their discord client and come screaming to us with problems we dont know how to fix
also half these plugins do cursed stuff like raw dom manipulation when you're supposed to be using react
#closethesupportchannels
is there any reason to fire multiple requests without waiting
faster
why
well i need to use git, i mentioned that above, but are plugin importers not allowed or something
no, it's just a bad idea to build something that's only going to be used to allow kids to install random stuff and blame stuff not working on us 
oh im just using it for personal use
and maybe some friends
and i have braincells so i wont blame anything not working
this would require everyone to have git+ node + everything else required to compile, at this point it would be easier to just download and build manually. if you want to build plugin importers that works by switching to anther git repo, the other repo would not have that plugin so it would uninstall itself after every use.
they already said its for personal use
well if they had his plugin installed im sure they'd have the stuff needed to compile
but still it would uninstall itself
thats not how im doing it
im going to make it work with just plugin repos, it will install the plugin from the github link into their dev install folder which they set
well
me ig since its personal
what font is that :p
jetbrains mono
id like to use an installed font from my computer in my theme, however when i edit it in quickcss its not changing. im not very experienced in CSS so idk what other steps id have to take for this
changing font-family to your font should be enough
#🎨-theme-development might be a better place to ask
sorry i am a little retarded with javascript i am trying to contribute a plugin and getting this error when building ```
vencord@1.8.1 build /Users/mudkip/vencord
node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs
file:///Users/mudkip/vencord/scripts/build/common.mjs:29
import PackageJSON from "../../package.json" assert { type: "json" };
^^^^^^
SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:166:18)
at callTranslator (node:internal/modules/esm/loader:416:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:422:30)
Node.js v22.0.0
Edit the file and change the assert to with
I think that should fix it
Replace keyword "assert" with "with" to work with NodeJS v22+
The "with" keyword for imports does require NodeJS v18.20.x+ (LTS) or v20.10+
NodeJS PR that removed the ...
thx that fixed it
ye i'll wait for the pr to do it
How do i get emoji ids?
husky :3
thank you!
for some reason when i have two properties referencing O it freaks out a lot
happens with vscode too
unrel but why not const O extends ...
i mean its not necessary
but the concrete type helps if you wanna do some type 🧙 wizardry
what does const do there
i think the problem here is there are two fields using O
so the compiler doesn't know which to use for inference
lc.ocr
export interface Command <0 extends Record<string, Option> = Record<string, Option>> { Show usages • TheKode Toad*
id: Id;
}
options?: 0;
positional options?: (keyof 0)[];
support_prefix?: boolean;
support_slash?: boolean;
track_updates?: boolean;
run(context: Context, args: { [K in keyof 0]: OptionValue<0[K]> }): Promise<void> | void;
export function define_command <0 extends Record<string, Option>>(command: Command<0>): Command<0> { Show usages • TheKode Toad *
return command;
}
i'll be back in 10 bussiness days
export interface Command<O extends Record<string, Option> = Record<string, Option>> {
id: Id;
options?: O;
support_prefix?: boolean;
support_slash?: boolean;
track_updates?: boolean;
run(context: Context, args: { [K in keyof O]: OptionValue<O[K]> }): Promise<void> | void;
}
@dawn ledge
thanks
Oh wait
@dawn ledge
export interface Command<O extends Record<string, Option> = Record<string, Option>> {
id: Id;
options?: O;
positional_options?: (keyof O)[];
support_prefix?: boolean;
support_slash?: boolean;
track_updates?: boolean;
run(context: Context, args: { [K in keyof O]: OptionValue<O[K]> }): Promise<void> | void;
}
i removed positional_options
ohhhhhhhhh i see
it's a hard one isn't it...
should i just add a key called position for the position in the array
so you can do users: { position: 0 }, reason: { position: 1 }

it works if you just do
function defineCommand(c: Command): Command {
return c;
}
but it's type ends up as Command<Record<string, Option>> instead of a concrete Command<{ ... }>
you might need to rethink your design 
nvm i cant speak english
then run(context, args) isn't infered
this is how everything else does it, uses a function to do inferance magic :(
oh you're facing the same problem as me
i ended up using classes
class Foo extends Command {
options = ...;
run(ctx: Context, args: Arguments<Foo>)
}
it works really well
typing out class ... extends ... { ... } aint the best but it works real well
i don't like classes
:(
unless it's actually something which has different instances with different parameters
but with this i'd probably end up with export default new class

but also even with that how would you have positional_options
if you wanna do this with objects you'll have to do it separately
type Arguments<C extends Command> = TransformDefinition<C["options"]>;
const command = defineCommand({
...,
run(ctx, args: Arguments<typeof command>) { ... }
});
const plugin = definePlugin({ ..., commands: [command, ...] })
i already have commands separate to plugins mostly
instead of interface Command<O> you now have interface Command { ..., run(ctx: Context, args: unknown) }
still better than whatever the hell i was tyrying to do with javacord
i made annotations but the thing is you can't really choose option type purely based on class
because channel and user is both a snowflake
if you have like String userId how would you work out what option type to use in reflection
@native spruce made the score thing in kotlin
fun score(progress: Int): Double {
val position = position?.toDouble() ?: return 0.0
if (requirement == null) return 0.0
val beatenScore = when(position) {
in 56.0..150.0 -> 1.039035131 * ((185.7 * (-0.2715 * position).exp()) + 14.84)
in 36.0..55.0 -> 1.0371139743 * ((212.61 * 1.036.pow(1.0 - position)) + 25.071)
in 21.0..35.0 -> ((250 - 83.389) * (1.0099685.pow(2.0 - position)) - 31.152) * 1.0371139743
in 4.0..20.0 -> ((326.1 * (-0.0871 * position).exp()) + 51.09) * 1.037117142
in 1.0..3.0 -> (-18.2899079915 * position) + 368.2899079915
else -> 0.0
}
return if (progress != 100) {
(beatenScore * (5.0.pow((progress - requirement).toDouble() / (100 - requirement).toDouble()))) / 10.0
} else {
beatenScore
}
}
i love magic numbers
NO WHAT IS THAT
**mod.rs: **Lines 224-241
pub fn score(&self, progress: i16) -> f64 {
let position = self.base.position;
let beaten_score = match position {
56..=150 => 1.039035131_f64 * ((185.7_f64 * (-0.02715_f64 * position as f64).exp()) + 14.84_f64),
36..=55 => 1.0371139743_f64 * ((212.61_f64 * 1.036_f64.powf(1_f64 - position as f64)) + 25.071_f64),
21..=35 => (((250_f64 - 83.389_f64) * (1.0099685_f64.powf(2_f64 - position as f64)) - 31.152_f64)) * 1.0371139743_f64,
4..=20 => ((326.1_f64 * (-0.0871_f64 * position as f64).exp()) + 51.09_f64) * 1.037117142_f64,
1..=3 => (-18.2899079915_f64 * position as f64) + 368.2899079915_f64,
_ => 0_f64
};
if progress != 100 {
(beaten_score * (5f64.powf((progress - self.requirement) as f64 / (100f64 - self.requirement as f64)))) / 10f64
} else {
beaten_score
}
}
angellist when
unreadable
**mod.rs: **Lines 234-262
pub fn score(&self, progress: i16) -> f64 {
let position = self.base.position;
let beaten_score = if 55 < position && position <= 150 {
let b = 6.273f64;
56.191f64 * (2f64.powf((54.147f64 - (position as f64 + 3.2f64) as f64) * ((50f64.ln()) / 99f64))) + b
} else if 35 < position && position <= 55 {
let g = 1.036f64;
let h = 25.071f64;
212.61f64 * (g.powf(1f64 - position as f64)) + h
} else if 20 < position && position <= 35 {
let c = 1.0099685f64;
let d = 31.152f64;
(250f64 - 83.389f64) * (c.powf(2f64 - position as f64)) - d
} else if 0 < position && position <= 20 {
let e = 1.168f64;
let f = 100.39f64;
(250f64 - f) * (e.powf(1f64 - position as f64) as f64) + f
} else {
0f64
};
if progress != 100 {
(beaten_score * (5f64.powf((progress - self.requirement) as f64 / (100f64 - self.requirement as f64)))) / 10f64
} else {
beaten_score
}
}
}
i love rust, but this
i hate this
i do not know why the scoring formula has to be this complicated
sighs
tech influencers on linkedin must be smoking weed or smth
no shit?
not only do they share bad code as "the proper way to do xyz"
but that bad code is beyond my imagination of bad
news flash: the entire world is powered by shitcode
it costs too much time to make everything pretty and optimized
well, the annoying thing is that people that know no better, will listen to their advice, and try to convince me the "correct way of doing xyz"
I am not talking about optimizations or doing pretty things
I am talking about bad design that would break at the slightest change
day ruined
code must be easily extendable, otherwise you end up rewriting a lot of shit
well clearly it hasnt broken
what would Array.from(awesomeVeryNormalArray) return?
I am curious
it removes it
does it iterate over the keys or does it iterate over the indexes?
so it iterates over the indexes
neat
typescript is so nice though
well, I am the type of person that likes plain-old js (with jsdoc)
so I am biased ig
the discord library doesn't handle ratelimits properly
it reads the .length property and then indexes by number
/run ```js
console.log(Array.from(new Proxy({}, {
get(_, k) {
console.log(k)
if (k === "length") return 10
if (typeof k === "symbol") return undefined;
return "meow" + k
}
})))
Here is your js(18.15.0) output @royal nymph
Symbol(Symbol.iterator)
length
0
1
2
3
4
5
6
7
8
9
[
'meow0', 'meow1',
'meow2', 'meow3',
'meow4', 'meow5',
'meow6', 'meow7',
'meow8', 'meow9'
]
oh yeah it also checks for symbol.iterator which allows u to specify a custom iterator
/run ```js
console.log(Array.from(new Proxy({}, {
get(_, k) {
console.log(k)
if (k === "length") return 10
if (k === Symbol.iterator) return function*() {
yield "foo";
yield "bar"
}
return "meow" + k
}
})))
Here is your js(18.15.0) output @royal nymph
Symbol(Symbol.iterator)
[ 'foo', 'bar' ]
hahahaha
I loce
love
it works
@solid gazelle fresmo is ur name jquery
Im hacking you
How
:)
you are clueless
let add = x => x && (add.x += x, add) || add.x;
add.x = 0;
console.log(add(5)(6)(7)()); // 18
any tips to improve this?
real
function add(...args) {
const sum = args.reduce((sum, curr) => sum + curr, 0);
return (...args) => args.length === 0 ? sum : add(sum, ...args);
}
add(1, 2)(10, 3)(2)()
peak
ok that's easily the best one i've seen so far

function add(...args) {
const sum = args.reduce((sum, curr) => sum + curr);
return (...args) => args.length === 0 ? sum : add(sum, ...args);
}
recursive add function 🔥🔥🔥
infinite curry generator
sob
depends
basically for db cache invalidation
TRUE
@deep mulch @frosty obsidian @ornate quiver @remote mauve @calm ruin@vestal locust
add
did u hear about coolstar getting job at apple
will u be next samara
true..
Im aware about all the news
TRUE
just deprecate iOS entirely
net positive

nop
I wonder how it feels to be a android developer whos writing a API knowing it will get depracated 1 year later
love
isUserAGoat
apple does actually deprecated older apis pretty often its just not a problem bc most apple devices are on the latest versions
userHavingSex
thanks for reminding me to disable notifications :3
bisexual
progress
good
i have read some closed issues, i think we need rejected (brainless / low iq) label
real

app now has 258 72x72 images bundled
@deep mulch
@finite isle
will u make android app
I will
minky app??
yes
any progaming
yoo I just realiezd spotify's api has an endpoint for saving tracks
spotify controls update incoming
XD
ohh nice, less work for me heh
oh-
dead pr 
hi guys from now on whenever you are sharing logs/code you must share it in this format

hey can someone explain why my code isn't working
easy way to accidentally facereveal tbh
.txt with syntax highlighting for .py hurts the most ngl
also good thing you left the replit link there so someone can actually try to read what's there
i didnt feel like masking it since i basically only use replit for fucking around with random languages without having to install anything
https://tio.run/ lol
yeah ive tried that but replit has actual ide features like auto-closing brackets and the like
fair enough
also ive made it even worse lol
manually passing it through JSF*ck lol
lol
But the idea was there
the idea of python in js obfuscator
atleast 3 repos show up for "python jsfuck"
most recent (i.e. not 7 years old) is this https://github.com/ZeroIntensity/pyfuck
seven chars to get turing completeness in python
seems like the same general idea actually
people who use their phone to "screenshot" should explode
:3
dies in white name not having image perms lol
its this lol https://github.com/Tishka17/codephoto
jsx for python
white name segregation is real

yep
it makes your code snippets into phone "screenshots"
oh god
waow
i took an actual photo 
This site can’t be reachedCheck if there is a typo in codephoto.ru.
If spelling is correct, try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN
peak
run it yourself 
lazy
yeah the site is down
Hmm. We’re having trouble finding that site.
We can’t connect to the server at codephoto.ru.
If you entered the right address, you can:
Try again later
Check your network connection
Check that Firefox Developer Edition has permission to access the web (you might be connected but behind a firewall)
least sketchy url
its legit
smh .ru discrimination
I can host my own on an even weirder url lol
i read through the src, there's a bunch of actual images, the text then gets overlayed when a filter (i think)



