#development
1 messages Β· Page 57 of 1
Not just bots, Codes, Templates, Websites, Server templates, Everything someone may need.
suit yourself
There is a ton of free resources out there for that already
Those types of things already exist
It's difficult to just start selling things like that, especially intangible goods
People are hesitant to even buy things from big companies relating to that type of stuff, much less an unknown seller with no reputation
Even if I were interested in starting a business, I wouldn't have the time right now. School combined with college applications has consumed most of my time
The only way you'd win is if your pricing was absurdly cheap and you somehow appeal to a wider audience
As we speak I'm writing an english essay due in 3 hours
Alright
Just saying that it's not as easy as you think it might be to start making money on the internet lol
I can advertise to large area's, The business (not official yet) could be noticed
never said paid advertising
"free" advertising doesn't really exist
Sorry, I'm not trying to burst your bubble or anything, just trying to be realistic lol
I have lots of groups on facebook purely for advertising for free, Discord server's to advertise for free (don't know if they are against TOS or not), Like I said it's not that hard to start everyone just thinks they can't but you never know unless you try.
facebook and discord... not really a very targeted audience I see
Nope just an audience until we can get more
the problem with that is that online "advertising" by posting things has very very very low turnaround
we have a 28% chance of surviving
Don't know where you got that number from
Businesses require investments, time, and work
Very few people ever made it without putting at least a lot of one or more of those things into it
I think you're being a little unrealistic in your expectations
I got nothing but free time right now
So whenever we are free
we can put work into it
Do you have a large amount of money to invest into it?
Gotta spend money to make money
Hence the main issue arises
That is the main issue correct, How about we start off small and work our way up to be bigger later on
freelancing something to earn money then we can start
You don't even know what your business is yet
Now if this were a paid job I would have to consider it, but "splitting the profits" is unappealing in the sense that time isn't free
I would much rather go interview for a job at a fast food place, since they pay guaranteed money, yknow?
hey Move to #general Something we are doing has to be against the rules (for instance talking in development
nobody else is here
I understand
If you do that
do chick-fil-a
they will pay for your college with a scolarship
Just saying that it's unrealistic to expect people to work with you with the idea that they'll eventually get paid
another tip, Try and take your college core classes in Highschool. It will save you time in your life to do better things
I'm graduating this year, I've done several dual credit and ap courses
and fun fact, I may not be in high school or college YET. But I do understand more than most students
Still gotta apply to colleges and get accepted though π
I'm already set on where I'm applying to
Applying to UT Austin and UT Dallas
Austin what state?
Was going to apply to dartmouth but they're a liberal arts school mostly, so their comp sci program isn't as advanced as the other 2 schools on my list
Texas
so do any of the staff actually moderate these channels?
Yes
Good Luck
better get to writing
Then how are we off topic here
Planning to write them all this weekend if possible tbh
Because nobody else is here
mods mostly moderate the other channels because the people that go off-topic in #development are usually regulars
I was gonna change my Nick to Nobody else just to be like I'm Here
I might develop ton's of bots soon, if I did a bot premium
should it be subscription bases
or lifetime
With bot development it is almost always a bad idea to have a lifetime option
so Subscription Based
If your bot gets shut down forever, you'll have angry users asking for refunds
with a 7 day free trial so people will forget they put card info in for a auto recurring subscription
no wonder netflix was smart with the free trial
You gotta publicly state this though
oh for sure
I have a webcam now I can try my idea out
π
Ima finally start an onlyfans /s (This is not nsfw as not everyone does that on onlyfans so mods please)
ayo
Me: about to start making friend with people in top.gg
Everyone: Leaves me on pending
yyour name is atom
Yeah so
I was gonna work on my physics sim tonight but now I'm procrastinating on writing my english essay
Waffle left me on pending
thats what waffle does
I only add people I know irl C:
dont take it to heart
π
And/or people I have known for a long time on discord
damn You don't know me?
no
I'll see you in college /jk
your name reminds me of that shit text editor github made
you said you weren't in high school yet, you won't see me in college because I'll have graduated when you get there π
then why did you add me
If I hit college then I definitely need to be checked out for my brain
oh pog
I could skip grades
:p
I've done it four grades now (Because I started late)
wdym
lol no
and I'm 14
π§’
I started 4 years late
Dont mean shit
I'm smart get over it
thought u meant u were in 8th grade and you're 9
Show us your report card /s
No because then their would be a issue
Eh
how?
Unless your Sheldon
I throw it out the bus window
You just admitted to doing a federal crime
just get better grades 4head
so i don't actually throw it out the bus window like the kids in the back
I throw it in the boys restroom trashcan
Also imagine being in 8th grade and getting shit grades
some dude sped around me in a school zone and INSTANTLY got pulled over
god that felt so good
mfs skipped 4 grades just to fail
EXCUSE YOU
Now I needa get my grades up
hey misty I need help
we're doing antiderivatives and slopefields
I'm only failing science
We haven't hit that yet
BECAUSE SHE TAKES EVERY FUCKING DAY SHE CAN OFF
I hit the biggest W in physics today
100 on the multiple choice section
74 on the FRQ though π
ran out of time
I would dox mine, They are assholes
What about Precalulus?
Precal is a B to B+
EXACTLY IN MY FAMILY YOUR A DISGRACE
π€·ββοΈ
now you see why I don't give mother report card
Not my fault
Just do better
it honestly isn't hard to be an all A student
the hardest part is managing your time
I have a 100% in english and a 93% in econ, but they're college courses so they're in a diff gradebook
how about that in terms for you
I somehow managed to get an 88 in calc BC
if you lived in my family DISGRACE
I only got a 2.93 in pre cal cause I missed one standard
I mixed up function names
The functions they had listed are so hard to differentiate
Rational and Inverse
π
Both look the same to me
Inverse is some weird shit
I know what inverse means, I haven't heard of a parent function called inverse though
What's the equation for it @sharp geyser
You stupid (no offense just being honest)
this isn't the 8th grade math meaning lol
Iβm stupid
misty
Wait
Im trying to find it
I know
:C
write the function y as a function of x i.e. y = f(x) and then solve for x as a function of y.
find it faster
I dont remember it off the top of my head
no
Sound about right @sharp geyser ?
Damnit
Iβm thinking
find the derivative of 7x^5 + 2x^4 - 9x^3 + 15x^2 + 6x - 35
Let me just get my fucking notes
you
hint: it's 35x^4 + 8x^3 - 27x^2 + 30x + 6
I wish my tests were that easy π
Confusing
You fucked my mind
@wheat mesa ok so found it
eh it's pretty easy once you've done derivatives by inspection
It is y = a/x or y = a/x^n
that's the same as rational
no
yes
Rational is y = n(x) / d (x)
Not exclusively
Then I guess I am learning smtth new
(x + 2) / (x-3)(x+1) is also a rational function
your teacher bein stupid and giving yall the wrong notes or my entire math career is a lie
or giving us incomplete notes
If I record something
This is only he first lesson
I don't know what the point of differentiating between rational and inverse is, they're the same thing
Can someone make it a meme?
The second lesson seems to go more indepth
maybe your teacher wants you to explicitly identify when there's no x on top?
I don't see what the point is though
see how they make the same image
the asymptotes are just shifted
the exception being 1/x^n where n is even, then they would both point up
that's weird, my school never did that
My precal teacher was really really nice and good
Part of the reason I absolutely aced that class
Did your teacher actually teach you?
lots
how can that be a meme
I don't understand
bros washing the sink with dish soap
Title " Dumbass washes sink instead of hands "
my AP physics class is tryna get the teacher fired or some shit π
there's only 7 of us left
the other 13 dropped
Idk
My pre cal class we have less than 10
Make it a meme somehow
we had 20 to begin with
Or how about this
13 dropped the class
Before I was added there was like 5-6
you have a smaller school though
I dont remember the exact amount
estimate
but there is like 2-3x more freshman than senior class
in senior class we have like at least 200-300
maybe even less
my high school only has juniors and seniors
our freshman make up like 40% of the school
my graduating class is 1245
The entire school is more than 2500
Just 2 grade levels
We have a fuck tton of freshman
it got to the point we ran out of schoo laptops to give out

there's so many sweatlords in my school
We still struggling to give em out as well
What the fuck
this is weighted gpa
I didn't try at all previous years
unweighted I think mine is like 3.6 or something
Now im actually starting to try
again I still don't see how this can be a "meme"
Idk
Make it a meme
Add something random that makes it a meme
Or dumbass said slip and slide from hell
Whoβs slipping in the sink?
slippin jjijmmy
I have better days
how the hell did I get 2 extra j's and 1 extra i from that
I found a bookmark
I made when I was 6
it's labeled
Hacks
should I download it
just to see what it is?
Lmao
I'm 14
close enough
I didn't skip shit I just never failed
see never tell people real info
because Waffle
I know where your gonna go to college
and?
that's more than enough info a stranger should know
I know this guys place of living
I'm careful with what I display about my life on the internet
Can someone tell me what the hell I found in my bookmarks?
People tell children to never tell anybody anything online because children don't have the same judgement as someone older would have
I don't know if it's real
I would not be posting stuff like that here
or if I'm tripping
Links to sketchy downloads
its 0 bytes
Also I'd delete that
just so you know, 52 thousand people go to one of the colleges I told you about
it's a big world
that's like half the population of the city I live in
I think I'm tripping
Just at one school
Yeah delete that message
or anything
That is highly against ToS
got it
That breaks like 438 clauses of discord's ToS
thank god
π§
I'm actually kind of interested How young me got this
No this has TONS of shit
I'm going through it
Antivirus hasn't triggered
all files unaccseible
maybe it was a prank someone sent me and I thought it was real
@wheat mesa Is this going to be a bae 2.0?
yeah

except bae did regedit, I don't think this guy knows what regedit is
me when
its B
registry editor?
100%
Yeah I know
he looked it up
No
I changed my TTL
only those old fucks on google does
oh what do people call it? I've always called it registry editor
I changed my TTL to 65 if anyone knows why then Your not as stupid as your PFP
I think changing regedit is a bad idea in the first place unless you truly understand what you're doing
Change system values for example I've changed my TTL (time to live) to 65
There's a reason that it asks you like 8 times to confirm
Time to edit my vram so I can play bigger games

where is that one at?
I've only ever done my TTL
It actually works as well 
Nope
We will see Misty after one windows reinstall
the bae incident of 2022
if you think reinstalling windows will help gl
bae tried the same shit and fucked his stuff up even more

it's because his HDD ate shit
I am my local town IT
you can be fine if you have another HDD and a windows stick or something
I've handled OS corruption
I remember when I fucked the partitions on a USB
and by that you mean you've reinstalled windows
I've got plenty
I accidentally deleted all of em instead of wiping them
I've done more than that waffle
there's nothing much more to it than reinstalling windows or telling chkdsk to do its thing (which will ultimately fail, chkdsk is useless as fuck)
Clearing dust doesn't count
What should I use for image recog waffle
do you have any ideas?
I've setup entire networks, Our town has a town wide network purely because since No one can get their ass out their phone. We made a custom alert system that alerts everything in someones house, Alexa, PC, and Phone as long as they are on the wifi.
ML
No shit waffle
idk, python is pretty good for that
yea I am planning on learning py
if you wanna torture yourself then go ahead and use C++
π€
Well don't mind if I do
as for technologies, tensorflow is like the gold standard I believe
not really
cries in pointer provenance
isn't segfault a big issue in C++ as well
skill issue
With smart pointers, not really
I always see people cry about segfaults
Modern C++ actually avoids segfaults pretty well
When ``` Will you go to general?
why use smart pointers when you have Rust references 
true
eww
I would've made my physics sim in rust but C++ just has way more resources out there for learning that sort of thing
aka more code to steal 
ML is like the only time I'll recommend using python because it's genuinely useful to avoid boilerplate
Since it's all done for you under the hood pretty much
anyone know quagmire from family guy?
precisely
*the only option
π
wanna vc?
sure
How do I know if my HP pen is on?
It's from a HP X2 Detachable
and their is no button on the end like an eraser
for what
for kissing
if i tblinks
We have our weekly kissing practice sessions
trying to help him with his sister he's nervous
π€¨ πΈ
"SWEEET HOMEE ALABAMA"
yes officer
I Just Created Bot Β―_(γ)_/Β―
I've this git state.
I want to create a new branch called "main", and merge all these changes to that.
How can I do that?
If I want the little slash command badge to my bot profile I need to reapply my bot via top.gg?
All you need to do is a single command:
$ git switch -c main
This will
- Create a new branch called
main - Add the changes from the current branch to the newly created branch
The badge automatically shows if your bot is verified by discord and has at least one global slash command registered
And how can I register a command?
By creating slash commands using the library you use for your bot
Well unless you donβt use application commands actively you shouldnβt just register one to get that badge
My bot has applications.command
That will cause the interaction to fail anytime somebody tries to use the command
Itβs not just about the scope, do you actively use slash commands?
So like handle slash commands if somebody is using them like chat commands?
My bot only supports and works with slash command.
Ok and itβs already verified by discord?
No. But I saw other bots that doesnβt verified and has the badge.
Iirc only verified bots can have it
It doesn't have to be verified
But this could have changed meanwhile
Ok then it means you have registered guild commands yet and not global commands
*only
This is my friend bot and he said he just enabled the applications command and got the badge automatically.
Okay thanks for the info.
When I enable the code grant to my bot I can't invite it. When I disable it via developer portal the bot works again. Somebody know why is this happening?
Don't enable code grant if you don't actually use it
And if you're asking why, you probably never use code grants. So keep it disabled
Now instead of authorization app the bot now can be invited with captcha.
Ok guess I just leave the code grant alone.
If your application requires multiple scopes then you may need the full OAuth2 flow to ensure a bot doesn't join before your application is granted a token.
You probably misunderstood what a code grant is and when/for what you should use it.
Yeah. I am new with this. Sorry.
If you don't need oauth flow, keep it disabled
Okay.
Oh and I have another problem with a slash command. I applied a new command and deleted the old one but the command still shows in the commands menu.
And after I deleted the command it stills working.
Tf are those drunk monkeys at discord are doing?
Separate user, role, channel select menu options AND another mentionable type (just for users and roles, not channels)?
Also tf is the difference between a mentionable user type and type 5?
Valid users are always mentionable
If type 5 is just the usertag I could also archive that with the text type
Type 5 only accepts users, they're still mentionable
Type 6 only accepts roles, still mentionable
Type 7 accepts both users and roles, both are still mentionable
There's no non-mentionable users, if you're confused about that because that's not what it's trying to say
Can you mix them together?
Iβm aware about that but still why the type not also supports channel mentions?
Like their internal stuff
Mentionables. Things that also actually ping people
And still whatβs the sense if one type accepts BOTH and another type option just one
Useless
Channel mentions does not ping anybody
You think that will mention the target on selection ?
And channel type is also separate because there are multiple types of channels, which it allows you to narrow down which channels you only want
They don't and that's not the point, Discord just uses the term "mentionable" when bringing up things that actually ping people, such as user or role mentions, they're not saying that it'll ping them upon selection
Doesnβt really matter, I donβt see any restriction in the description which channel (type) you can use or not
Dude no, there's no restrictions by default; it's that the developers who use it can narrow and limit which channels the user can choose using the channel_fields option
Also mentioned in #discord-news
I read that, but it didnβt make much sense to me
I provide the channels as select menu option
So I do also filter them already?!
β
Why do I need that field then?
Basically, by default the users can choose all types of channels such as categories, text channels, announcement channels, voice channels, etc etc; with that field it gives you the ability to limit users to for example only be able to choose text channels, or only voice channels, or only both
So you don't provide the channels all the time manually?
Because if you give the, for example, channel IDs of the channels to be displayed in the select menu - it's not really necessary to specify which type is allowed
Since you provide them yourself 
You don't specify what channels are displayed
You only specify what channel types are displayed
So it's automatically populated with all server channels if not specified and filtered with the channel type(s) provided
Yes
When I send the select menu as response to an interaction for example, Iβm already the one whoβs building the select menu and itβs options
Right then makes more sense
Why do I need an user filter
FakE you don't seem to get this at all
Iβm sure i have to pass the channels (or IDs) as array which are selectable in the first place
Ik like how I read it itβs absolutely nonsense
I got that already but it seems to be redundant to add that for select menus if youβre already able to let the user select this via slash commands
The select menu can only show a few options and canβt really utilize small screens while slash command channel select as command option is been solved way better in the ui
The fields mentioned are completely separate:
If you want a field that users can only select users, you choose type 5
If you want a field that users can only select roles, you choose type 6
If you want a field that users can choose mentionable things (in Discord's terms this means things that can actually ping people) AKA both users and roles, you choose type 7
If you want a field that users can choose channels (that they can see, permissions apply here), then you choose type 8, if no channel filter is provided then all channels that the user can see with their permission level will be displayed for selection, otherwise only the specified types of channels will be displayed, such as only text channels or only voice channels
Ok in completely other words then
This feature is redundant as it exists already
Command options are providing this already with a better ui especially for smaller screens (imo)
Uses of slash-commands and select menus aren't the same, you can only choose a single value with slash-commands while select menus allow for multi-selection, and their intuitive uses are different as well
So weβre getting something we can use already instead of requested things lots of people are waiting for, not to mention much more modal types, command options types and so on
Theyβre not, scrolling through a big list of options is worse than filtering while typing as command option
But yes the multi selection is the only advantage here I would agree on
Their uses are absolutely different, for example consider self-role selections, would you rather use a slash-command to go through the roles and choose one for yourself or a select menu that also allows for multi-selection instead of having to run a slash-command repeatedly?
Letβs say scrolling through 66 select menu options is more intuitive and nicer than filtering 66 possible channels by starting to type the name in your opinion?
Yes I agree they have different use cases but still we can ALREADY do that even if itβs a little bit limited as command option but we can ALREADY do it
But weβre still missing features we can NOT do yet
Nobody said we can't do it already, I agree that we're still missing some good features rather just things that we can already do, it's Discord afterall
It is but I wonder why that is being rolled out now
I mean there must be somebody requesting this bullshit
No worries, before adding new features we'll get inline/in-chat text input
Huh what
Lmao that has been requested since slash-commands were introduced, and it's still not implemented
I can totally see discord adding TextInputComponent
Before adding new features we can't do so far
you mean as response?
Well I mean at least we have modals on every device
Why not adding features to them SINCE WE HAVE THEM ALREADY
ffs
Discord is so annoying
Itβs like they publish something, then throw out βhere you have it, now live with this unfinished piece of shit for the next few yearsβ βwe gonna polish tons of other stuff meanwhile nobody actually needsβ
and force you using them*
Man⦠auto correct is killing me today
That's usually discord as well
I will fucking harass you the entire day until the features are live
I swear!
The bully will raise on the next level until you finish stuff
I'll harass you from the Discord terminal by dsc suspend FakE#0037
π€¨
I was about to say being created
But i donβt question this auto correct nonsense anymore
Ok Iβm going to sleep before we run into another discussion
Youβre really challenging me

FakE's questionable autocorrect discussion
ENJOY YOUR ANDROID OPEN ENVIRONMENT AUTO CORRECT ADVANTAGE
While I have to live with iOS auto correct devils and demons

i have a package itself which wrks 100%
make light theme default theme
I would rather delete Discord than to do that
Thatβs colorcism
how do I delete a message from a button?
nvm im dumb, its interaction.message.delete(), not interaction.delete()
Guide is more useful than docs imo

Any ideas on how to spread your npm packages?
Hi
Is there a way to make the script choose a colour from a list and set that as the embed colour.
Example:
const colour = ['Orange','Purple']
Then using the maths to choose
then
.setcolor(colour)
Type thing?
Rough code
you could probably just use Math.random there and have the max value size of your array, then have math.random choose one index
complicated, but look into getting a random element from an array
Thats what I was kind of thinking of.
bunch of stackoverflows for that
Yeah it would probs just be easier to choose and mix it up, so each command has a set colour type thing to keep the updates theme π
Use the delete button on the bot page
I'm doing some dynamic regex because im doing i18n stuff, whats the best way of regex replacing multiple things from a json object
for (const option of options) {
translation.replace(new RegExp(`/{${option}}/`), options[option])
}
return translation```
thats what I currently have but i dont know if thats gonna be very efficent
also worth noting this has not been tested yet
Can you show an example of what you want the output to be
ok
Successfully DM'd {user} to let them know.
Successfully DM'd <@USERID> to let them know.
this is my full code for location stuff ```js
const english = require("./languages/english.json")
module.exports = function (string, lang, options) {
switch (lang.toLowerCase()) {
case "english":
let translation = english[string.toUpperCase()]
if (!translation) return Language string not found
else {
for (const option of options) {
translation.replace(new RegExp(/{${option}}/), options[option])
}
return translation
}
}
}```
and I would dojs client.i18n("DM_SENT", userConfig?.lang, { user:`<@${user.id}>` })
ignore the fact I'm not handling unknown userConfig.lang yet
Maybe you could capture all {...} first then replace each individually
The .replace method takes a function for that
An example:
function template(s, opts) {
return s.replace(/{(\w+?)}/g, (_, name) => {
// `name` is the text inside the `{}`, such as `user` for `{user}`.
return opts[name];
})
}
template("Hello, {user}!", { user: "Klay" }); // "Hello, Klay!"
If you used a regex to match the actual option, that would be much more expensive (since you'd have to loop over each one) and unsafe since the option would be acting as the regex (regex is not that good at being dynamic).
@spark flint

lemme test it rq
yep it worked π
ignore the ` lmao
return translation.replace(/{(\w+?)}/g, (_, option) => options[option] ) would work too right
Though, to comment on my personal experience, I think creating functions to translate text is better than inlining variables in strings. For example,
const translations = {
greet: (user) => `Welcome, ${user}!`,
mail: (user, count) => {
const str = `${user}, you've got`
switch (count) {
case 0:
return `${str} no mail.`;
case 1:
return `${str} 1 mail.`;
default:
return `${str} ${count} mails.`;
}
}
}
function tr(key, ...args) {
return translations[key](...args);
}
console.log(tr("mail", "Klay", 10)) // Klay, you've got 10 mails.
yes
actually yes, pretty sure it works
compiling regular papis with every ophidian call
in an empty 2d array for java, does it look like this? {{}}
no
{new Type[size]}
u cant use array literals inside arrays
tho usually you'd just do new Type[x][y]
wait wdym
i was wondering how a completely empty
2d array looked
like
new int[0][0]
[[]] if u use Arrays.toString()
right so i tried that and im getting []
int[][] arr = new int[0][0];
System.out.println(Arrays.toString(arr));
ah yes, mb
i guess it kinda makes sense
it can't be [[]] because that'd mean it has 1 item
ye
kk ty
cuz theres nothing in the array
nono, why did u ask abt it?
oh i was just curious cuz i thought it would be {{}} for some reason
but now it makes sense
maybe just for the reference itself
but nothing for the actuall array space, since it has no space
yeah
java users finding out that 90% of the optimizations java does is at runtime and not during compile time
jit manages to make java run as fast as cpp sometimes
well, java is technically cpp if we consider bytecode is jvm's asm
AMOGUS. β£ β‘Άβ Άβ ²β β Άβ Άβ’¦β£β β β
β β β β β β β β£°β‘β β’β£β£β£β β β β£·β‘β
β β β β β β β’β‘Ώβ β£Ύβ£β β β β β£·β β β£·β
β β β β β β β£Όβ β β β »β Ώβ Ώβ Ώβ β β β β’Ήβ‘
β β β β β β β‘Ώβ β β β β β β β β β β β’Έβ‘
β β β β β β’Έβ β β β β β β β β β β β β β£
β β β β β β£Όβ β β β β β β β β β β β β β£Ώ
β β β β β’β‘β β β β β β β β β β β β β β£Ώ
β β β β β’Έβ‘β β ⣴β β β β β ³β‘β β β β β£Ώ
β’β‘΄β Άβ ¦β£Ώβ β β β’»β‘β β β β β‘β β β β β£Ώ
β’Ίβ£β β β β β β£β£Όβ β β£ β£€β£Όβ β β β β β‘Ώ
β β β β β β β β β β β£Ύβ‘β β β β β β’β£ β
β β β β β β β β β β β β β β Άβ Άβ Άβ β β
eh, the compiler optimizations are not nearly comparable though
java does very basic optimizations at compile time, like constant folding and such
it even does inlining at RUNTIME
Use bdfd, easy to use and run commands.
What is the best way to setup a postgres schema that has my own ID related to a user + their discord id ... such that I can search by ID or discord id?
The most straight forward but maybe not performant is to have a User table with a secondary field as discordId and performing a query where the discordId = <their id>; however, would it be performant to:
User table with primary key as incrementing ID
UserAccounts table with foreign key as userId + the accont type (discord in this case) + their discord id?
Yep, I was able to do that.
SELECT
*
FROM
users
INNER JOIN
accounts on accounts.user_id = users.id
WHERE accounts.id = '<discord-id>';
However, I fear this won't be performant as my bot scales? Does this inner join raise any concerns?
that statement does not have an impact you should be concerned about as INNER JOIN also selects fields from another table which is only as costly as the conditions the statement runs under. In this case, it's just another SELECT statement. Assuming you pkey everything properly
postgres is weird in that it doesn't have an skey
I'd avoid pkeying auto incrementing values as they may largely be unknown while you're making a statement
Basically, my problem is this:
- My users will be able to link the bot with multiple vendors: Twitch, Discord, Slack, etc.
As the user interacts with the bot from a specific service, I want easy access back to their origin account.
I see
What I would do in this case structure wise is have a table which is the accounts table and the account can have an auto incrementing pkey and contain important info about the user such as their platform specific ID's so that you can do easy lookup within the same statement such as with INNER JOIN. Youβd then have tables to describe user info for each platform you support and pkey on the platform specific ID and have a property which is the user's linked account ID so that you can reverse search to other platforms and don't need to pkey multiple columns.
I feel like doing it this was would leave a lot of bulk out of the was such as if you were just gonna have a table of connections which had no pkey or was pkeyed to multiple columns
I have been suffering trying to lerp between physics states and frames for hours
having fun?
that sucks
Do you at the very least know the equations for the physics you're trying to lerp between?
a channel for software developers
this server is for the website top.gg
if you don't know what this is or how you got here and none of it interests you, perhaps you should leave
Don't worry, my solution at the moment is most certainly terrible for performance
But it works
That's the important part
Performance doesn't matter if it doesn't work!
physics itself isn't terribly optimized to run in a simulation which is why data scientists have beefy ass CPU farms.
To be fair the physics I have implemented at the moment are very basic
All I have is gravity
Which is nearly an O(n^2) algorithm for an N-body simulation, but it's not too bad
Physics engines like Unity 3D's makes a TON of approximations
To be fair Unity is designed for practicality and not accuracy
If everything were 100% accurate, it would be super slow and expensive to run any unity game
Ofc
My physics engine now does timesteps independently of the framerate
Unreal isn't too much better
And when framerate is higher than the frequency of the physics updates, it interpolates between frames
obviously the less physics updates done, the less accuracy, but you can get pretty damn good results with anything above 30hz
honestly most games don't use that high of refresh rate servers
Unless the game was really competitive
I think cs:go has 120hz or 144hz or 240hz
maybe less than that
I feel like the cpu time would just be insane and a lot of approximations would have to be made to reach that target
To be fair in csgo there are few things that have an actual projectile and aren't just hitscan
The players are probably the hardest part of that
not being hitscan probably comes with its own issues though like difficulties in implementing "favor the shooter"
true
with network latencies being high, would lead to a very unattractive experience
(Javascript)
Lets say I have some numbers; 1895, 569 and 19876
how can I turn them into following?: 895, 569, 876
Iβm developing my own game world on VRChat and some users which run on the Meta Quest (mobile hardware) have severe networking latency and overall make the entire network stack god awful. My fiancΓ©e is currently in Germany, so her latency to me is high
I basically just want to remove all thousands
String(number).slice(-3) iirc
might be slice(-2)
^ might work
I just spent the last 3 hours pouring my brain into algorithms so I can't think rn
thanks
π
You're trying to do math on a string
run the array element through the Number constructor
alternatively, you can coerce the string to a number using the + symbol
+counts[0] / 5
Math.round
thanks
looks like there's a lot of fun to be had
Does anyone use Weatherbit.io?
totally upto you
also I'd suggest limiting functions for new users instead of banning them
ok i resolve
right
i'll take that as a good suggestion
ty
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, GUILD_ID), { body: commands });
soo i was wondering if application commands for guilds also apply to global commands
is that how it works or am i completly wrong
why
/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250
throw new DiscordjsError(unrecoverableErrorCodeMap[error.code]);
^
Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
at WebSocketManager.createShards (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15)
at async Client.login (/home/container/node_modules/discord.js/src/client/Client.js:232:7) {
code: 'DisallowedIntents'
}
wdym by also apply to?
Both are different things
Either a command is global, which means itβs available in every guild (and DMs if not disabled) or itβs a guild command, registered in just one or multiple guilds
you can help me pls?
<rejected> Error [DisallowedIntents]: Privileged intent provided is not enabled or whitelisted.
at WebSocketManager.createShards (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:250:15)
at async Client.login (/home/container/node_modules/discord.js/src/client/Client.js:232:7) {
code: 'DisallowedIntents'
}
} reason: Privileged intent provided is not enabled or whitelisted.```
const client = new Client({
intents: 32767,
});
What djs version?
What are those intents as flags?
Canβt check the bitflag on mobile
Did you already try to disable them and enable them again in the developer portal?
yes, but i think is entire application bugged, because it work whit another token
worked with another token
x
y
You've enabled all of the privileged intents in the Discord Developer Portal, if your bot is verified then you can't use those intents until you're approved for them, which you would need to send a request to Discord with a valid use case for each of the privileged intents
"work with another token" is the best excuse I saw this week
for (const file of commandFiles) {
const command = require(`./commands/${file}`);
commands.push(command.data.toJSON());
}
so i was following the discord.js guide and i ran into an issue
Cannot read properties of undefined (reading 'toJSON')
There problem in your ./command/somefile.js
data isnβt set in at least one of your command files
Just log command and see which one it is
You gotta be consistent with your module structure if you donβt do any error checks
module.exports = {
data: something // THIS IS MISSING IN ONE OF YOUR FILES
}
Why am I getting unauthorized to deploy and errors with even starting the bot, It was working yesterday with 0 errors. Im sure all my scripts are now V14 too.
I have not even touched the code either.
Can you show us the exact errors you're getting?
Yeah, its more like a Crash Detected.
Exit code: 0
Literally all I am getting
Im trying to run it from VSC to see the error
Exit code 0 isn't even a crash, it means the code ran successfully with no errors
Confusing me because it said this:
Detected server process in a crashed state!
Above the Exit Code: 0
No.
Started on that yeah.
What does it show you when you do pm2 logs?
I didn't finish pm2, Im hosting it on bothosting rn
You are not authorized to perform this action on this application (On VSC)
But I own the folder and everything.
Apparently not, something is probably owned by something else, what are you running that causes that error to be thrown?
Main file, I am running it from my memory pen though, because its not saved directly to the computer. Could that be the error?
json: [
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object],
[Object], [Object], [Object]
]
},
rawError: {
message: 'You are not authorized to perform this action on this application',
code: 20012
},
code: 20012,
status: 403,
method: 'PUT',
url: 'https://discord.com/api/v10/applications/1025846672321941574/commands'
}``` node deploy-commands.js error
That has nothing to with your computer or where you're hosting it, you're registering global slash-commands to a Discord application (a bot in this case) that you don't have permissions to do so in the first place
This is because the bot token you're using is either invalid or it belongs to a different application
But how do I not have permission to my bot on developer portal, which I just checked and it matches the correct login.
You can't "check" it, the token you're using belongs to a different application, the Discord Developer Portal won't show you the current token, so you'd have to regenerate a new token
Oh ok, It could be I forgot to update to my new one tbh, Ive regenerated it 3 times this week because I kept deleting config.json
Regenerated just incase π, it should work now?
Then use version control such as Git to keep track of changes and restore it once it's deleted, preferably with GitHub
Thanks!
It's online now π
Thank you!!!!!
You're welcome
π I'm going to begin the rewrite now since I've postphoned it.
as a note, do not commit your config.json if u plan on having the repo public
preferrably don't even use a config.json, use environment variables directly
with screen env vars are local to that screen, so u can have a configured environment just for that bot
I think pm2 and docker have something similar
I'm sticking to private, going to find an alternative way
If you have suggestions lemme know.
I...I just gave it
Oh didn't see that sorry, π¦
for example, export A_VAR='123' will set A_VAR with value '123'
on ur application u can just retrieve it from the environment directly
no need for config files or anything
ooo
That will be useful
(that for ubuntu, if ur using any other OS make sure to read how to do it)
Can you reply to me because im flipping between 2 servers
Ok, i will look into it
im making a dashboard rn, I did the auth stuff but how do I fetch the guilds the user is in and check if hes admin and the bot is in it? Isnt in the User thing for some reason
u need to include GUILDS scope to the oauth2 request
have it
then just request the data from the endpoint
well, if the bot is in the server, sure
ah
since u already have access to who's the owner
just make an endpoint in ur bot to retrieve data from it
so i updated my schema and a bunch of old documents are missing one boolean EventPicked:, is there any way to add it onto their doc?
mongoose ^
why is this returning literally no content to the web ui? Just Headers and shizzle
res.json(await client.users.fetch(req.headers.id))
})```
ok boys
why doesn't this work?
// If autorole is on, let's attempt at applying the role to the new member!
if (settings.autoRoleEnabled === "true") {
// Lets now attempt to fetch the role.
// We start by adding a couple variables we are going to use later.
let autoRole = settings.autoRole;
autoRole = autoRole.replace(/<@&(\d+)>/, "$1");
const finalRole = member.guild.roles.cache.get(autoRole)?.id
?? member.guild.roles.cache.find(_role => _role.name.toLowerCase() === autoRole.toLowerCase())?.id;
if (finalRole) await member.roles.add(finalRole).catch((err) => {});
}
the autoRole variable is the mention of the role btw
What exactly "doesn't work"?
it doesn't add the role
but i think i might've just been dumb
and forgot to give a higher role to my bot during testing
You're catching and ignoring the error so don't expect it to tell you why
I am somehow getting this error, even tho the file is there.
what permission value is needed for the user to be able to add bots?
Itβs looking for Green-bot/module/src/cluster.js, but your actual path is Green-bot/dist/module/src/cluster.js
Also my lord why do you have 2 src folders 2 module folders and a dist folder
Talk about confusing π
self-hosting
That has nothing to do with the naming schemes and organization your project has
Ok I guess youβll just ignore exactly what I told you π
no?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Those errors have nothing to do with that other issue, also please update your npm version (run npm i -g npm)
lmao using tune org dependencies
where do i create this invite link?
A small calculator that generates Discord OAuth invite links
discord dashboard has an official calculator




