Initial Commit Thoughts
I've pushed the initial commit for interaction handlers: heavily wip, totally untested and raw (just how I like it)!
https://github.com/sapphiredev/framework/commit/e158f7f0bc9b17f4802f1c9a82abf03dc31c8776
Please take a look at it, leave thoughts (especially you @Developers smh), see what's unclear and what's clear, and list any final thing you'd rather see changed because this interface is nearing it's final state π
β οΈ THIS DOES NOT INCLUDE APPLICATION COMMANDS YET!!! β οΈ
THOSE WILL COME AT A LATER TIME.
vladdyβ’966d ago
CC @.yugen. @RedS @Favna @noftaly @Deleted User @undiedgfx
oh and @kyra π©΅π©·π€π©·π©΅ maybe they'll actually review
>.>
πππππβ’966d ago
UH OH
Lemme finish this batch of lubing
Elliotβ’966d ago
i have a 2h lecture about linked list (read: 2h of free time) in 5min, so i'll look into this π
RedSβ’966d ago
vladdyβ’966d ago
wanky
UndiedGFXβ’966d ago
@vladdy so i thought you pushed that into main branch
and as you said its huge WIP
i thought it would be buggy
and @next wont work as expected
by mb
so yes thats why i said i cant install @next now
Elliotβ’966d ago
Why goerr rather than the monads you use everywhere in sapphire ?
The second example for the parse method should be way simpler (why discard the first result of split? and maybe replace container.prisma with a more abstract thing such as
database.findFirst()
)
otherwise looks fine, but i'm not really good at reviews (and haven't had the time to test it)vladdyβ’966d ago
why
goerr
Simpler interface for me instead of having to wrap it in a try-catch every time making messy code, but if there's better methods I can change that
why discard the first result of split?Sure.. the examples could be improved, but right now it's very much a wip, so even examples will change, but noted noted
Favnaβ’966d ago
doubt it considering I told him to re-review the utilities PR 5x and he did nutting
UndiedGFXβ’966d ago
π
RedSβ’966d ago
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
yeah, I can remove those later
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
Boo hoo
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
Oh nooo what will I ever do allocating an array for the sake of my convenience
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
There's absolutely nothing wrong with it
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
And?
its nanoseconds
You need better arguments than hurr durr muh nanoseconds
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
I am not making the code messier by wrapping it in a try catch just to please your nanosecond thirst
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
????
Wtf do you suggest I do then
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
Nah, you're the one complaining about something thats perfectly fine, so propose a solution
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
π
you really need to get over the speedwhoring btw
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
No, if you really wanted to have an argument I wouldn't have bitched at you over you could've phrased it much better than "hurrr durrr it allocates!!!! MY SPEED!!!1111!!!"
Like
Fuck me
I get you love speed, god knows I do too
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
but stop making your argument revolve strictly on it
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
kyraβ’966d ago
I actually thought about making
Result.from(cb)
and Result.fromAsync(cbOrPromise)
tbhvladdyβ’966d ago
Maybe if you read what the package did you wouldn't say that but of course you wouldn't do that because
oh my god!! oh MY GOD! it allocates an array!! guys look!!!1
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
kyraβ’966d ago
Also, since the code is most likely simple, the code is also most likely inlined
So extra allocations are avoided thanks to later optimisations
vladdyβ’966d ago
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
vladdyβ’966d ago
Was showing it to kyra
kyraβ’966d ago
ye, most likely inlined
Those types are absolutely horrible, Vlad
vladdyβ’966d ago
That..I have to agree with my beg to mkfucking differ but ok
Unknown Userβ’966d ago
Message Not Public
Sign In & Join Server To View
kyraβ’966d ago
@vladdy fun fact
The change you did to optimise, actually de-optimised
kyraβ’966d ago
Because this is now part of the error handler block, where everything turns slower
kyraβ’966d ago
Also, why are you randomly bumping all deps, including typedoc?
kyraβ’966d ago
This should be overloaded,
πππππβ’966d ago
Hey
Go reply on the commit
N00b
Lioness100β’966d ago
I'm just so excited there's progress and this already looks so amazing and promising so thanks alot @vladdy for putting in the hard work
vladdyβ’966d ago
Are you fucking me
kyraβ’966d ago
Perhaps
vladdyβ’966d ago
the change to please doge is worse than the original code
.w.
kyraβ’966d ago
vladdyβ’966d ago
End me
How tho
Safety
Will do when I get back
Favnaβ’966d ago
Dropped a bunch of comments Vladdy
also tagged you in one with a question @kyra π©΅π©·π€π©·π©΅
vladdyβ’966d ago
I saw, I'll answer when I have a laptop
Favnaβ’966d ago
np
it's late
vladdyβ’966d ago
What I can say rn is that the allSettled won't change
I want all handlers to run, not it to stop after the first handler errors
I have a flight so
RedSβ’965d ago
Lioness100β’965d ago
Also I think a
Result.from[Async]
would be really cool tbhvladdyβ’957d ago
@kyra π©΅π©·π€π©·π©΅ work on that pls
I don't mind it, quite the opposite
I wanna get it right in one PR
@kyra π©΅π©·π€π©·π©΅question
can this be optimized at all?
or is it fine
kyraβ’957d ago
That's O(n)
So can't be optimised more
vladdyβ’957d ago
Ah
kek
is this better?
related to https://canary.discord.com/channels/737141877803057244/891321859650510878/891426667887747152
kyraβ’957d ago
vladdyβ’957d ago
we don't have that
kyraβ’957d ago
We do
Rebase
vladdyβ’957d ago
i..
for fuck sake
vladdyβ’957d ago
@Favna
https://github.com/sapphiredev/framework/commit/e158f7f0bc9b17f4802f1c9a82abf03dc31c8776#r57062331
Not changing as I want all errors reported, not just the first one
vladdyβ’957d ago
https://github.com/sapphiredev/framework/commit/e158f7f0bc9b17f4802f1c9a82abf03dc31c8776#r57061938
I'm leaning towards camelCase, thoughts? @Developers
πππππβ’957d ago
Inb4I have to update my plugin
Favnaβ’957d ago
The store for scheduled tasks in the plugin will be
scheduled-task
s as well in the current pe
The store for scheduled tasks in the plugin will be scheduled-task
s as well in the current pr
I'll let @kyra π©΅π©·π€π©·π©΅ make the final call Vladdy. I can go either way.
But if we do go camelCase then yes Yugen's PR should be adjusted.kyraβ’957d ago
scheduled-tasks
I'm not a fan of having uppercase characters
Favnaβ’957d ago
So also
interaction-handlers
then vladdyβ’957d ago
E w
a dash??
Favnaβ’957d ago
Well that's what was in my comment innit
vladdyβ’957d ago
i'd rather go the python land route and use snake_case than
kyraβ’957d ago
Nobody uses _ in filenames
vladdyβ’957d ago
Beg to differ
kyraβ’957d ago
And they don't work nicely with Ctrl + arrows
vladdyβ’957d ago
??
Favnaβ’957d ago
Control + arrow navigation skips over _ as it treats it as 1 word whereas - stops at the hyphen.
vladdyβ’957d ago
and that matters how
Favnaβ’957d ago
It's annoying when something that are actually 2 words is treated as 1 when using keyboard i.e. vim navigation
vladdyβ’957d ago
Favnaβ’957d ago
Because it means using individual arrow keys which is a bother
vladdyβ’957d ago
https://github.com/sapphiredev/framework/commit/1c3dd2674bc48795cfecebf541ca55d756c365cf @Favna @kyra π©΅π©·π€π©·π©΅ happe?
Favnaβ’957d ago
"a link or a promised link"
Let's return something else because breaking promises is fun /s
Anyway, yes, happe
Welcome to the Sapphire Discord server! The next-gen object-oriented Discord.js bot framework can be found here.
2.2KMembers
View on DiscordWant results from more Discord servers?
More PostsThe statefulness or statelessness of Interactions1. Most likely, but it would be a nice addition if I was able to have non-state "callbacks" as mentiInteraction handlers in the command instead of globallyHonestly. I would much rather add interactions from my command and from there tell to continue in (fReply sess 2**1.** Yes. This also follows the design pattern that we more-or-less employ already for Sapphire. Wdont feel like creating a review on GitHub...PR is up: https://github.com/sapphiredev/utilities/pull/152
CC @kyra π©΅π©·π€π©·π©΅ @vladdy