#development
1 messages · Page 111 of 1
Your bot needs to share a server with that emoji in it
<a>
ik bro
And that wont work either
no
You need the full mention
ik
can bots create stickers?
yse
yes
message.guild.stickers.create(`url`, `sticker name`, "name of default emoji")```
i always put headstone or moyai
as default emoji
then is just like those bots that require you to create a channel named "logs" or whatever
the bot will create the stickers it needs in every server it joins
lmao
guys how does guild.memberCount work in discord.js
because it doesn't seem to be live
then why does it only update
i might be thinking of invites lemme check
const guild = client.guilds.cache.get("693237498264027156")
guild.memberCount```
do i need the guild members intent?
oh i didn't return that nvm
but not mine
because i have member intents
so i need that for it to always be right?
yes
yes
damn
well do you have a reason for it
Or don't lie and use the approximate count
i got it on my first bot from lying 
Which is generally somewhat accurate
yeah true
it's kinda accurate
if you generated an invite and kept checking that invite it would show accurate
but that would require generating an invite for all the guilds
which i don't think is a good idea
discord is poopy
yes, the members intent is required, since memberCount is updated by djs using memberJoin/memberLeave events
yes and no
from a strict efficiency standpoint, its a lot and could be much less, but from a djs standpoint its pretty normal
not much you can do, thats the djs way of doing things
you can check your caches, channel cache usually takes a lot of memory
yeah i cache all channels bc i have to
also check your heap to rss ratio (process.memoryUsage)
heap is what js is actually using (djs caches, etc), rss is what node itself it reserving from the system (not actually using, but reserved)
{"rss":119013376,"heapTotal":45862912,"heapUsed":41186440,"external":1892048,"arrayBuffers":622723}
so the actual js usage is 45mb
is this in bytes
probably just djs

you can easily test that
compare your bot with a barebones djs bot without any other code
and see how much ram they take
so i should remove all the code from my bot and run it?
sure
makes sense
can i have my bot connected twice
cus i don't want to shut it down
while i test it
hey um, how would you send dms to lets say 44k users or even more without getting rate limited? how does dyno or carl do it
you don't
by sending them
and they probably have more flexible rate limits because they're big
yeah but logically how would you do it, queue? wait 500ms before sending the next dm?
that would just make reminders inefficient no
yes you can
maybe? tim could probably give you a better answer
queue + sharding + probably upgraded ratelimits from discord
reminders are rarely a shit ton of them at the same time
that too
they have features that are probably a lot more requests than simply reminders
yeah
but just wanted to know how you could deal with a scenario where you want to send dms to a lot of people without rate limit
queue is probably the best way to avoid a ratelimit imho
ig
the rate limit is usually 5 per 5 seconds per channel, different dms are different channels, so they dont share the same rate limit
but you may run into the global rate limit of 50 per second shared with all requests
big bots have a larger global rate limit
understood
ok
thanks
in any case thats something your library should be handling
connecting a bot with no code should cause no issues with the main connection right?
nop
lmao
one of the other admins
guys how can i see the size of a file in linux
du -sh filename
ok
Size prob
it is this is only 1 week worth of data
☠️
ye
but the amount of data I collect is slowly increasing so it'll probably be closer to 3 - 4 gb
wtf is this
it's old ah shit
video on the website is from 2009 
Cry
smile
process.on('unhandledRejection', async (reason, p) => {
return errorChannel.send({
embeds: [
new Discord.EmbedBuilder()
.setTitle("New unhandledRejection encounted")
.setDescription(`\`\`\`${reason.stack}\`\`\``)
.setFooter(`${client.user.tag}`)
.setColor("#f09999")
]
})
});
process.on('uncaughtException', (reason, origin) => {
return errorChannel.send({
embeds: [
new Discord.EmbedBuilder()
.setTitle("New uncaughtExpection encounted")
.setDescription(`\`\`\`${reason.stack}\`\`\``)
.setFooter(`${client.user.tag}`)
.setColor("#f09999")
]
})
});
process.on('uncaughtExceptionMonitor', (reason, origin) => {
return errorChannel.send({
embeds: [
new Discord.EmbedBuilder()
.setTitle("New uncaughtExceptionMonitor encounted")
.setDescription(`\`\`\`${reason.stack}\`\`\``)
.setFooter(`${client.user.tag}`)
.setColor("#f09999")
]
})
})```why wont this error handler sending a error to the webhook? instead it logs in the console.log
It would be easier if you posted the code of where it occurs
Why even monitor these specifically
what
You wrote that it logs in the console.log(). It would be nice to see this part of the code instead
I don't see any console.log() here
yea
thats the whole reason
it logs in the console
and not send a message via the webhook
Are you using any try catch or .catch() there?
and when i try to make an error happen it somehow doesn't log anything
no
How do I log every time the Express server uses res.write() using Axios?
yes you can
fuck
in js there are two categories of data, primitives and objects
array is an object
and all objects are references
so const chunks holds a reference to that array
interesting
the const immutability applies to the reference only, the array itself is still mutable
so you cant do chunks = something else
but you can do chunks.something = something else
What would this technically show?
If you'd print it
Or some
something like <Array> [], something: something else
hmm
everything that is not a primitive (string, number, null, undefined, etc) is an object, and all objects can have keys added/removed
so you can add random keys to arrays, functions, etc
js is weird like that
And guessing you can do "abc".key = 1
you can, but it wont work, bcause string is a primitive
but it works with arrays
and funcions for example
because they are both objects
hey guys i got an assignment of my university in java and i am trying to test my code with a tester they gave me. My code runs perfectly fine yet the tester says this:
because the return value of "java.util.Map.get(Object)" is null
java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because the return value of "java.util.Map.get(Object)" is null
if you could help, please @ me here so i can dm you the files to inspect.
@eternal osprey whatever (hash)map you're trying to access, the value you're trying to get does not exist
though cant 100% help you since this is way beyond what I have ever done in java ngl
The problem is, if i run the same exact expression in my own main it works
oh
just in the tester it fucks up??
whats env?
a hashmap of<String, Double>
and e.eval does what?
evaluate an expression, so:
add(con(5.0), con(3.2)) will return 5+3.2 = 8.2
you can do something like this i guess ```js
app.response.originalSend = app.response.send;
app.response.send = function(...args) {
// do something with ...args, like console.log or axios
return this.originalSend(...args)
}
its not a good idea to catch errors like that, not all errors can be caught, for example syntaxError cannot be caught, its harder to tell where exactly the problem is coming from, unhandledRejection will likely give you a generic stack trace with no useful information, some errors can leave the process in a corrupted state, in which case it will exit anyway, and who knows what other issues you might face
the correct way of handling errors is to handle them on the correct places in your code, for example if you want a global error handler for all events, apply a try catch in your root event handler
You can pass with a pointer or a reference
Reference for this sounds like what you want though
Yes
Make an engine, then game dev with a proper engine will make you appreciate it more
The coding part is so fucking tedious and since this is my first try at anything like it, I literally have no fucking clue what I'm doing or what I should do to achieve what I want. I want to just world build and design not slave away at code and read forums which mostly consist of outdated answers from 6 years ago
You doing 2d or 3D
3D
And what engine are you using
Unity3D
Ah
Can’t speak much for 3d tbh, but it might be useful to make a simpler 2d game to get familiar with the engine first
Yeah unreal is a massive learning curve
I don't play 2D games. They're just not fun to me
Well yeah but I’m just saying that 2d will help you familiarize yourself with the engine more before you try more difficult stuff
You're falling down a path of burnout btw
It doesn’t have to be a polished game, you can just create something fun and stupid to get used to the process
I'm familiar with the engine - well now I am
I know. But it has been a good learning experience for me at the very least
I do have fun with the scene editing part

for context, I'm working on a looter shooter and I don't have a concrete story yet, just a general idea for the game, so for a tech demo, I'm making a survival mode first which this is the arena so far
gotta add textures to the terrain and add vegetation
Also have player controls and spawning already done as well as 2 cameras to render the first person hud and the game view separately (fov reasons)
Using chatgpt and novel ai to generate concept art and ideas
as well as coding help
actually really helpful
hola
Omg could i send my file to someone that is experinced in java
i have a really stubborn issue in my tester
and honestly i am clueless by now
Still doing that math expression parser?
Math expression evaluators are the bane of existence
Mathjs straight up using the eval function be having an exploit every week
Only real solution would be to do your own arithmetic
instead of relying on the language's native math parser if a function to evaluate an expression exists. This approach is always bad
The lib i use doesn't 
so like-
I'm trying to verify my bot
and does anyone know why discords doing this 💀
I literally got no idea, I never had this happen before
because your bot doesnt have the add server button iirc
how do I get that then
I havent verified a bot in like a year
nvm
got found a yt vid
It is just in your bot settings
Your guidelines and TOS links
Oh
Nvm
I didn’t read everything
don’t listen to me
💀
Especially when
Lmaooo
guys whats the best way to make an inventory with sql
cus i don't think making a table for every user is a good idea
And thats not how it works either
what
Have 3 tables
One for the item info
One for users
One that associates the item with the user
Item info can contain info like the name and a description, perhaps a price too
The user table should at least have one column that contains the id of the third table
The third table is responsible for associating the item with a user, such as a user id and the item id, perhaps a count too of how many items you have
That's at least how i would work with that
what about this
wym thats not how it works
Why do you want tables for each user, thats not how SQL works
remember the farthest battle got was basic crud ops
what
because it separates the data for each user
Whatever
Its difficult to explain basics to you, sorry
Lemme find you some resources
👀
I provided you with an approach that assumes you understand the basics of sql
I know the basics of sql
Then you should be able to understand what i am referring to this
I was never referring to that
what is this suppose to mean
Ugh
Why do you want to have a table for each user
I said why already
Because that is not how SQL works, that is not how SQL is structured on
No
That is not what SQL is meant for and that is not something you can easily do
you could, but your database would not grow at all
I dont even know how you'd make queries for that structure
that doesn't explain anything you said but ok
since table names cant be dynamic
It does work to make such queries
But like
?????
why not?
I can just create a table with the users ID
Again refer to my approach above, 3 tables, one that's responsible for your inventory items (description, names, prices) one that is responsible for the user (user id, name etc), one that associates a user to the item, essentially the inventory table
this doesn't make sense
but u cant write safe queries if the table name is unknown
by unknown I mean not static
I'm giving you an approach that is suitable for SQL, an approach that is MEANT for SQL
If thats something you can't understand, consider using nosql databases like mongodb
no
Or any other key value database
I understand what you mean
you said that's not how it works but I didn't say anything about the workings of anything
so I'm wondering what you're referring to
aurel means you're using a spoon to eat beef
you can, but it's not how you're supposed to do it
hm ok
Nah, eating a soup out of a strainer
so I should just create an inventory table for everyone and do something like SELECT * FROM inventory WHERE user = '307307861032304652';
You should create three tables
why do i need 3
Describes what each table does.
covers database normalization, and why you should use it.
https://phoenixnap.com/kb/database-normalization
Yes, to associate the 2 tables, multiple users can have the same item
It also is important for expandability.

The middle table is the inventory, having the id from the user table and the id of the item, aswell as something like a item count
whats the third one for then
the items
Item: contains your items
UserItem: contains the user and its items (such as user 1 owns item1, user 1 owns item2 etc)
User: the user ofc
Also, you're saving a lot on redundancy
which this article covers really well
why do I need a table for a user
you just said not to do that 
???????
👀 read the article tbh
Head hurt
no
ok
i have another question tho
how would i make like
random chance of something
like lets say I have 5 items and I want each to be rarer than the other, how would I go about randomly generating a set amount of the items
funny how you literally diregard any info they give yet ask another question right after
well, I didn't disregard it
I partially understand 👍
Percentages
actually nvm I found this package and imma just steal it's code https://www.npmjs.com/package/random-item-percent
😋
you can also do it in one
fr?
Average js “dev”
export default ({
itemsList = []
}) => {
let chances = []
const sum = itemsList.reduce(
(prev, curr) => prev + curr.percent,
0
)
let acc = 0
chances = itemsList.map(
({ percent }) => (acc = percent + acc)
)
const rand = Math.random() * sum
const itemIndex = chances.filter((el) => el <= rand)
.length
const result = itemsList.find(
(_, index) => index === itemIndex
)
return {
itemEnum: result ? result.itemEnum : null,
item: result ? result : {}
}
}
looks about right
Guarantee you have no idea what that code even does
Bruh
the performance of that code would fucking tank at scale wtf
don't think they'll ever reach "scale" to begin with

so Im trying to make a reverse proxy and the thing im currently stuck at is websockets, now if I proxy a normal websocket it works fine but for some reason socket.io websockets just end up in a socket hang. what am I doing wrong? https://pastes.dev/J4HocZs1Ww
Imagine writing scalable code
socket.io is its own protocol
it isn't compliant with window.WebSocket
yeah but I doubt nginx implemented something specific just for socket.io
nginx reverse proxy works fine
It still operates under HTTP and the thing is that you only need to forward the Upgrade request and keep the socket open and just pipe the data of the client socket to the internal one and vice versa
er maybe it doesn't use Upgrade. Check the docs
it might just be a keep-alive
in my browser console its just a normal ws connection
Never trust the browser since each one varies
always trust the data you get on your server
Maybe it's backed by WebSocket, idk
so I basically need to also support polling?
what have i done
I should be, all http requests work fine
use turbopack
try seeing what fails then
all i did was installing mui
how do i use that
iterating over the array too many times
hm
I honestly dont remember. its made by the nextjs team though and makes compiling so fast
maybe I’ll google to see if theres a better solution
I dont use it, but I wish I did
rust right?
You don't even need an Array to get chances
something like that ye
why not
Math
what math
There's a mathematical equation using Math.random() to get a random number between 2 numbers
but i want it to be precentage
Math.random() already returns a value between 0 and 1, so just multiply by 100
but how would i assoicate that number with the precentage to see which item was picked 
battleless when he can't find a package or dev to do all of the work for him

associate different items with ranges of numbers like 0-0.10 could be 1 thing while 0.11-0.20 can be another.
Of course, this is an even distribution outcome so you cannot weight towards anything specific
hm
a few weeks ago battle said studying in school isn't important
when we were talking about how you don't pay attention until the last week
i dont recall saying that
🙂

what does that have to do with this
I'm just trying to support kuuhaku's claim here
But also your logical reasoning is VERY questionable
oh u found it
you guys are putting words in my mouth
these are quite literally words that came out of your brain
you conceived these thoughts and communicated them willingly
i dont get whats the point of you bringing up all these
send a screenshot
bro we did
we just think it's funny that you refuse to think for yourself and try to get everyone to do the hard part for you
in none of those screenshots i said studying wasnt important
if you did pay attention to classes, you'd know how to solve those stuff you're struggling with
^^
math classes specifically
ok and
Even if not directly related, you'd figure out how to logically reason your situation out, especially if you ever did any sort of stats
nah
Waffle signing out 🫡 good luck to you soldiers that attempt to reason with delusion
I still cant believe people like you are real and not trolling, its like talking to a kindergartener that wants to do all the cool stuff but understands shit so asks every step of the way instead of taking his time to actually understand what hes trying to do
yeah no you can spare your response, I dont care about you
thats nice
i don't care about you either
lol
good
everyone here just always attacking me for no reason
bros lying about shit i apparently said
and there we go again
kuuhaku is always trying to make me look bad for some reason
no
you cant know what ive seen
you guys just call me delusional for no reason
cry



I'm going to be honest guys, we're probably going to have to start muting for this stuff. It turns into the same conversation all the time, and its kind of getting out of hand.
In the future just ignore questions if you don't feel like answering them in a productive way please.
lmao what did i miss

ok
hey guys could someone help me with some web scraping.
i tried to get some listings for cars from this site
but it returns me errors, does it have anti-scraping measures?
yes
foooock
i suppose there's no workaround
well, might have to manually check for cars then
how do you check it so easily?
I was looking for so long
do they have an api or something
perhaps an internal api so it renders client side not server side
are there any online tools for that?
I want to first check if it's possible before trying it out lol
yes, simply send a get request to the url
hehhe
i am trying to get the price
const price = $('h2.boxedarticle--price')
but it returns me literally nothing, an empty string
why is that?
just tested in some random playground and it works for me lol
keep in mind that $() returns the jquery-wrapped element
not the value/contents of the element
if you want the text content, add .text()
not needed but its nice to have, increasing specificity is never a bad thing
ahhh yeah it worked for me
my compiler is bugging for some reason
tbh mac is soo cool to code with
but many pgrograms just have bugs lmao
intellji refuses to fucking work
vsc has such a bad code runner for mac
🤮
Nobody thinks, so nope no ideas
You only defer the reply if the label is modal_maxwarnings when that defer should be in the else block. Even the first if will fail because the interaction would have already been replied to so you can't reply again
so i should remove the defers and place the defer in the file that creates the modal?
You don't even need the defer and edit original since you aren't doing any async work it seems
just regular reply unless you're doing async work elsewhere
no idk how you got that
async is at the top of the file
but are you awaiting anything
just because something is async doesn't mean it's gonna take forever
ah nvm I am totally blind yeah you do need the defer
just move the defer into the else block before the findOne
and delete it from the first if block
what's the difference between
and ==?
This will be interesting to code 😄
oh christ
uh ye ... starting today and finishing it today with some millions of bugs but thats okay xD
lol
Ok people who are good with Next.js
https://next-auth.js.org/errors#client_fetch_error undefined {
error: {},
url: 'http://localhost:3000/api/auth/session',
message: undefined
}```
Getting this whilst attempting to get logged in user
doing ```js
import { getSession } from "next-auth/react";
export default async function handler(req, res) {
if (req.method !== 'POST') {
return res.status(405).json({ message: 'Method not allowed' });
}
const { tag } = req.query;
const session = await getSession({ req });
if (!session) {
console.log([API] Unauthenticated user tried to verify clan ${tag});
return res.status(401).json({ success: false, message: 'Unauthorized' });
}
}```
(cut down code)
nextauth_url is present
Looks like you're trying to secure an api route, if so https://next-auth.js.org/tutorials/securing-pages-and-api-routes#securing-api-routes
You need to use getServerSession
You can easily protect client and server side rendered pages and API routes with NextAuth.js.
I managed to figure it out
it wasn't related to that
when I removed the headers it worked
by headers, I was literally only passing content type
but when removed, it worked fine
why does it never work to copy codes from the internet
i have to explain it to someone but i dont know how to tell it
Because you need to know what you're copying and why it works the way it does
Nobody mindlessly copies code from the Internet hoping that it will somehow work. Sometimes code needs tweaking to make it work in your project
ik that is what i was saying but i mean like i use for a option in a slashcommand name: 'name here' but the tutorial is saying .setName("name here")
altough we use the same version so why is that
because the discord.js tutorial is using the slash command builder and you aren't
https://www.youtube.com/watch?v=YSrzLXeUix0 i am using this tutorial
This is how you can make an advanced ticket system for your discord bot!
Want to become a member? Want access to pastebins? Join below!
🡺 https://www.youtube.com/channel/UC3JG-y_RtMszRFkdxUrrEEQ/join
Invite my bots!:
🡺 https://top.gg/bot/977594345756688384 (ESKI)
🡺 https://discord.com/api/oauth2/authorize?client_id=986762502455033916&permissi...
Exactly, the builder is optional and I personally prefer not to use it, even though they use it in practically every "guide"
yeah^
i if copy this code is that good or not
look and see yourself?
why not? it's relatively new, only 2 months old
From what I can see, there is no link to github in this video, so rewriting this code from the video will be a pain
Ah yes, you can only get the source code if you support the channel
I would rather find similar code on github 
Basically don't put the styling outside of the []()
But rather inside
E.g. [**bold**]() or [__underlined__]()
Does anyone already try to install vc_redist with a MSI from Electronjs?
my mind immediately read undefined

much js
Is it okay to Make my Discord Bot with YouTube Source Supported?
bcz I heard a news that Discord removing discord bots that support YouTube Source
is it true?
Yes
That is a risk yeah. If they spot it they’ll remove.
o
Hoo
i wouldn't recommend it because youtube already has a policy against discord bots that use API
:/
found 0 vulnerabilities
Started refreshing application (/) commands.
DiscordAPIError[50035]: Invalid Form Body
5.name[BASE_TYPE_REQUIRED]: This field is required
6.name[BASE_TYPE_REQUIRED]: This field is required
at SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:933:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:712:14)
at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1321:22)
at async /home/container/index.js:27:9 {
rawError: {
code: 50035,
errors: { '5': [Object], '6': [Object] },
message: 'Invalid Form Body'
},
does anyone know what i need to do
okay thank you
i think your issue is referring to a form not being valid
so what do i need to type
data: new SlashCommandBuilder()
.setName('ticket-set')
.setDescription(this sets up the ticket message and system)
.addChannelOption(option => option.setName('channel').setDescription(the channel you want to send the ticket message in).addChannelTypes(ChannelType.GuildText).setRequired(true))
.addChannelOption(option => option.setName('category').setDescription(the category you want the ticket to be sent in).addChannelTypes(ChannelType.GuildCategory).setRequired(true)),
async execute (interaction) {
you're sure those are the right lines?
try {
console.log('Started refreshing application (/) commands.');
await rest.put(
Routes.applicationCommands('1092805473696223283'),
{ body: commands },
);
but before i was coding the ticket bot i didnt have any problems with this code
so... one of the commands you're trying to register doesn't have a valid form
console.log commands there and we will find out
i hope there aren't much of it
how to i need to do
that
console log the var commands before, please
what do mean?
can you join general voice call
how would that help in any way? just console log the var and paste the results here
some of your slash commands (and options) simply doesn't follow the rules of discord
console.log()
and whatever you need in the parenthesis
oops i wasn't paying attention to chat
okay wait i am now in fluidnodes. and where do i need to console.log('my command')
just log the var right before your try/catch clause
technically it could also be an issue of a command response like an invalid embed field etc.
no it has not
An Invalid Form Body can be caused by countless ways of sending your form to the rest api
that's a brand new option i haven't noticed yet
an invalid command form, embed etc.
i bet it has to do with .addchanneloption
Is there any way to responsive center grow animation in Framer Motion?
DiscordAPIError[50035]: Invalid Form Body
5.name[BASE_TYPE_REQUIRED]: This field is required
6.name[BASE_TYPE_REQUIRED]: This field is required
at SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:933:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:712:14)
at async REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1321:22)
at async /home/container/index.js:27:9 {
rawError: {
code: 50035,
errors: { '5': [Object], '6': [Object] },
message: 'Invalid Form Body'
how to fix this
without providing the logs I asked for, we can't do anything
okay but i dont know where to do that and how
so can you come in to a call with me to give me good information on how to do it
you seem to be lacking the fundamental knowledge of the language you're using then
which makes it hard to impossible to help
sadly
understandable
the programming language, Sir
unlike someone else
I was asking to log the var commands here #development message
okay so what do i need to type and where
to keep things as simple as possible to understand, just remove the commands file by file and see which one is causing the error
that would almost help a lot
instead of guessing around
okay
if you know which ones is causing the error, get back and we will continue
i have 2 commands wich give the error i think
it is ticket-setup and ticket-disable
alright
let's start with the first one
lemme see what u done there
try not to send it in here, please
use a service like hastebin or sourcebin
yo how do i code a basic music bot with html
use *
else it's impossible to view on mobile
copy my text above
that works too
this sourbin is from my ticket-disable.js command
what is ticketschema
you're 100% sure this command is causing the error?
first question i have is about ticketschema
because i see nowhere that it is defined
ticket schema
oh
ticketSchema*
what's your djs version
v14
latest built?
look in package.json
can you send the code for the other command
ofc
ok, did the error occur right on when starting your bot or when executing the command in discord?
because the body of the command your linked is valid
looks like command execution
xD
you're joking right?
nah that has to be a joke
he is death srs
What does the logged var menushows?
I keep thinking the action row component type is missing
i feel like something wasn't defined
in your console once you execute the command
okay
idk fluidnodes, there must be some console window, terminal or logging file somewhere
that's already inside your command you shared
can you execute the command in your discord server ?
nope im serious
this is insanely overpriced
you can't
ok so the registration fails but the command has a valid name, description etc
what can u even run in 1gb storage/250 ram?
i think so yeah
asking your once again, are you sure, 100% sure this file is causing the error?
yes because i removed the other file and it gave the same error
that means it's not that code
doesn't matter at all, the error is related to a rest api call having an invalid form body
this is the code that gives the eroor
error
two interactions are missing and it's not that code
the interaction is missing because one interaction to register is creating the error and the process stops
what dose everyone evan code on
nodejs, python, and c#
How can I create a multipurpose 600 commands bot with CSS please?
almost fell for that
okay
yeah those two commands aren't what's causing the error
just change your code to this and see if the error occurs again
I still bet it's the command being read before, but let's go for it
const { PermissionsBitField, EmbedBuilder, ChannelType, ActionRowBuilder, selectMenuBuilder, SlashCommandBuilder } = require("discord.js");
module.exports =
{
data: new SlashCommandBuilder()
.setName('ticket-set')
.setDescription(`this sets up the ticket message and system`),
async execute(interaction)
{
await interaction.reply({ content: `your ticket system has been set up in ${channel}`, ephemeral: true });
}
};
can css make http requests? would be fun to try if yes
this question...
t
imagine not setting the fields manually
i don't think the database exists
wow
btw u leaked the database credentials in the links u sent
THANK YOU... IMAGINE USING THE BUILDERS my gosh
that is, if it's valid at all
its not valid
there
you just answered ur question then
it doesn't exist so it doesn't exactly know what that 'database' is
just concentrate on what u should do #development message
what's preventing you from using
new SlashCommandBuilder({
name: 'ticket-set',
description: 'this sets up the ticket message and system',
});
// codex.format.global.sayu
// ...
trailingComma: true
what prevents you from not using the builders at all?
i don't think that's possible but i'd be surprised if it actually is

oh boy don't go near flutter then
using builder is for some conditional stuff
trailling comma on EVERY line
for const values, just use the object
more readable, less function calls
im emotionally damaged by now
the lines u don't put a comma get formatted into a single line
TIL about trailing commas
the pain is real
and become this
lmfao
so yeah, you either live with commas or live with 800 char lines
and no, u cant customize the formatter
aka dangling commas typed after the last item of a list of elements
me waiting for the dude to reply while getting physical pain by trailing commas
> Sayuri.Codex config style:trailingComma LanguageRequirement
Updated config, updated one language [Dart]
ouch
looking at my 2019 self
yes, 2-space tabs btw
I honestly want to say "fuck you" to whoever considered enforcing dart formatting
me having to consider using flutter as UI solutions to LilyOS:
the line where my bot token is. the last line it says''SyntaxError: Unexpected end of input''
cough
{
name: 'ticket-set',
description: 'this sets up the ticket message and system',
options: []
}
bot.login('my token')
yeah whatever

i stopped using djs before the builders show up
so
i also assign the option manually from code
must be somewhere else
unless you have something else under it as in an extra line with something in it
yes, brings us back to, why tf would you use the builders at all?
const rest = new REST({ version: '9' }).setToken('my token');
is this good for in the beginning
tf is rest
imagine dealing with the clusterfuck of changing the guards, methods, classes whenever djs decides again to change their names, or simply change their case etc
just store a token somewhere secure
it's in the documentation
REpresentative Stateful Transport
they call it REST?
It’s a client for accessing raw API methods pretty much, even though djs has methods for that in the normal client already
it's REpresentational state transfer
It’s pretty awful design for the guide to teach people to use it
ik what rest is, I just don't know why d.js uses it for bot client building
no need to import and use the REST handler in djs at all, how many times did I already say to use the INBUILT CLASSES AND METHODS
like, a builder called REST
yeah i forgor
There isn’t a reason pretty much, the guide is pretty bad in terms of writing decent code
bot.login('TOKEN')
SyntaxError: Unexpected end of input
people still use it
let them
because they are clueless
syntax error
check where the text editor highlight the error
This is why I don’t build bots anymore
so wait
The only lib I ever truly liked still isn’t maintained :c
and they are following the most stupid guide about djs at all, the djs guide itself
nvm
also use discordx if you know typescript
what i was about to say would prove a point
better way to build bot commands
This guy clearly does not know javascript, let alone typescript 
so they can remove that unnecessary rest line then
better way is to just not build them at all
it doesnt highlight anything at al
inb4 he’s using notepad
i started with python before javascript so i agree
is that what fluidnodes is?
lemme look
gaming
yup it's a hosting service
does it underline the certain area where the syntax would be
it would look like }); ^ SyntaxError; Unexpected end of input
usually unexpected input error is self explainable
Go back up to what I wrote and copy this please
I can’t wait until I have time to start another ts project, native support for decorators is pog
agreed
Cant find it can you send it Alain
Again
no the error was already gone
so there's another error?
but i main the error of the bot.login('my token')
How
Actually it can
But just very basic requests
Hi I am making a ticket system but when i choose the category to send the tickets in and then i create a ticket it doesnt send the ticket in that category but just on top of the channel list in the server
i already tried to console.log it but it says undefined
but i saved it the right way to my db
lel






