#πͺ -progaming
1 messages Β· Page 2 of 1
I guess she has more things to say besides whatever was shared in the convo between us in uwunet
whats the problem here
looks fine 2 me
its probably more this
saying "but so many of your stupid design decisions just leave me frustrated" to a maintainer is kinda rude tho like its their library they get to choose the design 
(this issue was about casing btw, she wants icon_url instead of iconURL)
personally i think both are stupid and would prefer iconUrl
but i also dont really care cause its their lib they get to decide
it's so minor yeah
whilst i don't like following conventions
i get it
I could just automate all renaming with ast-grep
Js... conventions? Is there such a thing?
vee told me that snake case is blasphemy /lh
The snake was the original sinner so that makes sense
but i don't get it because it's not that unusual to have your own conventions vs the standard library
(in C++ the standard library uses snake case for classes but people don't usually follow that)
There's the standard convention
but I won't recommend it
uh what url was it
i was wondering how to implement a server whitelist system
would you have to manually implement getting the guild id for each event
and ignore events outside of an allowed guild
simply leaving guilds seems bad
because i assumed oceanic was an eris fork originally but it was a full rewrite and there was a lot of opinionated things i didnt like about it
plus donovan can be a bit of an asshole
everyone that was using eris bandwagoned to oceanic because of donovan making prs in the past
well
that would require someone to run the command in the like 0.5 seconds between when your bot gets the GUILD_CREATE event and when discord receives the leave guild api request from your bot
and if you're worried about someone maybe adding your bot to a guild when it's offline so it wouldn't get the event, guild create is fired for every guild you're in when you connect to the gateway so there's a very, very low chance of you possibly missing it
what if somebody finds another ownership transfer exploit
whar
need i say more
that's not an exploit, you can transfer ownership to bots via api and bots can create guilds
why did they patch the more elaborate way of doing it then
but if you can't leave the guild because the bot is owner then you could just delete it
does that really still work 
but again someone would need to invite the bot and transfer ownership to it in the time it takes your bot to handle the guild_create event so it feels fairly unlikely
noo transfering to a bot that didn't make it
how to open that thing that i dont know the name where you are allowed to search for users, channels and etc?
because mavin and me found a way which involved deleting the application π
ctrl+k
nah, i'm talking about coding lol
how can i open it using vencord api?
uh i did this a while ago
i already wrote code
do you remember something about it?
Vencord.Webpack.findByCode("type:\"QUICKSWITCHER_SHOW\"")()
thx bro!
you should use a const to store the function
oh it might have broken since 2023
let me take a look
see WebKeybinds
maybe i could try using flux dispatcher?
that's what it's using
i will test to verify later today to see if it still works
I tried to test right now but 2FA on all my accounts makes it a pain and I'm technically at work so I should get back to work
FluxDispatcher.dispatch({
type: "QUICKSWITCHER_SHOW",
query: "",
queryMode: null,
})
@winged mantle this worked for me
(moment)
only if the bot doesn't already own 10 guilds, no?
yeah
if you're worried about that u could just make the bot create 10 guilds
me and marvin have both transfered a server to mee6

gonna transfer vencord server ownership to mee6
I don't think the limit applies to transfer
just to create
because discord doesn't want a broken loop bot creating 28748976438298748762398543 guilds
I DELETED THE APP TO TRANSFER π
and they specifically changed it so that deleting doesn't choose a bot
tbh that seems like a bugfix more than an exploit
because if an app owns the guild and gets deleted and the guild gets transferred to a random bot the ability for users of the guild to recover the server is like 0
(I'm kinda assuming that is what was happening, idk the exact thing you're talking about)
well u can contact discord support
i think if the owner gets banned you can also request a transfer
well yes but making it so that doesn't need to happen cuts down on requests
...but the server would've needed to be owned by a different bot in the first place
why would you do that with a bot you don't control in the first place
wait i'm confused now
I thought this whole conversation was about whether you could still transfer a server to a bot and I thought you were saying you couldn't anymore
are you only talking about situations where the bot created the guild?
how to get channel id from an user dm by its user id?
what?
like
i have an user id
every user has it dm
the dm has it id
i want to get the dm id from the user id
you need to open a dm i think?
there's a function for it
try to find it yourself
use react devtools to inspect the "send message" button in user profiles
and see how it opens the dm
why delete?
what
other random guy (probably) randomly deleted his msg
this is the only way
noooo did they fix it??
yeah i accidentally leaked the secret
i was like "haha i will try this there's no way it will work" in a public chat
:(
husk
first_arg
just use x at this point
why does type narrowing not work :(
shouldn't the type of args become EventTypes["applicationCommandPermissionsUpdate"]
Doesnβt typescript make you explicitly cast it
this feels a little dumb
i've already checked than E is "applicationCommandPermissionsUpdate"... right??

Does it work better if you use keyof EventTypes directly without the extends?
how do you name it E?
Oh right
i think extends just means it meets the constraints here
I don't really know how the dependent type features work
this isn't possible
I like the snake case
rust made me prefer snake case over camel case
What if you put const [data] = args as EventTypes[type] at the top and then check what type is after that it'd be very silly if that worked (I have no idea about ts)
Sadness
well it makes sense that it's this way
imagine
type = "foobar";
if (type === "foobar") {
// `args` is not necessarily of type foobar
but type is E and args is EventTypes[E]
if you check that type (and therefore E) is "foobar", i would've thought EventTypes[E] should be treated as EventTypes["foobar"]
normally the way you'd solve these issues is to have a field like type on the event
this is a discord.js arg array
maybe you can make a guard function (idk how to call them properly)
yeah
i was about to say that
one sec
interface EventTypes {
foo: {
value: "foo";
};
bar: {
value: "bar";
};
}
class EventData {
constructor(
public event: keyof EventTypes,
public data: EventTypes[keyof EventTypes]
) {}
is<T extends keyof EventTypes>(
event: T
): this is { event: T; data: EventTypes[T] } {
return this.event === event;
}
}
function handle_event(event: EventData) {
if (event.is("foo")) {
console.log(event.data.value);
}
}
handle_event(new EventData("foo", { value: "foo" }));
something like this
What else would you expect from js/ts other than cursed stuff :3
sad that this approach doesn't support destructuring
unfortunately guard functions cant assert other variables in scope
that's the entire reason i made it a class in the first place, cause thats the only way to do it to my knowledge
is it a code smell just to have global registries 
uh this doesnt't work
doesnt't
it does :p
by which i mean it works exactly the same as before (for me)
the guild leaving thing is probably a lot easier 
you copied it wrong
this needs to be E
and dont manually assign fields in ctor
i don't like implicit fields
constructor(public type: keyof EventTypes, public data: EventTypes[keyof EventTypes]) {}
it's confusing because it hoists an argument declaration into a wider scope
i wish you could do the same thing as this with switch
u can :PPPPP
that really hurts my head
this just becomes
switch (true) {
case false:
break;
case false:
break;
case true:
break;
}
which is kinda cursed but
it works
i do horrible things like this too occasionally
it's technically less performant than an if else tower cause you're always comparing to every single event unlike the if else which can short circuit as soon as it finds a match
but it doesnt matter
this code is utterly unreadable
/ignore-this
hm
dont mind the horrible testing
ignore this i am testing messagetags
/testing-ignore-this
womp womp
why is this channel cursed
real
ignore this i am testing messagetags
well i fixed my shitcode

the kode tode should have her koding privileges taken away
the tode
what the fuck
I CODE IN FUCKING GDSCRIPT AND IM BETTER THEN THIS
Debatable
I showed this to my friend and they were very unhappy with me afterwards, lmao.
"Block that user, an array of objects would have sufficed" 
i made a mistake with fin dand replace and the formatter went crazy
is it possible to check at compile whether a type union includes null
warning the code is spaghetti
why is this not being infered as string | null
do you have https://www.typescriptlang.org/tsconfig#strictNullChecks enabled
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
strict is good but noImplicitAny is bad rule
yeah it's annoying
to use java script on My website do i need to link it somehow?
you need to use a <script> tag
you can either have js code inside the tag, or use src="somefile.js" to load an external javascript file
examples from mozilla web docs
<script>
alert("Hello World!");
</script>
<script src="javascript.js"></script>
Not enough emoji
π Reverse π οΈ Engineering
why did you π οΈ twice
Guys im currently working on a bio website and im looking to make it a little bit like this ( https://e-z.bio/SKRRRTT ) and idk bc i dont want to copy everything but what should i add custom that could be cool
this isnt helpful but why even make a bio website
theyre annoying as fuck
just curious
i have never clicked on a bio site link
Please stop trying to scam me!! @royal nymph Help!
explode
im probably being extrememly stupid, i never use regex,
anyone insight on why this patch has no effect,
trying to add a click action to the example button on the edit profile screen.
{
find: "m.default.Messages.USER_SETTINGS_CUSTOMIZE_PROFILE_EXAMPLE_BUTTON",
replacement: {
match: /\(d\.Button, \s * { \s*className: \s*v\.button, \s*color: \s*v\.buttonColor, \s*size: \s*d\.Button\.Sizes\.SMALL, \s*fullWidth: \s*!\d, \s*children: \s*m\.default\.Messages\.USER_SETTINGS_CUSTOMIZE_PROFILE_EXAMPLE_BUTTON\s*}\)/,
replace: "(d.Button, {\n className: v.button,\n onClick: () => {$self.timeMachineClicked()}\n color: v.buttonColor,\n size: d.Button.Sizes.SMALL,\n fullWidth: !0,\n children: \"Open time machine\"\n})"
}
}
again apologies for stupid please educate
i litterally just copied the code for the button and changed it to regex for the match
the code is minified so remove those space and \s \n
Thank you!
Also you can't use variable names, they change pretty often
how am i supposed to target that button then
\i
my understanding is \i in regex will take what is there and give it to me as a variable. so if i am to use i then i have to find something consistent that surrounds the button
interesting i will look into doing that
no reason not to as long as the rest of ur match is good
i love being told misinformation!!!
does anyone know how to work around this ive been pulling my hair out
.codeblock {
border-radius: 6px;
padding-left: 12px;
margin: 12px;
border: 2px white solid;
background: rgb(24, 24, 24);
box-sizing: border-box;
}
this is the css i have for it
tried word-wrap: break-word; but it does Nothing
wait what the fuck
isn't it slower
π
it is because it's a wildcard so it will most of the times try the rest of the match instead of just moving on
I prefer avoiding it
it doesn't matter much :p
Any good regex engine starts by finding literals and finding the rest from there
yaya, it's just a good practice I prefer doing
what if the engine matches backwards
is it a single div?
do you have white-space set to something like nowrap or pre instead of normal
also yeah i tried that it still didnt work for some reason
even after many !importants
idk what i did but this works
[class*="language-"] [class="highlight"] [class=highlight] {
margin-left: 20px;
margin-top: 20px;
margin-right: 20px;
padding: 10px;
border: 2px rgb(102, 102, 102) solid;
border-radius: 6px;
background-color: rgb(29, 29, 29);
white-space: pre-wrap;
}
and i dont think im touching this LOL
jekyll is funny
goofy ahh selector
good
Catppuc
cin
you love text wrapping
i also have latte but idk what color it uses for primary
first one starts at -1
if i do enum class
ill have to add a value field
other way is
object AVPixelFormat {
const val GUH = -1
...
but loses type safety
just go enum with value property
okay
it's supposed to be an enum anyways
i will do
you love bitmask
i might be able to make that a value class
good
yop
according to the catppuccin people mauve should be the default accent color
at least for mocha
devilbro fan app @frosty obsidian
swapped the bg and surface colors
@frosty obsidian is the progress bar idea good
yeah it looks good
@frosty obsidian @frosty obsidian are you develop
whar
develop what
Are you develop
@frosty obsidian what tests can I do for ffmpeg library
to ensure the code works
idk
find
once both of these are done I can use in hyperion
also
I'm writing 1:1 bindings
might make another project that wraps it to make it easier to use
ffmpreg
π
social image
I haven't had much time to work on my demonlist app due to trying to recover from body hurting and school sadly
:(
I implemented the progress bar thingy in like 10 minutes and was so out of it lmao
id recommend taking a short break then
I'm already taking a break from not doing any extensive coding sessions
bc well I have no time to anyway
this is insane
ffmpeg --version
ffmpeg -buildconf iirc should give you a more detailed list
lsp extension for codeblocks, opinions? (Just an idea at the moment)
Lsp extension for discord code blocks pls
What's that
Never heard
The thing in your code editor that suggests completions is powered by Language Server Protocol, basically a language server running in the background tells your editor here are some completions based on the current context n stuff
insane good or insane bad
Would be cool to have
https://cdn.discordapp.com/emojis/759540649056927794.webp?size=48
People got tired of writing support for every language in every individual editor, so they made a protocol so you can implement a language once and support all editors
Then my lazy ass could just test one liners and the sort from discord
insane good
unless an editor decides to pull a https://xkcd.com/927/
It's mostly jetbrains doing that, right?
should i group all slash commands into module to avoid limit like carl 
/reminder remindme my beloved
I would make the prefix command simpler if youβre gonna do that
/remind me at: what:
who cares about grammar :^)
this is why text commands are infinitely better
slash commands suck tbh

i am going to send an AI powered robot to your house to turn you into 

discord may give me trouble requesting for intents idk
but more importantly people will scream at me if there are no slash commands
support both
(where reasonable)
that's what i'm trying to do
ah
make it so "where reasonable" is just a conviniently small subset of commands
ig 100 commands is quite a lot
how do you manage to get 100 commands in a discord bot
but i looked at a bot with prefix commands and it had 120
there's also other annoying limits
such as
i think 9 options, 4000 characters for the json
Basically
really
i wanted to do commands even for stuff that's possible with ui because it's handy
how do i get my discords colors
**stattrak.py: **Line 22
uniques = [
carl bot so good
**stattrak.py: **Line 961
# xd = discord.File(fp=buf, filename="suckmydick.png")
lol
"Yes, I saved all the legendaries like this, sue me"
i will
tbf ive done worse in programming
these compliments r 
I posted my app yesterday on twit and it got some attention
I shouldve posted it on gdtwitter and it wouldve blue up
your app looks fantastic but looking nicer than the demonlist isn't a high bar
it's 10 but still, limits are dumb
like "do anything with slash commands" yeah sure alright discord
@frosty obsidian
i need opinion
public expect class AVFormatContext
public expect val AVFormatContext.metadata: AVDictionary
``` im doing this in common to map classes
in jvm its
public actual typealias AVFormatContext = org.bytedeco.ffmpeg.avformat.AVFormatContext
public actual val AVFormatContext.metadata: AVDictionary
get() = this.metadata()
idk of a better way
guhhh in native it doesnt work
jvm works cause
javacpp fields are methods
theres no conflict
in k/n they're fields
so Extension is shadowed by a member
if i just change it to a differfent name then it works but guhhh
anyways metadata dumping works
n6.1.1
major_brand = mp42
minor_version = 0
compatible_brands = isomavc1mp42
creation_time = 2010-01-10T08:29:06.000000Z
> Task :lib:jvmMainClasses
> Task :lib:compileTestKotlinJvm
w: Opt-in requirement marker kotlinx.cinterop.ExperimentalForeignApi is unresolved. Please make sure it's present in the module dependencies
> Task :lib:jvmTestClasses
6.1.1
major_brand = mp42
minor_version = 0
compatible_brands = isomavc1mp42
creation_time = 2010-01-10T08:29:06.000000Z```
i love tgree style tabs
this is sidebery not tree style tabs
ure gay
wtf does this do
least insane css
That font is the true crime. Sat here for a good minute trying to figure out what those units were
dotted lines
Is this map helpful? Yes No
what browser even is that????
my bot is coming along nicely
better than skyra
firefox
Interesting...
i love making about screens
donate probably
paypal me 500,000 usd
okay
$2500
whar
thats half a million cents
no? π
yes
wing cant math
1 cent = 1/100th of a dollar
@native spruce you love c
wing so good at math
guh
I dont like c but the syntax is dead simple
wing is an AI
@deep mulch you love
yes
mocha actually works really well with m3
i am unsure how to model this C api in kotlin
embrace insanity
its a bunch of callbacks
public expect inline fun <reified T : Any> MPVStreamCbInfo(
crossinline read: MpvStreamCbReadFn<T>,
crossinline seek: MpvStreamCbSeekFn<T>,
crossinline size: MpvStreamCbSizeFn<T>,
crossinline close: MpvStreamCbCloseFn<T>,
crossinline cancel: MpvStreamCbCancelFn<T>
): MpvStreamCbInfo
public typealias MpvStreamCbOpenRoFn = (uri: String) -> Int
public typealias MpvStreamCbReadFn<T> = (cookie: T, buffer: ByteArray, nBytes: ULong) -> Long
public typealias MpvStreamCbSeekFn<T> = (cookie: T, offset: Long) -> Long
public typealias MpvStreamCbSizeFn<T> = (cookie: T) -> Long
public typealias MpvStreamCbCloseFn<T> = (cookie: T) -> Unit
public typealias MpvStreamCbCancelFn<T> = (cookie: T) -> Unit
public expect fun Mpv.streamCbAddRo(protocol: String, openFn: MpvStreamCbOpenRoFn)
Maybe ill make MpvStreamCbOpenRoFn return the MPVStreamCbInfo object
nop
not native
just api design
ctx.streamCbAddRo("myprotocol") { uri ->
MpvStreamCbInfo<String>(
read = { cookie, buffer, nBytes ->
println("read")
0
},
seek = { cookie, offset ->
println("seek")
0
},
size = { cookie ->
println("size")
0
},
close = { cookie ->
println("close")
},
cancel = { cookie ->
println("cancel")
}
)
}
``` maybe something like this
@frosty obsidian why is file not multiplatform
they probably just want people to use the file stuff provided by each platform
they shouldn't
but im pretty sure that's their reasoning
idk what to use to represent the buffer in common
read = { cookie, buffer, nBytes ->
println("read")
0
},
``` read is supposed to read nBytes into the buffer
might have to find some io library
wing wong
kotlinx-io maybe
maybe
what that
kotlinx io has buffers
yop
use
why not just use library literally designed for what you need
no need if its just 1 thing
you only need buffers in that one place?
id still look into it at least
**simple-streamcb.c: **Lines 21-29
static int64_t read_fn(void *cookie, char *buf, uint64_t nbytes)
{
FILE *fp = cookie;
size_t ret = fread(buf, 1, nbytes, fp);
if (ret == 0) {
return feof(fp) ? 0 : -1;
}
return ret;
}
do you understand this
not at all
how
its like
fread is file read
yes
no idea what size_t is or what feof does
feof checks if its at the end of the file
size_t is special type
that
like 32 bit systems and 64 bit systems have different maximum values
so that code works on both systems
guh
ill try kotlinx io in the test
kotlinx is probably gonna be more efficient cross platform than a custom solution
nop
im currently experiencing shiny object syndrome with hellish
im having fun working on it
yesterday
Full Changelog: https://github.com/wingio/Hellish/commits/1.0.0
good
cyn moment
i think she was asking for equivalent function in js but then realised the question makes no sense cause js is single threaded so there's no need for such an atomic function
but idk i just saw these words and "equivalent" and nothing else lol
just random guess
computeIfAbsent is more about convenience than thread safety really
wrong
its entire point in java is thread safety
well ig not really but
that's its practical use
The default implementation makes no guarantees about synchronization or atomicity properties of this method.
https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#computeIfAbsent-K-java.util.function.Function-
hmm that's fair i stand semi corrected
but it hardly has a different use case than synchronisation
all its uses ive seen were thread safety related

if you use a ConcurrentMap, it's thread safe
while something like
if (!map.has("foo"))
map.set("foo", "bar");
wouldn't be
That much is true
I've gotten that one more often in singlethreaded than multi
i asked the same thing too
π«
it makes sense in typescript imo because you need !
if (!map.has(key))
map.set(key, "gaming");
const value = map.get(key)!;
you love mutex
Java thread safety ain't that bad
In general, it depends on the access model. But sharing/mutating a collection across threads is always a pain to optimise regardless of the language
If you want it to "just work" then use a concurrent map and call it a day
If it's a bottleneck, reconsider your ways and try to find a way around having global state
If you're hellbent on it, play around with locks and optimise for your access patterns
(enjoy your unit tests thoe lmao)
JavaScript is just Java but Scripted
ECMAScript
simply don't write js like this
99.9% of the time you can just write
let value = map.get("key")
if (!value) {
value = initialise("key")
map.set("key", value)
}
write code like this instead
(won't work if you're potentially storing undefined in the map)
is it more swagful to use let or var when it doesn't make a difference either way
var is ultra swag
lol
vhelp
vban (yeet, π) - Does stuff idk
veval (e, $) π - Does stuff idk
vfaq (f) - Does stuff idk
vhelp (h, ?) - Does stuff idk
vrole-add (+, ra, ar) - Does stuff idk
vrole-remove (-, rr) - Does stuff idk
vnotsupport (ns, nots) - Does stuff idk
vprune (purge, clear, delete) - Does stuff idk
vsource-code (source) - Does stuff idk
vsupport (s) - Does stuff idk
vupdate (up) π - Does stuff idk
vmodmail:post π - Does stuff idk
i think my code is slightly spaghetti
i should make repo public lol
need to implement configuration support pain
I should probably private some of my repos because its shit and I don't want pr to fix its shitness
// everything where an escape is valid and the character sometimes affects formatting
// (all punctuation seems to be possible to escape?)
// perhaps this is not the best way to do this but it should work everywhere apart from inside codeblocks
const FORMATTING_REGEX = /[\\*_\-`#@<>.~|:]/;
export function escape_all(input: string) {
return input.replace(FORMATTING_REGEX, "\\$&");
}
will this work for everything
is this for discord
discord markdown escaping is so inconsistent it doesn't work half of the time

yeah
escaping always seems to work on special characters even if they do nothing
e.g. \Β£
even \βΊ
and i think \\ always becomes \
and this works with mentions and doesn't even have a ping for users (ofc they are all disabled): <@343383572805058560>
even emojis which are innaccessible
uh... i forgot about links
Video assistant referee
Vaccine A Rabbit
ur message just disproved that :P it doesnt become a \ if its in a code block
but ig u escape ` too
so i guess its fine
i was trying to downgrade an android app
damn my assumption was all wrong
i think i figured that part of it out thus why i deleted the messages but i have no way to test currently since theres still a bunch of other shit
im stuck on Comparator.comparing but i dont know enough about android nor java to know what to replace it with
try making a custom comparator instance
thing.sort(new Comparator() {
// implement methods
})
i think that's the old way
or if you can use lambdas
thing.sort((a, b) -> a.getThing().compareTo(b.getThing()));
Comparator.comparing(Thing::getThing) 
congratulations on missing the entire point
hm looks like discord.js probably is a dumb choice because of memory usage
stuff like this in oceanic just feels yucky
why isn't this nullable
it looks like most big bots use eris but that's outdated :(
logical because big bots were made in the past (when they were small)
i don't think i like the look of anything else
logically irl every big thing has a shitton of legacy code
π
sad
i hold the belief that accessing a property on a non-null object should never throw an exception
π
and this feels like a pretty big deal because it could lead to a lot of oversights
people say eris hasn't been updated but it had a commit 3 days ago
no automod
or messages in voice
okaayyy
because you dont raw dog that property generally
well it depends where that property is
but at least in the case of messages, you would
if (!msg.inCachedGuildChannel()) return
which then gives you full type safety and non nullable guild, member, etc
why not fetch stuff if you don't have it
i mean u can do that manaully :p
are all guilds cached all the time
how do i mute myself from a discord application? i cant find it on the docs
i'm guessing that's the normal behaviour because discord sends them, right?
wdym
my stream deck's discord plugin doesn't work with vencord so i want to make my own with my own application, so i can mute myself on my stream deck
i think there's a feature to do that but it's locked behind review (and they're not adding any apps)
idk
i don't think rpc allows it
there's an rpc.voice.write permission and it seems to not stop me from using it
or is that for actual audio data
def not lol
it requires approval
damn
time to make custom vencord plugin 
out of curiosity would that get merged if i made it
"StreamDeckFix"
yea that's what the vague nonsense i said was about
idk why the stream deck doesnt work, it works with normal discord and it used to work with vencord but stopped working at some point
why not make a vencord plugin which adds muting to rpc
isnt that a normal discord feature
trust me that's gonna save you a lot of annoyance
in WS rpc, not in file socket RPC
or whatever words
99% of the times that property will vr available
it's 01:53
and if it's not it's your fault
so instead of having to say to typescript this is not null
i already switched to random eris fork π
it throws an error instead
wdym inspired
inspired by eris
yes
because it's made by someone who used to contribute to eris
and after eris stopped merging anything and getting updates they made their own
genuine question, what advantages does oceanic offer over e.g. dysnomia
its similar to eris but also a complete different lib with opinionated changes
I really think dysnomia doesn't have all the new stuff
I could be wrong cuz I didn't check but
eris was super behind
im so confused lol
normal discord works just fine, the stream deck sends "SET_VOICE_SETTINGS" to rpc and it works
on vencord i never see it get logged and it doesn't work, and i dont know why it's different
is there something in vencord that messes with rpc
it's probably present in IPC then

i wasn't sure if this was available in ipc too (which is similar but actually available to all developers)
i somehow put my vencord in a state where the settings dont show any plugins enabled but all my plugins are enabled
i was gonna say at least if i use something eris-based it's based on something used by many big bots so it's tested
well, i have seen dyno take minutes to respond to a command π
probably nothing do with lib though
@frosty obsidian you
i need advice
mpv has properties
and
you can add callbacks for when theyre modified
so
in kotlin i thought of doing like
mpv.observeProperty<Long>("volume") {
println("Volume changed to $it")
}
what im unsure of is
its not exactly typesafe like
the developer could pass any type despite mpv only have like 6 property types
i mean something like below would work but its kinda yucky
mpv.observePropertyLong(
mpv.observePropertyString
...
do
have you tried using a yt-dlp wrapper instead
yea okay i think oceanic is the way, using eris feels like using raw opengl
LMAO
oceanic keeping killing vscode for some reason
maybe it's because there are a lot of errors who knows
nah, this is so weird
errors take a very long time to disappear
i assume it's bad practice to use ! here?
why would member.roles contain undefineds?
i don't trust discord api
it shouldnt be possible
it feels bad to rely on behaviour of a https/wss api at compile time
it will never send u undefined in the array
why dont u trust the api lol
if the api is broken your bot wont work either way
i feel like you're meant to use it for things that can be verified at compile
why do i care about this anyway it's so small xD
i think i'm in love with oceanic.js
i'm like a youtuber that hates something one moment for clickbait purposes and then loves it the next day
well you probably need to tell it to link meow.c
rn you just include the header file
oh
go build main.go
youre only building main.go
try go build .
DISCORD SLASH COMMAND GROUPS ARE HORRID π
subcommands are options
just why..?
the way ephemeral works is weird
should i just add an option to every command to choose whether you want it ephemeral or not
or make it like @wet blaze (Fire) bot and add a incognito slash command to toggle
cloudflare decided to aggressively captcha me on pointercrates api
can't work on the app until it stops
guhh
meow

This needs the star wars theme
I used the first free online tool and it didn't add music
dammit i was about to do it
Get fucked
did you copy that all manually π
or did you use tessie /ocr or random online thing
i didnt know that existed and i used a stupid online tool lol
worked well actually
this one is better
should i post in oceanic discord server
yes
WHAT IS THAT
code
Never heard of that, I'll look into it
why tf does the pause button look like this
possibly in your CSS there's a selector to change some other SVG that's picking up the pause icon too
or discord fucked it, could be either
kid named import *
whats *
import * from ...
the biggest meme is discord-api-types package
insanely goofy interface names
someone gets a bonus mark and the entire grade system collapses
is there a way to emulate this behaviour in js
what even is that oh my god that looks awful
python is like "how many splits" and js is "how many elements from the splits"
i cannot comprehend this languages syntax
i would help you but i cannot i wish you good luck
thats python
as basic python as it gets
what can you not comprehend
is the first word of that message supposed to be "is"
you could either
- split and rejoin the last n elements
- make some super cursed regex
- manually get the split indexes and split yourself using substring
there might be a more betterer way but my eepy brain can't think of it right now
lazy me would just do the first option
fair
@native spruce you love
yop
I was looking at how a smaller userbg json is generated in autumn's repo, how is the deadbanner.json generated and what is it for? I can only assume it's dead image links
https://github.com/AutumnVN/usrbg/blob/main/index.js
i just mimicked chrome
huh why is my ping command returning a shorter latency on prefix commands than slash commands? is responding actually slower because that's very weird
slash commands sooo slow
i guess creating a message is implemented with blazingly fast rust
are slash commands not
just timed how long the request took like another open source bot 
I do
I don't even use slash commands anymore 
i wondered if you could make a plugin for prefix command autocomplete but idk how you'd make it flexible enough to support most bots
command schema file π₯
i also wondered if you could abuse ephemeral replies to respond epemerally to prefix commands
when do they expire
LOL discord's own in-house bot uses prefixes
i guess they never bothered to update it cos they don't need to
that's not counting modmail, which isn't ported to slash cmds, and gearboat, which they still didn't port to slash
slash commands are good for noobs but for people that can read they're far better
Slash commands have one advantage and that's that the response can be ephemeral
gearboat is just gearbot
self hosted because idk
extra reliability
the extra 100ms could've been spent doing something else
or maybe 50ms
this is my code to make it as fast as possible
after the command promise has completed it just stops the timeout
most of their bots are by one bot dev who is also their server mod but not a employee
require all of your messages to be in javascript (not posting in #π-js-snippets cause its stupid)
Vencord.Api.MessageEvents.addPreSendListener((_, ctx) => {
let res;
try {
res = eval(ctx.content);
if (res) res = res.toString();
} catch (e) {
return { cancel: true };
}
ctx.content = !res || res.length == 0 ? "no output" : res;
});
Nothing works π
() =>
{
console.log("am i stupid or something");
}
() => { E("OH THAT WORKS"); }
() => { E("kill me this is hell"); }
Just write all your messages as strings
No support for code blocks smh
that would be nice
that's interesting
##
###
####
#####
######
lol
?..
Rule 11
wrong chat

Real
how do i add type definitions for pseudo-modules
i am generating a module via esbuild loaders
i have tried a bunch of .d.ts stuff (nothing worked)
i am basically generating an array of commands and importing it like import COMMANDS from "~commands";
and ts is complaining about type defs
i cant find any way to define the types and have ts detect it
make sure u dont use import outside of the modules
or it wont work
because ts stupidity
@dawn ledge hiii
thats why this is an inline import https://github.com/Vendicated/Vencord/blob/main/src/modules.d.ts#L22-L25
**modules.d.ts: **Lines 22-25
declare module "~plugins" {
const plugins: Record<string, import("@utils/types").Plugin>;
export default plugins;
}
rewrite Vencord in rust
yop i just copy pasted that and changed the imports
declare module "~commands" {
const COMMANDS: import("@commands/types").HandleableCommand[];
export default COMMANDS;
}

@deep mulch
good
frecency
if i get it to a good state
soon
hey there, does anyone know if it would be possible to intergrate Discord Rich Presences into a website? Ie. when you open a website, a Discord Rich Presence appears. If anyone has any idea or any thoughts lmk here or DMs, working on an interesting project which might appeal to some people 
it is possible and it has been done before too
Use a chrome extension with a local web server and a vencord plugin
Would probably be the easiest way
(dont quote me on that)
you don't need a self-bot
you could just do client-mod i mean
do you mean it shows your rich presence that you have on discord on your website?
or it adds rich presence to your discord that you're viewing the site
the second one xd
I dont think Id be able to just intergrate a uh vencord plugin haha
That is possible
EXPLODE
there was a project that did this
lanyard I think
https://premid.app/ interesting
Ill take a look now
i can't recall but I think you can embed it as an iframe
no
^
hm
idk why you wanna display the site you're viewing as your presence
but it will definitely follow with privacy issues so keep that in mind
xd its because its a Minecraft / Rip off mc client for the web
oh bad wording
yeah premid should work
but I don't understand why people want to publicize every single thing they're fucking doing
i have tried this but i dont really want to stay in a server just to have a png displaying my activity :despair:
i mean its good that it uses """legal""" ways to display it
but meh id rather self bot
Nah I think I didnt word my sentence correctly lol
Playing breathing
Yk lemme just post an explanation, lanyard looks smth similar
okay so you have a web minecraft "client" and you want to have rpc for users using the web client?
Correct
you will either have to use a user token to edit the presence manually
or you'll need to have a bearer token with activities.write scope (this isnt given to applications anymore and finding one with this scope is pretty rare)
idk if arRPC would work (even if it did you cant expect every user to have that on their device)






