#development
1 messages Ā· Page 8 of 1
can i add these below buttons to it v12 version from glitch
Then why is @ancient nova breaking the code at 10 š
You're still using v12?
what š
You have have 20 buttonsā¦
I shouldn't use?
Who knows maybe thereās still somebody around using v11
I mean if you can dream it, you can do it

DJs has modals now⦠am I stupid or didnāt they also add text input boxes?
he's using v5.2.0 it seems
actually I just looked at the docs
looks good and cool
You're supposed to be using v14, and reminder that Glitch also supports newer versions of Node.js now, so you can use v14
13.8 already had them
They are around for a while already
no of course not lmfao
add my bot and see how my system works
No š
lol
how can i filter a key and then set a style for that word a sentence and then return it? (sorry for your eyes i tried this way cause i don't know how i can do it)
I will use v14 for you now
Discord bot developers on their way to use the oldest versions of the dependencies they use

if I have
resolvedKey.length which returns say 20?
how I split it into 2 pages 10 and 20?
cough npm update cough
when embeds unbug, align the text to the right so u have a literal calculator
okay
key.length / 2...?
Maybe open an issue about it? Or a PR maybe
My current PR to fix thread locking is still being bitched about iirc
hey is that webhook url really needed or would the following code still works with only using the authorization key:
const Topgg = require("@top-gg/sdk")
const express = require("express")
const app = express()
const webhook = new Topgg.Webhook("auth")
app.post("/dblwebhook", webhook.listener(vote => {
console.log(vote)
app.listen(80)
For a command I used to list guilds, I did something more like this: ```ts
const MAX_LENGTH = 8;
let page = 0;
let offset = MAX_LENGTH * page;
let data: string[] = [];
let totalMembers = 0;
let totalServers = 0;
const cc = payload.commandClient;
for (const cclient of (payload.client.cluster as ClusterClient).shards.values()) {
for (const guild of cclient.guilds.values()) {
data.push(`${guild.name} | ${guild.memberCount} Members`);
totalMembers += guild.memberCount;
totalServers++;
}
}
let totalPageCount = Math.ceil(data.length / MAX_LENGTH);
Am I stupid or should I make it possible for the person testing my bot to have access to my test join and test leave command?
If its dev only we don't need to test it
Ok
Classic discord.js PRs
if I have 20 I want to splti that into 2 pages?
I think that the webhook url is needed right lol
The issue is I was also gonna get it to work to trigger the stripe command with a test user to show it working as if you had an account when you donāt š
well, how many do you want per page
you have to limit it at something unless you want to make it more complex
10
oh no it got merged cool
You need the webhook URL for Top.gg to send a request to it, so you can process the data
Without it, Top.gg isn't gonna magically guess where it's supposed to send the data
const Topgg = require("@top-gg/sdk")
const express = require("express")
const app = express()
const webhook = new Topgg.Webhook("auth")
app.post("/dblwebhook", webhook.listener(vote => {
console.log(vote)
app.listen(80)```doesn't this code already create a suitable server?
That just listens to the webhook requests
Then you can calculate the amount of pages you need by doing ```js
const MAX_LENGTH = 10;
const pageCount = Math.ceil(myLength / MAX_LENGTH);
forgot about Math.ceil
how does it work exactly?
Nice
Math.ceil takes any decimal and rounds it up to the whole number above it
Math.floor rounds down and ceil is just short for ceiling, so it's the opposite of floor
const Topgg = require("@top-gg/sdk")
const express = require("express")
const app = express()
const webhook = new Topgg.Webhook("your webhook auth")
app.use(bodyParser.json())
app.get('/', (req, res) => {
console.log(req.body)
res.status(200).end()
})
app.post("/dblwebhook", webhook.listener(vote => {
console.log(vote)
})
app.listen(3000, () => console.log(`Server running on port 3000`))
```I finished up the code, now the server would be online at localhost:3000 right?
This could also be helpful
Yes, but also you don't need a body parser for this to work
I love the typescript black magic fuckery
The webhook URL in this case should look like http://<your IP address>:<your port>/dblwebhook
would the webhook even be able to send a request to the localhost server? I thought that the localhost is private and non-accessible for other ip's?
I see.
it honestly is just so frustrating and that stupid hack works
this is the only real import fuckery I've done, it's nothing special
because you can't just export a json file straight out of a barrel file for some reason
yeah I just wanted to export it under a central name
I like using constants almost like it's a static class since it's easier to read for me
You'd like C# more
I'm just now getting into Cpp with unreal engine. Trying to make a VR game to replace VRChat since that shit just tanked
okay now I have page 2 of 30 items if there is 10 per page
how do I display only the 10 from page 2 if i have them all in a single map?
In order, my favorites are Rust, C#, Typescript, and Java
could you not create a map where the key is the page number and the value is the content?
that sounds unnecessary
I could ..?
(postgres) is there any penalty for having varchar higher than 255?
death
Why donāt u use text then?
yeah I'd just use text at that point
how should I do that guys?
I mean you edit the structure and try 500 for example
I keep confusing myself
Either thereās an error or not
it'd be like, 300 chars or so
text is a bit too overkill
Yeah you shouldn't have any issues with varchar from what i'm reading
I hope you donāt wanna use it as index
how do I remove all fields from an embed when editing it?
If not text wouldnāt be an issue, too
@lyric mountain varchar can handle 16 bit ints as n, up to 65535 bytes
By passing an empty array or null as fields
I think it was null
so you'll be just fine with 300 or so
but I've made a loop of addField will that remove them all?
Huh wut?
You donāt need a loop
You asked how to remove all fields of an embed when editing it
<embed>.fields = null;
my paginator was slightly large because I did this in an un-optimal way
and I was lazy
(I'm aware you can't read it btw)
Too small text
I wrote this a while ago with erwin's help
This was before detritus really supported the run prop on components
nowadays this would be incredibly easy
āThe webhook for my bot votes isnāt workingā
They never passed in a webhook endpoint irl or authorisation key to the top.gg page on their botā¦
š¤¦
for (i = 0; i < resolvedKey.length; i++) {
if (i >= 10) break;
warningsEmbed.addField(`WARN ${i + 1} (ID: ${resolvedKey[i]})`, `${resolvedValue[i].slice(0, 512) || "Couldn't resolve value."}`);
}
``` should I now keep working with this loop? I need to find a way to display page 0 = first 0, page 1 = everything after 10 up to 30 and so on
gotta find a way to make this modular
You donāt necessarily need to use an authorization key at all
also you probably want to be doing for(let i = 0; ...)
oh I forgot javascript doesn't auto assing variables
Ed but recommended.
anyway then what should I do?
It says to include it in the docs.
Because you think somebody could send webhooks with the data structure like topgg without malicious code inside, since you parse the data anyways?!

No but itās literally required to activate a top.gg webhook on node.
if (i.customId === "backwardsBtn") {
if (currentPage === 0) {
await replyOrFollowUp(i, { content: `${i.user.tag} you can't go further backwards.`, ephemeral: true });
} else {
// Remove one from the page and remove all of the old fields.
currentPage -= 1; warningsEmbed.fields = null;
// Update embed.
warningsEmbed.setFooter({ text: `Page ${currentPage} out of ${maxPages}`});
for (let i = 0; i < resolvedKey.length; i++) {
// We are breaking if the length is over 10 as to not go over discord's char limit.
if (Math.ceil(resolvedKey.length / 10 * currentPage)) {
warningsEmbed.addField(`WARN ${i + 1} (ID: ${resolvedKey[i]})`, `${resolvedValue[i].slice(0, 512) || "Couldn't resolve value."}`);
}
}
// Send the updated embed.
m.edit({
embeds: [warningsEmbed],
components: [ new MessageActionRow().addComponents(backwardsButton, forwardsButton) ]
});
}
};
``` something like this maybe?
then there's groovy ```groovy
resolvedKey.length.each {
// "it" is your iterator, it's already assigned, have fun
}
Itās not
You can leave the authorization password empty
As well as in your code if you use the sdk
Ah ok
Well they still need the ip that itās listening on put into the webhook url.
If not the sdk checks if the authorization header matches your input
can someone help me with this error?
npm ERR! path /Users/allaboutishaan/Documents/Any-Bot/node_modules/youtube-dl-exec
Been trying to fix it for ages, I don't even have youtube-dl-exec mentioned anywhere in the code
If both are empty nothing will be validated
Meh trueā¦
That however has nothing to do with the authentication
The php one for my server needs it because itās a common webhook endpoint for my company.
I mean you either read the headers or not
If not you donāt need to check the authorization header
Like I said thereās no real need of it
Yeah but because of my company policies under a lot of legislation I have to authenticate that each webhook request received is from who itās meant to be from.
And itās best practice.
Who taught you how to make a webhook endpoint? You cover 0 security with your methodā¦
Best practice never is a restriction on the application layer but already on the network layer
I would restrict incoming requests only to the topgg IP
I canāt
That webhook server is the server that runs my custom api.
Well the public oneā¦
That wasnāt specifically meant for your case
But in general calling the app layer restriction as best practice without restricting the access on the network layer was wrong
almost works 
But if you canāt then you canāt of course
Yes but you can have two webhooks to the same endpoint from top.gg then you can use differing auth keys for each. So when it makes a server vote request it passes the auth key, and it that doesnāt match server vote it rejects.
If you would follow only any suggestions 
Itās just multi stage error prevention š
DJs v14 and you woulda been done with that command now.
// If someone presse the button, this event will activate.
collector.on("collect", async i => {
if (i.customId === "backwardsBtn") {
if (currentPage === 1) {
await replyOrFollowUp(i, { content: `${i.user.tag} you can't go further backwards.`, ephemeral: true });
} else {
// Remove one from the page and remove all of the old fields.
currentPage -= 1; warningsEmbed.fields = null;
// Update embed.
warningsEmbed.setFooter({ text: `Page ${currentPage} out of ${maxPages}`});
for (let i = 0; i < resolvedKey.length; i++) {
// We are breaking if the length is over 10 as to not go over discord's char limit.
if (Math.ceil(resolvedKey.length / (10 * currentPage)) === currentPage) {
warningsEmbed.addField(`WARN ${i + 1} (ID: ${resolvedKey[i]})`, `${resolvedValue[i].slice(0, 512) || "Couldn't resolve value."}`);
}
}
// Send the updated embed and update the user.
await replyOrFollowUp(i, { content: `${i.user.tag} your embed has been updated.`, ephemeral: true });
m.edit({
embeds: [warningsEmbed],
components: [ new MessageActionRow().addComponents(backwardsButton, forwardsButton) ]
});
}
}; if (i.customId === "forwardsBtn") {
if (currentPage >= maxPages) {
await replyOrFollowUp(i, { content: `${i.user.tag} you can't go further forwards.`, ephemeral: true });
} else {
// Remove one from the page and remove all of the old fields.
currentPage += 1; warningsEmbed.fields = null;
// Update embed.
warningsEmbed.setFooter({ text: `Page ${currentPage} out of ${maxPages}`});
for (let i = 0; i < resolvedKey.length; i++) {
// We are breaking if the length is over 10 as to not go over discord's char limit.
if (Math.ceil(resolvedKey.length / (10 * currentPage)) === currentPage) {
warningsEmbed.addField(`WARN ${i + 1} (ID: ${resolvedKey[i]})`, `${resolvedValue[i].slice(0, 512) || "Couldn't resolve value."}`);
}
}
// Send the updated embed and update the user.
await replyOrFollowUp(i, { content: `${i.user.tag} your embed has been updated.`, ephemeral: true });
m.edit({
embeds: [warningsEmbed],
components: [ new MessageActionRow().addComponents(backwardsButton, forwardsButton) ]
});
}
}
}); collector.on("end", async i => {
m.edit({
embeds: [warningsEmbed],
components: []
});
});
``` anyone know why it doesn't display the seond page?
wow just spent 15 minutes debugging my fucking database just to find out that my auth wasn't working because for some reason my linter is replacing _ with * in my env file
Well itās not djs but the fact he doesnāt really understand how interactions are properly used and responded to
Continuously using collectors instead of utilizing the event
This is why you turn autocorrect off on your linter.
There's no autocorrect
hi i can add html tags in my bot page?
I've never had this issue with prettier before
Yes
not gonna pointlesly use an event, could you just please tell me why the pages don't display properly
the buttons fully work
using js? or html
eslint for the win lol
How do you think does the collector collect the interaction?
By listening to the event internally
I want to know how to add html tag on my bot page
By adding your code into the description
I know html, but I don't know how to add a tag inside another tag
Without html, head and body tags
I can show you lmao
I spent 4 hours doing just that lol
I can see the bot replying to me, it's the logics fault not the buttons
You simply insert your code as I already mentioned
Into the description
Help me if please
What donāt u understand?
š
You simply insert your code as I already mentioned
LITERALLY!
<h1>Title</h1>
<h2>Subtitle</h2>
<p>Paragraph</p>
ERROR Unhandled rejection: TypeError: Cannot read properties of null (reading 'push')
for (let i = 0; i < resolvedKey.length; i++) {
// We are breaking if the length is over 10 as to not go over discord's char limit.
if ((Math.ceil(resolvedKey.length / (10 * currentPage)) + 1) === currentPage) {
warningsEmbed.addField(`WARN ${i + 1} (ID: ${resolvedKey[i]})`, `${resolvedValue[i].slice(0, 512) || "Couldn't resolve value."}`);
}
}
``` push? where?
you could do ```html
<style>
.red {
color: red;
}
</style>
<p class="red">This is red</p>
I said I know how to edit css and add an html tag, but I don't know how to add inside a tag
how many characters should I make snowflakes, I know they grow infinitely but there's a point where we will all die before I run out of characters
Uhm sorry you just broke my brain... Explain simply what you are trying to do.
(Doing this for database simplicity reasons, I don't want to be casting from string to bigint all the time and such)
although bigint is probably a lot more efficient
It is
You can simply tell your pool connection to return strings for bigints
So you donāt have to convert them
the other way around is the problem
Just pass strings? The database converts them to bigints automatically
It does?
I can tell you how to simply do the html in markdown, convert it to html, publish the html and then display it on your long description...
Of course
š¤£
so I can't do embed.addField after doing embed.fields = null;
who tf told me to do that
alright it works
As well as converting true or false for example to the right tinyint case
You
Since itās a synonym of boolean
no I haven't
easy enough
I know css & html
As we learned a while ago
do embed.fields = [] instead
Then INSERT your html code into the bot description FIELD
Thatās all
I'm sure it'll try to fuck me if it's not a bigint, but that's my job to prevent anyways
Without html, head and body tags
then what are you asking us to help you with? Please be clear in your question.
It'll be guaranteed to be a user id anyways C:
const Topgg = require("@top-gg/sdk")
const express = require("express")
const app = express()
const webhook = new Topgg.Webhook("myauth")
app.get('/', (req, res) => {
console.log(req.body)
res.status(200).end()
})
app.post("/dblwebhook", webhook.listener(vote => {
console.log(vote)
app.listen(3000, () => console.log(`ðŸŔ⬠Server running on port 3000`))
});
```Why didn't it console.log(vote) after I voted? (Webhook url is localhost:3000)
I made sure the webhook url and auth code is set right
Like I said you can also add a boolean for columns with a tinyint data type
there is something with needinf your bot token
It will be converted
I am doing this for my server, not a bot
and make sure the webhook page says http://localhos:3000
SQL is more clever than u think waffle
yes it does
hmm
oh ffs...
add /dblwebhook to the end of the url on the top.gg page @eternal osprey
Whereās the code hosted?
On a server or at home?
at home for testing
wonderful
Thereās your issue
I see fuck
the syntax feels so awful considering how "modern" it really is
should be ip forwarded?
also the URL should be your public IP of your computer.
which is why I make typeorm do the work for me
You would need to allow incoming connections in your firewall, forward ports etc and you require a public IPv4
you can get that by opening command prompt and typing ipconfig and copying your ipv4 address
Any other way to test without using the ports of my vps?
So forget about it
yeah
You heard of heroku?
Why wouldnāt you test it on your server?
I doubt you have a proper firewall in case you would need to configure
No literally no issue over there
To receive incoming requests
Not everyone has a dedicated server
lmao
Thereās no difference to a virtual server except your provider puts one in place
Anyone know how long I should cache db users for? The likelihood is that there will be a query to update a user nearly every command sent
Which you can disable or configure in the UI
no I mean not everyone has a server!
kinda?
that's annoying
Oh no you have to use vps ports lol
just do an INTERACTION_DEFFERRED_UPDATE_MESSAGE instead
Listeners always have to be on a port.
whatever djs's equivalent is
interaction.reply()
if you did interaction.differ() that is
That's not what I'm talking about
editReply()
There's different types of interaction deferrals, that one is specifically for updating a previous reply
int.deferUpdate() for rows etc
oh yeah djs is eassier lol
Err no editReply will literally edit the original response which was the deferring itself
Ok multiple people are having issues with this code but I tested it for my webhooks and it worked.
idk how it works for djs, I just know how it works for detritus
Ok Mr Erwin
no I'm literally having trouble with listing the warns I want them to do it in incements of 10
for example we have 25 warns
so page 1 = 10
page 2 = 10
page 3 = 5
glad I'm not dealing with this sql shit manually lmao
search javascript chunk array in google
something like array.slice((pageNumber - 1) * 10, pageNumber * 10)
why tf would u use those weird ids?
why not just regular numbers?
yeah I'm wondering the same
who had the issue with the webhook?
I'm going to hope those are UUIDs of some form, it would be hilarious if you generated 2 of the same IDs but I'm sure that's not the goal lol
I literally showed u how to paginate
ananızı bacınızzı sikim lan sizin
seems like there's 311 million combinations for that type of ID, so the likelihood he generates two of the same is low at least
like, the whole reason for using hashed ids is so people cant simply guess other people's url
nvm, 380million
but that makes little sense in that context
for (let i = 0; i < resolvedKey.length; i += 10) {
const chunk = resolvedKey.slice(i, i + 10);
for (let i2 = 0; i2 < chunk.length; i2++) {
warningsEmbed.addField(`WARN ${i2 + 1} (ID: ${resolvedKey[i2]})`, `${resolvedValue[i2].slice(0, 512) || "Couldn't resolve value."}`);
}
}
``` so I got something like this?
Türk yokmu amk
yes bro
@eternal osprey try to send your server webhook to the endpoint http://testendpoint.jconet.co.uk/dblwebhook with the auth simpleauth
but I don't think it works properly? the first page it shows nothing and on the second page it shows the first page
take that paginator I showed u before and put inside a function
so u can call anywhere
simply apply it to that array
Make sure its by pressing 'send test'
the one u sent me before was used for strings I would have to change too many things to get it working
make it generic
I know this isn't what you meant but on that topic I love generics
beautiful
java does generics poorly imo tho
since you have to use boxing/autoboxing etc
no primitives allowed
:C
im so tired lol
const result = resolvedKey.reduce((resultArray, item, index) => {
const chunkIndex = Math.floor(index / 10);
if (!resultArray[chunkIndex]) {
// start a new chunk.
resultArray[chunkIndex] = [];
}; resultArray[chunkIndex].push(item);
return resultArray;
}, []); const result2 = resolvedValue.reduce((resultArray, item, index) => {
const chunkIndex = Math.floor(index / 10);
if (!resultArray[chunkIndex]) {
// start a new chunk.
resultArray[chunkIndex] = [];
}; resultArray[chunkIndex].push(item);
return resultArray;
}, []); for (let i = 0; i < chunk[currentPage].length; i++) {
warningsEmbed.addField(`WARN ${i + 1} (ID: ${result[currentPage - 1][i]})`, `${result2[currentPage - 1][i].slice(0, 512)}`);
}
what am I doing wrong š
no errors
I'm gonna have to pass on trying to read that
You want my honest answer?
I do when someone is trying to do something messy and complicated when an easy option is available.
fake let him have this
he aint gonna not use the builders no matter who recommends it lol
Yeah... Like the builders make for tidy and easy code lol
go back to driving š
Also true yeah
and that makes the dev time shrink
agree to disagree
but that's something we already discussed in this channel like yesterday
so
Builders make code harder to read
almost
you sure?
the last problem is that it still numbers the warns from 1 to 10 instead of 11 to 20
Yeah or do you wanna tell me an object is hard to read and understand?
then change it
4head
Nah they aint...
But when working with an embed? Or a slash command?
oh wait slash command permissions are a thing now aren't they
haven't done discord bots in a while, this is my first time in a while
and modals
yeah I know about modals
{
name: ācommandā,
description: āā¦ā,
options: [ā¦]
}
Is complicated to read?
I forgor about perms tho
I am working on my first command using modals on sat morning
nah... just the builder is easier.
I prefer this style
idk... just looks nicer to me.
see I'm redeeming myself to fake for being a java user
compared to this... I prefer the DJS command builder...
lol
then again I have hated java since my last time making a minecraft plugin
well that's why you hate java
Fake is just one of those elitist people that like to rain on anyone coding using the easy way out that the library gives you for free lol.
no
ye... that was horrible.
I wouldn't call it the "easy way out"
0/10 would not recommend mc plugin making.
I much prefer the raw structure, you don't rely on things changing in the future
Oh that case sure, hell... You could even make your own builder for commands if thats the case lol
No reason to use builders
If you wanna be fancy...
Dude calling the constructor any time and itās methods instead of using THE BASICS OF YOUR PGRAMMING LANGUAGE is far more complicated
And also free 
The builders simply is bloat nobody needs
This just doesnt... look good to me.
Ive used both ways and the builders were faster and easier for me to migrate commands over from v12 to v14 lol
The builders arenāt since they have changed any version of djs
meh. I like my method, it works effectively and my dumbass teammates are able to understand how to do it.
I mean think about the nonsense to call the constructor and methods to RETURN the object literally exactly as you can write it per hand
Which is less code and exactly as the API expects
And you will never have to update it
okay I'm done. It's fully working
https://www.toptal.com/developers/hastebin/oqewuzidum.jsrate
please rate the code 
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Letās better not do that (again)
You want ratings?
yeah why not. I already know it's an abomination so I wanna know what u think 
Letās be gentle and say your style is unique
UNIQUE
ffs
what the actual fuck is this line
well stuff that
lol effort to write two brackets?
I mean instead of writing the names of the methods you directly type the object properties which is less chars
lmao
ok but you can do it on a new line?!??!
He didnāt get it
š NEW š LINE š

lmao ITS OK

i like being evil šæ
its on POINT!
al dente š¤
Amen
Ok but anyone used modals yet?
Sure
Thatās the reason Iām complaining about the missing field types, select menu support etc
Like lots of other too waiting for the implementation
Its there...
All it is atm is an experimental state which isnāt really supported in the UI yet
hastebin just got 10x worse
That's been like that since the last year
really? just noticed
Toptal = evil?
Hmm actually donāt know that name
it's been fine for the most part? I mean I've used it for countless projects
Idk the company as I said above
my entire warns command is 300 lines š is that good or bad I can't tell
Canāt judge them yet
Why the hell is it 300 lines?
But I will soon
just remove "s" from the url
Please donāt ask
it actually has two functionalities, also a lot of checks otherwise it will error randomly
warns can list and check a specific warn
The average warn commands I've seen are barely 70 lines

The classic Title Case Moderation Message
is that only visible within the same guild?
yeah
why do u show the guild then?
That's Visual Basic Case Actually
don't ask me I didn't give the reason
I just looked it up to show u guys an example

I just wanna know why show the guild if it's visible only within the same guild
PascalCase
weirdly enough it seems I actually made it cross compatible with guilds
I should probably change that
Oops yeah I meant that
DEFINITELY
Why are you using != in this case instead of !==?
change the message to "Warn not found"
Obviously not meant to be implemented correctly in the UI yet
other guilds don't need to know there are other warns
ah no worri
The expression in that if statement is never going to be true because an empty array is not a falsy value
Nah nothing experimental about it, This works as intended for the test command I created. What is your excuse for not using it again Fake?
wait what?
Itās NOT implemented into the UI yet, it just has the size like being shown in the chat
The backend still works
Doesnāt mean itās implemented and ready to use
Since things can change
My gosh
The only falsy values are as follows: an empty string (''), false (obviously), null, undefined, and 0
Wait for the announcement until it has been released
Its on the discord api docs...
Link
huh??
empy arrays are falsy in groovy lmao
it never actually executed though?
js is weird
indeed
That's because it's not true to be executed
oh that's really confusing me now
If you want to check if the array is empty, do array.length === 0
Yeah had to learn this too
Integrate your service with Discord ā whether it's a bot or a game or whatever your wildest imagination can come up with.
Ok its limited, but DJS allows you to put select menus.
Arrays are objects, and objects are not falsy in most programming languages that actually have multiple falsy values
Ok and where does it mention select menus are implemented into modals yet?
So something aint right
v8 migrating to carbon when :troll:
Maybe when it becomes stable (probably never)
Micro optimization again⦠!array.length
Select menus are not officially supported yet. It works for some people, not others. It is most definitely not supported globally for sure
somehow I think adding that check broke my warns list?
FakE I'm going to throw you into the LLVM decompiler
Yes! Compile me daddy
oh no
Compile me hard
Decompile you*
Auto correct is a bitch
is it becaue they changed the guilds name and I'm comparing the guilds name instead of the guilds ID š
imma decompile you dad!!
šæ
Was gonna say because this looks like a working modal with select menu...
I was able to get select menus into modals as well, but for me Iām unable to get the selected value when the modal is submitted
Havenāt you noticed it doesnāt look ārightā?
Itās too short, itās actually not fully aligned whenever I did it either
Itās yet not implemented in the UI, it just uses the style like being posted into@the chat window
Yeah
I get that, but thats minor, I only want modals for submitting support tickets lol
And things can change and usually will
If anything people using select menus in modals before the official support comes out helps the devs to solve bugs with them lol
I dont need the select menu as a lot of the data is automatically stored lol.
Except for djs
Itās not finished yet, so you shouldnāt be using them for any production use yet
Otherwise you might have platform compatibility issues
Im not. The support command is linking to my support helpdesk... So I am being cautious as hell and testing overly.
guys I would have to save the guilds ID instead of the guilds name but the thing is I then would have to change every command to filter the guilds name for ID and oh god

Its to get a ticket logged on the helpdesk using stats from discord directly.
you saving guilds by their name is a bad idea
im more concerned about getting the required data passed into the helpdesk database properly.
The select menu will probably be announced with new field types support for modals
Letās hope soon
Thatās all we know atm
I wish I knew this before doing that š gonna have to clear the damn warns again
i think its next month
something is telling me august will bring news about discord api
Probably when message intent is enforced
OOF
how do you fetch a guilds name by their ID again?
I guarantee you djs will rename the select menu builder
Itās already enforced⦠sortaā¦
Because the methods of the modals creating select menus will have that name as well
Itās following the same naming convention of the other builders.
So unless they change them all, I doubt it.
Soon chatselectmenubuilder
ModalSelectMenuBuilder
Oh no Cus yeah⦠modal selects need a label and chat ones donāt have thatā¦
So two types of select menu builders neededā¦
How can fuck up people again
Or you end up having one builder with a ātypeā option that then requires you to have the label if you add a it to modal.
Probably a base select menu builder and one expanding it just with a different name 
hate me
that's the thing you're worried about 
tryget
I'm just gonna wait til u guys notice
the inline if?
if ((resolvedResults = tryGet)[4] !== message.guild.id) is more cursed
but why did you even set another variable to that in the first place
I don't understand
idk, just did what they did there
yeah lmfao
for some reason doing tryGet[4] directly returned undefined, that's why I did the double variable thing
don't ask me why cause I don't know
what? That has literally nothing to do with it
I donāt know what to say anymore
bruh
it's const, it's not going to suddenly change from an array to undefined
your issue is the fact that tryGet[4] is undefined
demoted to java
Letās call it djs originals
promoted to c#
Careful
why not something like ```
Func<TResult, TArgs...>
then drive without being distracted!
Then stop your distractions
groovy doesn't even need that
here's what we have
I don't remember the exact reason why this is done across languages
like I said don't ask me, that's literally what happens
I know Swift's case is just because they wanted to save a few characters (i.e. DSL)
well it's going to happen regardless of what you set it to, because it is quite literally the same thing
I think detection by ID broke? any idea why?
I know, that's why I'm baffled by it
for some reason it just didn't want to work unless I reassigned it to a new variable
cough interactions - role selection
Or message mentions for some absurd reason
anyone know why the embeds are stretched?
When a shard closes with an opcode of 4801, what does that mean? I can't seem to find anything in the docs about that code
Integrate your service with Discord ā whether it's a bot or a game or whatever your wildest imagination can come up with.
I already looked there, itās not listed
You sure itās 4801? And not 1084
Lmao thatās not even an op code either.
You use discordjs for shards right?
Ask in their server⦠they might know more about that op code.
Do you get any other data when it closes? Like as if it was a crash. Whenever I get non standard op codes I always get a full error I can logā¦
No data. It just closed, then reconnects and resumes as normal. Happened while I was away from my pc, probably just a quick internet connection interrupt
4801 dafuq
only thing i can think of is a custom library close code
for example i use 4099 in my lib
Yo any one play dbl
yes i play discord bot list
No I meant dragon ball legend
Can you kick me
sadly it's typed
C# doesn't have a way to do that since ain't proprocess
so just return a result object at this point
How do we actually catch the time error in createMessageCollector without using collector.on('end')?
collector.on('error')
but usually it will to one of the errors defined, whichever hits first
so depends on reason you can figure what tripped the collector to end iirc
multiple times lol
and 1006
but from looking that up it's an internet interruption I think
Sometimes, my lib just decides to spam try to identify
why is that an enum if there is no auto increment used lmfao
to make it more clear what the codes mean? Helped me to understand what those random numbers mean
I don't think you understand what an enum compiles to
That's basically the point of enums (at least in languages in ts where they don't do a whole lot)
The point isn't what it compiles to, it helps readability
an enum is a fancy object.
Its values get auto incremented in between assignment operations
enum is just more proper imo
so, it could literally just be
export const SocketCloseCodes = {
NORMAL: 1000,
GOING_AWAY: 1001,
...
}
No it isn't XD
It's just overhead for the compiler
he could've done like ```ts
const SocketCloseCodes = Object.freeze({
STUFF: 15,
});
it really doesn't matter
if people cared about compiler overhead that much then they would just be js pros and not bother with typescript at all š
cough cough tim
That's why I'm so confused. The only real benefit of enums is like this
export enum Values {
Zero = 0,
One,
Two,
Three,
Four...
}
It doesn't matter that much
The likelihood is he kept it like that for people like me searching for what the codes mean
Since I wouldn't have found it so easily without being able to search for it
bro i can't just search for 147th line of a start 1001 enum def just for code of 1048
sometimes you still need to explicitly define the code for easier search
also think about refactoring
in short, my throat stucks

I see no issue using enums either
Sat here wishing there was an api to get better stats about my cod performance and the new vanguard guns because the tracker network doesnāt show new guns and is a whole prestige level offā¦
Bot cannot add or remove roles.
- Bot's role at the top
- Invited the bot with required perms (even tried with administrator)
- Bot has GUILDS intent
- It was working on my test server and it doesn't work on different server
method: 'delete',
path: '/guilds/GUILD_ID/members/MEMBER_ID/roles/ROLE_ID',```
**Fixed**
> It was 2fa issue, apparently bot owner needs 2fa enabled as well if 2fa is enabled on server
How do you tell discord.js to not cache channels?
new Client({ makeCache: Options.cacheWithLimits({ ...Options.DefaultMakeCacheSettings, ChannelManager: 0, GuildChannelManager: 0 }) })
but keep in mind that:
Any fixes? 
DiscordAPIError: Invalid Form Body
components[0].components[1].url: Scheme "1000421766751072296" is not supported. Scheme must be one of ('http', 'https', 'discord').
yh ik normaly https
Like what is it you are trying to make...
What is it erroring when you do?
you literally pasted the minimum of the error...
like what line of code is generating the error?
what is thi sline?
well you know what your issue is right?
wait what is your botstats command file?
something isnt right... that should work.
i have a idea
its something in botstats that i causing that line to fail. Cus other commands work right?
Yes
Then show me this via the whole of botstats
check Command.js:225
that was the last call where it caused the issue
add a breakpoint before the call and inspect arguments' values
what you passed into components[0].components[1].url
a string of numbers it seem
check the part where it may possibly add that string of number
you use vscode on debug config right
This aint me
then who what
Is it possible that certain data that makes it into 1 table in MySQL database fucks up the collation of another table in the database??
Its ExothDE that had the issue, I am trying to help them.
@zinc dawn gimme the block where it contains line 225
Ok
try {
await interaction.deferReply({ ephemeral: this.slashCommand.ephemeral });
await this.interactionRun(interaction);
} catch (ex) {
await interaction.followUp("Oops! An error occurred while running the command");
this.client.logger.error("interactionRun", ex);
} finally {
this.applyCooldown(interaction.user.id);
}
}
idk how to fix
Oh this is pure node not typescript... I know this
ethemeral should only be bool for one...
also...
What line is 225?
what defines interaction
also
Its passed in via the handler
this.interactionRun(interaction); is maing the error?
is the culprit
are you even retrieving interaction after passing it in?
i think yes
.executeInteraction() inside of the command botstats
the error is only possible by user-defined error
show me where you define that function. Like where in botstats do you define executeInteration()
can you connect to my anydesk
sure
yep
I can even give you a one time remote support url if that would make you feel safer
or use quick assist
i only have teamviewer
im fully licensed for remote support cus of work lol
I think im overkill on remote support tools
Also, dont use teamviewer... Its insecure as hell.
sayuri check dm
Sure go with Sayuri lol... We both know how to fix your bot... But I think I know where your error is originating from in your code...
OOF
both of you use windows...
use quick assist
Why?
nvm i have quick assist
Quick Assist is the windows default support app lol
Its how microsoft support techs help you lol
I would be annoyed if it wasnt installed. As its a windows essential app.
@worldly mesa
Anydesk is better lol
I have anydesk...
I always recommend using quickassist on windows as its native... less likely to have issues
ok wait
open quick assist
i install it
download exe?
i cant find
never i download microsoft store
very laggy
pray that my PC does not crash as soon as Webstorm is open and Microsoft store lags everything

ah... wait what?
How bad is your pc?
Love how I have been on this tryna help and sayuri just swipes it... Means I can get back to support tickets lol!
what
bruh
Send me your anydesk...
can't just bring laptop to the kitchen table
gotta update it first
It auto updates... It shouldn't need to open ms store...
nope
i had to tho
first time u open it it asks to update the app
^
because you have auto updates turned on ig
i had this prompt
Maybe thats windows enterprise vs pro or standard lol
Wait then you shouldnt have had that?
I have enterprise
it's probably installed but factory version
^
Like... My account is registered to do remote technical support on windows machines so maybe that?
most likely
Nah cus like it installs the latest one. Like I see it install the update when I click it, without needing to open ms store.
hello , is this where to ask for help? well if it is , how do i check if my bot was submit?
it opens a small ms store window
ok give code again
Submit what? To the topgg page? or your bot stats?
yes , submit my bot to the topgg page
HWCF2F
Go to your profile and it should be there
hold on
ah it says i dont have any projects
that mean ill have to resend it right
@zinc dawn 3LH9G8
awaiting
You submitted one a few days ago, but it got declined for being offline
Feel free to submit your bot again once it is back online https://top.gg/bot/new
Yep
Wait my pc ist laggy...
alrightt, may i know yall timezone?
Why isnt that showing in the mentions search?
We are from all over the world
Discord search being funny š
@zinc dawn 520 seconds
alright gonna keep on my mind
alrightt, hopefully my mom wont find out my laptop been on all night loll
Tell me about it, I use Canary lol
This app crashes
you show try to find some online host
i want to see if people like it before getting it on a vpsš®āšØ
Funny you mention that... Azure has a free month...
you simply cannot offer a service that's only online when u are
wait wait there's no error event
FREE?
and $200 credit...
ah
i'm old
Yes
don't fuck with azure
unless u got a million dollars spare money
You can get a linux VM for free for life
azure can become a wallet trap very easily
@zinc dawn paste the whole Command.js file to a paste bin, i will look from there
Well I am lucky that I literally am on a DevOps course teaching me about azure... By AZURE experts lol.
cool
The first thing they showed us was how to use all the features for free for life lol
@civic scroll dm
I mean, yes you can, but the safety margin is very easily broken if ur not cautious
ye
https://dashboard.heroku.com/apps try this
If you get stuck, give me a DM
if ur going heroku just use replit
I mean... Yeah...
Huh?
Heroku? let me check
@hard wraith
heroku.. its a free vps right?
by inspection all the code above in this function block does not modify interaction parameter
which means we have to go up one level in the stack
it isnt even defining as a function
it is an async method
no its being efined as a function
no
it needs a space after executeInteraction to make it not try to work as a function
heroku is...idk what it's called, container?
what?
no?
it's the same
it's the same as async execute(interaction)
I get the same linter error when I remove the space
that's linter error
@brittle zealot oracle has a free vps, if you got a credit card
not syntax / type error
oof
the thing is
wait its saying they arent defined tho
it's defined
or is it something else causing the underscore...
we are trying to figure out what reads from and writes to interaction
These shouldn be there
lessgoo , i hope they accept paypal , oracle it iz
not that piece of crap
they don't iirc
they require cc for verification
this is what matters rn
again
fake cc info it is!š¤£
they check for it
@zinc dawn can you send me the stack again?
you can conntect to my server
@zinc dawn can I remote on and check?
if you remember, send me the file one level up in the stack
I can literally use any method you want lol
gimme interactionCreate.js
I wanna but my head through a wall...
ah that would do i
the ts parser just kicked in
dm
despite there's no other files to reference
that's why you see those underlines
but again it's not relevant to our problem at hand now
Yeah i said hat would do it lol... I thought you were on the man's machine
Also why isnt this code in a repo?
Like if it was in a repo we could make a test branch and clone that and try to fix it for you
that's for later
Fair...
I like it when I can add someone to my repo for my bot as a guest so they can see my code if the error isnt solved in the command file lol.
open anydesk
Its done been open for half an hour
239013058
it is. Ill sort it, go have dinner
find any button component that has to do with open external URLs
@hard wraith the error gave it away
anything involves 2nd button of the first component row being a link button





