#development
1 messages · Page 136 of 1
where do you live
it's supposed to be a backup
like the exact cordinates
florida
no i need the full coordinates
😳
how much do you pay for starlink?
I wouldn't know its not mine:)
probably expensive though
it's a backup if the main network goes down
isn't it like $100+ a month
can you run my script and see how it does?
with a large apng
set a maximum resolution limit, for example 1080p or 2k whatever
if the given image is bigger than that, either refuse it, or resize it first using a command line program
right
maybe
i updated it and got rid of telegram
https://lukeroberts.tv/blog/wp-content/uploads/2019/05/apng1.png try and use this for the large apng
wait that's not large at all
oh lord this will involve me installing canvas and setting up module support
fine only bc im so nice
My wsl node thinks I am running Windows
have you got a large gif at around 10 - 15 mb
if yes send it over so i can convert it to apng
to put it in the directory
when finito
fs.writeFileSync("watermarked.apng", Buffer.from(apngBuffer));
oh is it
ye lol
that's why it wasn't throwing an error at me when i declared it
Total execution time: 44.562s
with this apng:
https://i.ibb.co/BVnvmWt/WALLPAPER.png
and the cat image
i literally cant install canvas lmao
my nodejs thinks I am running windows
when I am infact on linux
weird
@quartz kindle wanna give it a go?
is it cuz of the changes you have done to your pc?
lel
I've just tried installing NodeJS on WSL, after running the Creators Update and doing a fresh WSL install to get 16.04. https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-l...
woops
add these:
console.time("Total execution time");
in the beggining of the function
and in the end:
console.timeEnd("Total execution time");
34 seconds
that's a wooping 10 seconds faster
is there an actual animation in those links?
i just see stills
give me a link that actually produces an animation
and im pretty sure performance can be improved
but i need to see a working animation to make sure i dont break it
there is
the .png one
man i can't find anythin good on google for shit
like a large gif
ah nvm
the animation only works on chrome lol
also, all the frame files are broken
because its raw bytes, not actual png images
yeah that messed up after i updated the code with the canvas.buffer
never bothered to change it
instead of png/image i use this
the original apng was cut into the size of the watermark, and its color changed
yeah i can't really share that watermark
but thats all
fr fr
got me wondering seeing the speed of it
what is wrong with that
for(...) {
convert entire file to rgba8
get 1 frame
}
are u sure u got the same results when u did that?
maybe convert the frames on the outside first lol
i opened the image on the browser, looks the same again
but as i said, i dont know if what im looking at is the right thing
send it here
right back at you
mine has and yours doesnt
for some reason discord links wont play the animation
just did that, still doesnt play lol
but mine plays
in the webhook url it should be http://ip:port/dblwebhook right, and in the authentication the webhook token?
no, top.gg webhooks have nothing to do with discord webhooks
are you using a library like top.gg sdk?
that looks like it did it
// Creates an array to hold the frames
const frames = [];
// Set the delay for each frame (in milliseconds)
const frameDelay = apng.frames[0].delay;
// Decode the APNG image data
const apngRGBAData = UPNG.toRGBA8(apng);
// Convert frames to canvas images
const frameCanvases = [];
for (let i = 0; i < apng.frames.length; i++) {
const frameCanvas = createCanvas(apng.width, apng.height);
const frameCtx = frameCanvas.getContext("2d");
// Put the RGBA pixel data onto the frame canvas
const imageData = frameCtx.createImageData(apng.width, apng.height);
imageData.data.set(
new Uint8ClampedArray(new Uint8Array(apngRGBAData[i]).buffer)
);
frameCtx.putImageData(imageData, 0, 0);
frameCanvases.push(frameCanvas);
}
for (let i = 0; i < apng.frames.length; i++) {
console.log(`Processed frame ${i + 1}/${apng.frames.length}`);
const frameCanvas = frameCanvases[i];
// Clear the canvas
ctxCanvas.clearRect(0, 0, canvas.width, canvas.height);
// Redraw the user's image onto the canvas
ctxCanvas.drawImage(userImage, 0, 0);
// Draws the frame onto the main canvas
ctxCanvas.drawImage(frameCanvas, watermarkX, watermarkY);
// Save the canvas as an image
const buffer = canvas.toBuffer("raw");
frames.push(buffer.buffer);
fs.writeFileSync(`watermarked${i}.png`, buffer);
// Get the RGBA pixel data from the main canvas
const mainImageData = ctxCanvas.getImageData(
0,
0,
canvas.width,
canvas.height
);
console.log(mainImageData.data.constructor);
const mainRgbaFrame = new Uint8Array(mainImageData.data)
// Adds the frame to the array of frames
// frames.push(mainRgbaFrame);
console.log(`Processed frame ${i + 1}/${apng.frames.length}`);
}
@quartz kindle
yes, i did setup all these stuff before but i switched host today and i forgot the part related to top.gg vote receiving cuz i did it months ago
then the authorization shuold be the same thing as you have in your top.gg sdk code
whats that thing thought, is it the end part of an discord webhook or smt?
no, its whatever you want
you literally invent something like 123
oh ic ic
whatever you decide to put in your code, is what you have to put in those settings
doesnt matter what it is, can be anything
imagine if interactions were like this
return new Canvas(width, height, type)
^
Error: out of memory
ah fuck
much better ye
thank you for finding the flaw lmfao
strange it used to work in the old host, but doesnt in the new one. does the format of ip changes any stuff? like my previous host had XXX.XX.XX.XXX and the new one has YY.YYY.YYY.YY else i dont see any reason why it wont work :/
I was about to send 999.999.999.999
yes, please xD
strange then why it isnt sending test messages when i try to haha
whats your new host?
discord bot container?
yep
check your control panel/dashboard
see if there is any specific port you are allowed to use
should be in the same page as your ip address
const sentMessage = message.channel.send({embeds: [tossembed], components: [row, ]
});```
cannot read properties of undefined "channel"
toss(message , interaction) {```
const run = new Game("computer")
run.toss()
you defined the toss function as toss(message , interaction) {} and tried to run it as toss() ?
bruh
you need to give the function the parameters you are expecting
still, methods also require parameters
you cant call a method without any parameter, if you defined the method as requiring parameters
if you want to call the method without parameters, you need to get that information from somewhere else
run.toss(message,interaction)
no, the order has to be the same
bru
great now it says interaction isn't defined
oh wait ig ik why this issue came
alright its working
thanks
👍
no u
Anyone knows how to fix this? Type 'string' is not assignable to type 'APIPartialEmoji'.
just putting in a string with the emoji works
but when I try to get it from a json object it gives me this error
(typescript error btw)
console.log the object
"consumables": {
"health potion": ":healthpotion:",
"slime bottle": ":bottleoslime:"
},
that's the object
it has emoji like: <:emoji:id>
but discord does weird stuff and shows it like that
options.push({
label: `${toTitleCase(key)}`,
value: key.toLowerCase(),
description: `You have ${value} remaining.`,
emoji: emojis.consumables[key] ? emojis.consumables[key] : undefined,
default: false
})
Thats the code
and it errors on that emoji property
and the weird part is if I make the json object just one key it doesn't give me the error but once I add a second key it does give me the error
APIPartialEmoji is an object, not a string
somewhere, somehow, something is expecting an emoji object
and you're trying to give it an emoji string
yeah but if I just give it an emoji string it also worked tho
how do I convert the string into an emoji object?
alr it works now
anyone have an idea when the Premium App Subscription alpha releases?
https://support.discord.com/hc/en-us/articles/9359445233303-Premium-App-Subscriptions-FAQ
Important Note: This launch is currently in alpha - which means that not all apps will be able to have Premium App Subscriptions at this time. In addition, you can currently only purchase Premium A...
yeah, discord
i don't think they've released that to the public yet
can you double check
then check again once you finish
well, check the discord developers server
they would definitely have announced it there
your job is now to keep checking for me
pls ping me once it's out
ty
why do they not even have a way to bypass the check or at least set the os to something custom in env variables
if they cant even tell what the os is despite the binary files literally being compiled for that os 💀
lmao
is it possible in discord.js to make collectors end once it’s been inactive for a certain amount of time
y
yes
const collector = interaction.channel.createMessageComponentCollector({ filter: i => i.message.id === msg.id, time: 60000 });```
example
thats 60 seconds
and it does this
but
this will make it last 60 seconds
then end
I want inactive for 60 seconds makes it end
make your own timer, on every event reset your timer
once your timer runs out, call collector.end()
you can also access the collector's internal timer
and keep reseting it
also, just looked at the code
collectors already have exactly what you want
the idle option
const collector = interaction.channel.createMessageComponentCollector({ filter: i => i.message.id === msg.id, idle: 60000 });
oh ok
sorry I didn’t know
😁
how do u see that in the docs btw
I don’t see here https://old.discordjs.dev/#/docs/discord.js/main/class/Collector?scrollTo=e-dispose
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
how would I get an interactions type in discord.js?
but
that will give me like
MessageComponent
I need like specific one
button
select menu
etc
doing isblankblankblank is so much effort
is there really nothing that just returns it for me
check how the code does it
isButton() {
return this.type === InteractionType.MessageComponent && this.componentType === ComponentType.Button;
}
there's interaction.componentType
yay
how can i use \ on an emoji to get it's full format without nitro
By doing that on the server the emoji is on
but
discord turns it into :emojiname:
because i don't have nitro
wait i understand, i need to do it on the server?
toggle the emoji picker, open developer tools, and get the emoji url
what a very helpful help command https://cdn.discordapp.com/attachments/704061031500218392/1121302298363179068/help.mp4
yeah but then I need to manually type it
with \ it will do the formatting for me
that's very unfortunate
how the fuck do i rezise a 3840 x 3840 gif without losing its content
best help command ever, very comprehensive
reading help commands from the command line is very painful eitherway
anyone?
Ffmpeg
ok ty
ffmpeg my beloved
XD true
so true. so real
gifs having that high of a resolution are cursed
you might get better performance with apngs
Well see the "animator" sent the watermark as gifs with that size
I converted them to apngs myself
How does it keep on going how do they have so much stuff that the help command is that big
the video is trimmed down btw
it actually takes way more than 4 minutes to list the entire help command 
No
So it has 10 watermarks
If i resize it i could only fit 2
More like cutting
Idk
Thats what an app did when i searched for one
I haven't tested ffmpeg just yet tho
by resizing such a big gif you'll end with an unrecognizable blob
Got home and took a nice 💤
as gif doesn't support smooth transitions between colors (nor antialias)
The guy who made it couldn't even convert it to a fucking apng with the excuse that his adobe fucked up somehow
webp -> apng is somewhat easier as they use the same color format
people really need to let gif die
Cons of using cracked software to work with
🤨
battleless
e0c
no
this is just my 3 letter username
my real name is battleless
well u chose that username
ok e0c
stop

guys i have an ipv6 block on my linux server, how to i set it up as an ip pool for outgoing requests?
something about ip freebind or something
e0c sounds better
battleless > e0c
gl with that one
BUSINESS IS BUSINESS
ok
i didn't receive my daily status update from you yesterday
they didn’t announce it yet
you need to wait sir
any progress torwards infiltrating the alpha?
hm

what is this suppose to mean
look at the color hash
ok
just noticed ur nick is a valid hex value
magenta
orange
light purple
tim, i remade the command using that new format. i need a code review
how
how what?
that looks like pink
colors can have many named tones
that full saturation pink is called magenta, it's also one of the primary colors in CMYK colorspace
ok sounds cool
i am magenta
people usually use the abbreviation, maga instead of saying the whole thing. make sure to tell everyone your hex color when you meet them
lmao
huh
i am being helpful
are you over 30 years of age
i dont understand
yesrs of age
never ask a man his age
why isn't this valid PartiQL?
DELETE FROM *
just delete everything pls
do i really need to write a delete statement for each table?
yea?
most stuff says to drop and recreate the tables
i see an inner join hack
is it noticable in any way if I cache db results for just row counts (with where clause)? or not because the database has a 0.01ms ping?
it'll probably be noticable at scale once all the sql queries start to choke
Are any of the tables relationally joined?
if so you can cascade delete tables\
nope, they are nosql tables. PartiQL is not full sql
just to help people make the move to nosql
why need to delete them
i am testing Elo stuff and i want to reset the scores and run tests again
and if i recreate the tables i need to update the table names in my environment vars
i dont have a hardcoded name for the table. only refs
does partiql support this?
idk, that's default sql stuff
hi
welcome to development
me?
😘💐
me?
i try to use the right language for what i'm doing
i use js and rust for my bot
two languages for one bot?
all rust does is verify the signature
js takes 2-4 seconds to respond to a request during a cold start. rust takes 0-1 seconds
wow
discord closes connections after 3 seconds
wym a cold start
when the server isn't running and it needs to start an instance to handle the request
for cold starts, startup time is much more important than running performance
thats one area where node.js is not very good at
why not improve
hm
so all of their effort goes into developing strategies to analize and optimize the code in real time during running
node js should make it so I can generate number between two numbers
that would be useful
let me see if co pilot will write that for me
copilot is so annoying sometimes
actually most the time it is I might just remove it
tbh discord.js should be built into node.js
I bet like 70% of node.js programs are discord.js
Not even close
i dont use it
lmao
what do you use then
there goes battleless and his absurdities
the discord api
no library ?
i use none.js
i just write i little function that calls the api and use that
why not use something like https://www.npmjs.com/package/@discordjs/rest
i am using nodejs 16
16 doesn’t have?
you can have it with --experimental-fetch
i'm using the version that aws supplies me
Webservers, electron, SPAs, etc
Djs is a tiny minority
Flaze suggested me webhooks
for what
oh
I wanna but
I don’t wanna do all that shit to my internet to make it work
ye
is it possible to create discord events using a bot? like the events in a discord guild?
good idea
I made this thing I like to call a webhooker for my RPG discord bot game and it makes it look like actual NPCs are talking and if it gets ratelimited or stuff it can just fall back to the bot it's really cool and I highly recommend it
only discord can send discord events
oh wait
you mean these events?
yeah these
AWS has Node.js v18
hurray!
i dont want to custom install it
i just wait for aws to release images
because im lazy
AWS Linux 2 natively has it, unless that's not what you're using
my bot has weekly events that u can get other mobs and stuff and I'd like to add it to the support guild as events but idk if it's possible can't find it in docs, might be impossible since I'm using v13 still
i will try changing this to 18
why am i using x86
shouldn't i use arm?
That should work
🤞
a year later after rust is done installing
success!
so now i can remove node-fetch
Yes
and use axios again right??
Do you have a specific reason to use Arm?
isn't it cheaper?
AWS costs doesn't vary on architecture, all costs the same
bloatware
i need 1MB of libs to do api calls
use global.fetch on nodejs 17+
i can also remove all my aws library dependencies. nodejs18 comes with them preinstalled
Huh, I don't remember the prices varying for different architectures the last time I used it (which was fairly a long time ago)
Amazon does 🧌
I was doing that since before you were here lmao
cap
your first troll was in late 2022
I was here in 2021
no alt accounts allowed here.
?
i don’t have any alt accounts here
i only use my alt account for testing stuff
it's okay, i need you here so you can keep checking for the alpha release
you already agreed
no it’s not
Interpol takes this very serously
I will block you
not me? 😦
BUSINESS IS BUSINESS
business is business
simple francais
timple francais
if you're recording matches for different leaderboards would it make sense to track an Elo rating that takes into account matches played on both leaderboards?
Cassie!
i love how my entire point got washed away
i was referencing the 2021 part, not the simple french part 😭
what about 2021
what’s the best way to prompt someone with multiple questions using a message collector
I’m wondering how to do it efficiently and uncluttered
why am I getting Unknown Channel error sometimes?
Ig channel is deleted before that code runs?
you have a setTimeout, the channel may potentially be deleted before you try to delete it
and it only occurs sometimes
it's not
the channel still deletes
but for reason produces that error
what more context?
like what you're doing to produce that error
bro idk what more context u want
should i send all the code?
like i just did it 5 times and it didn't produce that error
but sometimes it does
🧌
Send all the code for that collector
collector.on('collect', async i => {
if (i.customId === 'confirm') {
await interaction.editReply({
content: `Ticket will be closed in 5 seconds!`,
components: []
});
setTimeout(async () => {
await interaction.channel.delete();
deleteTicket.run(ticket.id);
}, 5000);
} else if (i.customId === 'cancel') {
await interaction.editReply({
content: `Ticket closure has been cancelled!`,
components: []
});
}
});
maybe you click it twice?
not sure if you can see
but the components are removed in the editReply
so that wouldn't be possible
do you wait a lot before clicking confirm?
no
but what relation would that have to the issue
well, you use variables from outside the callback in the callback function
so
well the main function could have already ended, then someone runs another interaction, cache for that variable might change, and you don't use the same variable data anymore in the callback.
I believe that's how it can work, but not completly sure
does your bot have many servers?
i don't think that's how that works
but the bot is only being used by me
Ah then nvm ig
your cancel thing will not work btw
also put console.log("here") right before u delete the channel
let it run for a while, see if it appears twice before the error
I'm trying to understand singleton patterns and I read something about it that says I need to write a singleton pattern for database connection, so each shard use that pattern. The thing i don't understand is isn't this the same way if I just make the connection in main index file. Is this somehow prevents creating unique connection for each shard and uses only one connection for all shards
Can someone explain please?
singleton is supposed to act as a model for database entities no?
like in orm libraries
afaik, regardless of how many shard you have it all depends on where u put the db connection
No not like a model, let's say i use mongodb: every connection has the same options. And I'm little worried about having a lot of connections, like different unique connection for each shard
So what would happen if I just make the connection in singleton pattern and use that connection in index file to define database for each shard
to be fair, having a single connection isn't desired in most cases, but still it all depends on where u put the connection
if u put in a shared, global class it'll only create a single connection and pass it around
which I believe is what u mean with singleton
yes that's what it supposed to do i assume
like my manager class
it's static so it'll only be created a single manager which is accessed from everywhere
I do use multiple connections (at most 15)
but it's a single entrypoint to the database
hmm 
multiple connections are desired if u have a lot of transactions
u can setup a pool to limit the ceiling for concurrent connections
Thank you, I think i can go for single connection at the moment and change it to multiple connection along the way
yw
you can use people's discord account to authenticate/login/register on your website
you can create an advanced server join flow that requires some precondition/registration before the user is able to join your discord server
you can make newsletters and updates using webhooks without a bot
you can have slash commands without a bot too
Yeah I heard of that before and about ( self bots)
you can do all kinds of server automation
okay thanks for letting me know Tim
it works fine?
it can't possibly work no matter how hard you want it to
unless I'm understanding your system wrong, once you press "confirm" there's absolutely no way to abort the setTimeout
because you created an unnamed timeout
you click close ticket button
then it sends new message to either confirm it or cancel it
why do u even have a timeout then?
why not
because you add the possibility of async issues like u have
how
"stale state"
where the to-be-ran task doesn't know the data it has is no longer valid
if the channel is going to be deleted without possibility of being cancelled, simply do it right away

then contend with the unknown channel issue
you want aesthetics over functionality, so be it
or check if the channel still exsist
it’s not related to my setTimeout
remove it then to see




no
then shut
how could it possibly be related
if it isn't related, remove it to see
no
t h e n s h u t
😐
you can just delete the chanel after sending the extra message instead
that's what I told him
ik
but having wait 5 seconds is cooler
how sure are you that the message is always taking shorter time to send than the deletion timeout
based
@mental badge no ads
No wam
anyone happen to know a faster way of getting the remainder of division?
i need it to be very fast and the number to divide by is always the same
dont know if modulus (%) in c is good enough
My guy do you really think that there's a faster way? Arithmetic operations in C are as fast as it can get
Is getting the reminder even resource-intensive?
Nope
Besides, depending on the compiler you're using there can be an optimization CLI flag called -ffast-math that makes the arithmetic operations a lot faster but it's not standardized so be careful when using it
i like my math to be ⏩
But you shouldn't need that anyway, just use the highest optimization level (which is generally -O3)
doesnt O3 include ffast-math?
Nope
ah no, Ofast does
Here's a good blog detailing why you should be careful when using it
https://simonbyrne.github.io/notes/fastmath
No
Ofast is O3 plus extras afaik
That's not the case at all, -O3 does not care about size, it only cares about optimizing the program as much as it possibly can
-Ofast doesn't care either, but includes optimizations that can be faster but poses dangers to correctness
-Os and -Oz are the ones dedicated for size compression
just use it, the compiler will get what you mean and use the best option available
because i'm awaiting it ?
no you fish person
huh
"awaiting" is not a certain thing
how long exactly do you know the operation is gonna take
factoring in cpu time, runtime interruptions, internet speed, endpoint server processing and respond
it's something you can't control
so at least make it less faulty
it's not cool when your bot just dies from a unhandled rejection or have a memory leak due to unresolved timeout
read it again
you are never sure that the message is gonna send before channel deletion occurs
my bad, the channel that contains the interaction that you are editing
?
the error is coming from the interaction.channel.delete() not the editReply
i saw it in the stacktrace
it will come from the editReply
no it's not
Unknown Interaction to be exact
what..?
trigger a case where you click cancel and the editReply call happens after the channel gets deleted
no
you will see what i mean
the editReply ain't the issue
that is an issue
no it's not
you are not nullifying the interaction response after the ticket is cancelled
aka. blocking users from interacting with the interaction embed
???

idk what your yapping on about
consider this scenario
you click on confirm
and after that you immediately click on cancel
that's not possible
idk, the user gets curious for some reasons
that IS possible, considering you are not blocking those buttons upon clicking either buttons
so the collector is gonna keep collecting
once you click a component, Discord will not allow you to click another till the component has been replied to.
and as you can see, when I respond to it, I remove all the components.
so that's literally not possible
you don't, the setTimeout is independent
???
say after it's replied to, and the user clicks on cancel
the timer has been invoked already
that's not possible, as I said
I remove the components
with the reply
look at my code
collector.on('collect', async i => {
if (i.customId === 'confirm') {
await interaction.editReply({
content: `Ticket will be closed in 5 seconds!`,
// COMPONENTS ARE REMOVED RIGHT HERE
components: []
});
setTimeout(async () => {
await interaction.channel.delete();
deleteTicket.run(ticket.id);
}, 5000);
} else if (i.customId === 'cancel') {
await interaction.editReply({
content: `Ticket closure has been cancelled!`,
// COMPONENTS ARE REMOVED RIGHT HERE
components: []
});
}
});
what if the interaction happens twice before the await call gets called
what?
the user clicks on both buttons
multiple users can click the button at the same time depending on the filter
If you want the collect event to only fire once, use once instead of on
^
nope, it's ephemeral
I'd still only use once
even so, consider clicking twice before it even have a chance to edit reply
async function doesn't get called until the end of event loop
that's physically impossible, so why would i consider it?
it's physically possible
no it's not
you can click two buttons in a very short time on mobile
plus like papi said, if you want to use it once, use .once
so idk what your yapping on about it
thanks
thanks for wasting my last braincell on your "because it's cool" idea
Trying to use ActionRowBuilder, but is not a constructor
thing is
i'm not using it
Show the stack trace of the error
(The parts under the error line you showed)
coming from this
await questionMessage.edit({
embeds: [{
description: 'To move on further, you are agreeing to abide by our terms of service.',
color: Colors.Misc
}],
components: [{
type: 1,
components: [
{
type: 1,
components: [
{
type: 3,
custom_id: 'tos',
options:[
{
label: 'Yes',
value: 'yes',
description: 'You agree to abide by our terms of service.',
},
{
label: 'No',
value: 'no',
description: 'You disagree to abide by our terms of service.',
}
],
placeholder: 'Select an option from the dropdown menu...',
}
]
}
]
}]
});
Again show the stack trace
hey guys
nvm i fixed
i recently coded a javafx program, but i'd like to actually switch over to using the actual java gui builder instead of manual code. Is that possible?
The error could be coming from an erroneous library or part that isn't supposed to be used
And what would you guys even recommend
There's a few Java GUI builders that have an actual UI to build, just look up Java GUI builders
i was watching a tut of some guy on youtube
Yoyo
bro what the hell
Nah it's not lol

I had to work with java swing, is a bit more easy if you understand the general layout features it has
contender for top ten fish
Fish
it isn't?
Well atleast it's better than coding in all yourself, in this gui thingy you can directly place components in a specific place etc
while in pl;ain javafx it's always a hassle to get everything together
Yeah just gotta keep in mind that it might not scale the same on different devices or screen sizes
mhmm i see, i can live with that tho
and this right here is why people don't like helping him


yea cus I’m wondering why
it has my full name
🧌
battleless chindle the third
Because without a stacktrace how do you expect us to help you
idk
but I fixed it
Cool
yea sure
Smh e0c

yet you couldn't even solve your own issue
A "good" programmer knows how to listen to others
you on the other hand deny the possibility your shit code doesn't work how you think it does
I mean, e0c said "average", so if we choose to use mode (which is "doesn't program") then he's better than someone who doesn't even know code
?
What are you confused about
How come?
Every day I see you in here, you ask for help but tell the person trying to help you that they are wrong
when?
Not really
cause sayuri is right
they’re not though
okay bud
💀
how can I make discord.js not produce this error:
Error [ChannelNotCached]: Could not find the channel where this message came from in the cache!
👀
👀
that means you probably restarted the bot and then tried to fetch a message
i had same issue when making a suggestions bot, i had to fetch the channel separately so it was in cache
in my case it's because i'm <Channel>.awaitMessages() and the channel gets deleted. how would I go about resolving the issue so I don't get that error?
before
basically i'm making a ticket system and ask someone questions in the ticket channel after it's created
and there could be a case where the person closes the ticket instead of answering the questions
hello. I am just getting into learning to make my own bots for my server. I am having issues with the bot token though. When i create the bot, there is no token displayed, nor is there a button to display the token. And when i attempt to reset the token, it still doesnt display a new token for me.
what am i doing wrong?
are you doing this
Yes. But there's no token, or copy button, appearing.
I restarted my computer, and downloaded a different authenticator app, and it finally worked.
ah nice
anyone know what I can do about this?
-ping
pong
bump again
@lyric mountain love how my character just ignores the collider on the floor and falls straight through

Okay and now all of a sudden it works
does somebody know why it isn't sending the advert to all servers
const Discord = require('discord.js');
const ms = require('ms');
const {CommandCooldown, msToMinutes} = require('discord-command-cooldown');
const cooldown = new CommandCooldown('bumpServer', ms('2h'));
const { Database } = require("quickmongo");
const db = new Database('');
module.exports = {
name: 'bump',
description: 'bump the server',
category: 'bumpsystem',
run: async(interaction, bot, args) => {
const userCooldowned = await cooldown.getUser(interaction.guild.id);
if(userCooldowned) {
const timeLeft = msToMinutes(userCooldowned.msLeft, false);
if(userCooldowned) return interaction.reply({ embeds:[new Discord.EmbedBuilder().setDescription(`You need to wait ${timeLeft.hours + ' hours, ' + timeLeft.minutes + ' minutes, ' + timeLeft.seconds + ' seconds'} before this server can be bumped again!`).setColor("#C73D43")] });
}
await db.connect()
const data = await db.get(`advertisement-${interaction.guild.id}`)
if (!data) return interaction.reply({ content:'No ad setup found.', ephemeral:true })
let embed = new Discord.EmbedBuilder()
.setColor('#B468FF')
.setThumbnail(interaction.guild.iconURL())
.setTitle(`**${interaction.guild.name} | ${interaction.guild.id}**`)
.setDescription(`${data.description}`)
let row = new Discord.ActionRowBuilder()
.addComponents(
new Discord.ButtonBuilder()
.setLabel('Join')
.setURL(`https://discord.gg/${data.invite}`)
.setStyle(Discord.ButtonStyle.Link),
);
let check = await db.get(`adschannel`)
check.forEach(async (dta) => {
let guild = await bot.guilds.cache.get(dta.guild)
if(!guild) return;
let channel = guild.channels.resolve(dta.channel)
if(!channel) return;
await guild.members.fetch();
const delay = ms => new Promise(res => setTimeout(res, ms));
if(!channel.permissionsFor(channel.guild.roles.everyone).has(Discord.PermissionFlagsBits.ReadMessageHistory)) {
await db.delete(`advertisement-${guild.id}`)
await db.pull(`adschannel`, e => e.guild == guild.id);
}
let members = channel.members.filter(m => !m.user.bot)
const sumFunc = async () => {
if(channel.guild.id !== interaction.guild.id) {
await channel.send({ embeds:[embed], components:[row] }).catch()
}
delay(500)
}
await sumFunc()
})
let doneEmbed = new Discord.EmbedBuilder()
.setColor('#B468FF')
.setTitle("Bump Done!")
.setFooter({ text: "Come bump again in 2 hours!"})
await cooldown.addUser(interaction.guild.id);
await interaction.reply({ embeds: [doneEmbed] })
}
}
and its a dumb idea too
Looks like polish type of bot 
how can I define routes with matched params like /@{username} in the openapi 3.1 spec?
just like that or no?
Why
It's just not gonna work at all
o kurwa pierdole
:^)
Jokes aside, but at the beginning of 2020 there was a total flood of such bots in Poland. Everyone was doing something like this with the idea of earning money from premium ads. Few got more than 1000 servers but by offering an ad for each server every hour at almost 1000 servers it really was more of a spam bot than something that actually helped promote the server
Some were even able to send premium ads to all members of other servers in private messages
So I don't really trust such projects, in most cases they are doomed to die sooner or later
lmao
Because these kinds of bots do virtually nothing in growing a server
You’ll see no substantial or constant growth
These bots have been around for years and they have yet to be successful. A server list is more successful than a bot and those server lists already have a bot that bumps your server to the front of the queue anyway
Ik but much people ad it to their server
To each the own I’m not telling you not to do it
Just prepare for the possibility it’ll flop and hell if you make it popular good on ya as well
Lmao make the floor thicker
someone help me pls
Instead of seeing the votes directly through my bot, you can put it in my API, and somehow get who voted, it's just that the host where I host my bot doesn't give the ip because they say the ip is temporary.
what
?
idk your saying that without any context
I am using the translator
Sorry
Instead of directly accessing voting information through my bot, you can utilize my API to retrieve the voter data. However, the hosting service for my bot does not provide the IP addresses as they claim the IPs are temporary.
do you mean you can’t use webhooks because your hosting provider doesn’t provide you with an IP?
It's because I wanted to add a value to my database and send a message to user
The irony is unbelievable
I don’t think there’s much you can do then
u need a publicly accessible IP to use webhooks
Irony
Sadly you cannot use the webhook if you don't have any address to point to
You can tho check for a specific users' vote status, but it'll require them to use a command
It won't be automatic, but at least you can know whether someone voted or not
His issue (aside from the mentality) is that he's deleting a channel inside a 5s timeout and is getting an unknown channel error
And no, he doesn't really need that 5s timeout, he simply refuses to test without because "lookz cool"
💀
See here
And then here (feat. Sayu)
(The popup to disable mention didn't appear)
Ah yes the classic “scroll 15 conversations up to find my problem because I can’t be bothered to repost it”
this is not the issue
this is the new issue
how can I ignore this error so it doesn’t occur?
by writing functional instead of aesthetical shit
again, this is not related to the other issue
this is a new issue
try {
your code
} catch (not_useful_info) {
const received_info = not_useful_info;
setTimeout(() => ({
if (not_useful_info && not_useful_info.message) {
delete received_info.message;
}
}), 300)
return
}
what
FP for the win!
status report?
i report you
stop
i will give u a status report if u help with my issue
mordekaiser is #1 huehueheuheheue
what
what issue
this? show code?
I meant functional as in "working" code
look above when i said that
i explained the situation
this?
no
here
i know whats causing the error but i don't know how to prevent it
this?
yea
how did you define channel?
what's the stack trace
why
i wanna see where it's occuring
the stack trace isn't relevant
...
there he goes again
battleless doesn't show stack traces. those have lat long info
how will the stack trace help
i already know what's causing the error
so that same old code huh
never ask code it's age
