#development
1 messages ยท Page 1875 of 1
my guess is that something held the bot hostage after the first help command or before the gif command
add a () at the end of MessageEmbed
the best test i use for those is adding a console.log("this ran"); at the top of every buggy function
"I ran"
I raq

i fgan
should i do it?
i shat
Yes
well here we goo
w r o n g
N O
beware, contentfilter=high might be an issue give how big gifs can get
really?
other than that, I can't notice anything off
its just for how nsfw the image is according to tenor api
part because I'm pretty confused by the formatting choice
also i did the i ran thingy
ah, it isn't image size then
everthing ran
now the only thing i can imagine of is this https://www.youtube.com/watch?v=AaZ_RSt0KP8
Tiny particles from distant galaxies have caused plane accidents, election interference and game glitches. This video is sponsored by Brilliant. The first 200 people to sign up via https://brilliant.org/veritasium get 20% off a yearly subscription.
This video was inspired by the RadioLab Podcast "Bit Flip" https://ve42.co/BF -- they're brillian...
maybe it's an specific subset of images that are causing deadlock
i did send 10 commands in like 3 seconds
it was slow but did respond
10 is not enough
how many u want
we are talking about hundreds
imma just copy paste the gif command over and over
keep trying, random image generators sometimes return buggy images
ight les go ctrl c + v
just so you don't spam api, remove the message.send part
Hey all. ๐
all you need is to see if it'll faild during fetch
well
if the error ocurred on message.send it'd show a very specific error
Is there a way I can store a password online but to access the password is a link that I can only access but a code too. (If this made sense)
using encryption sure
to rephrase: "have a password stored in cloud that only your code is able to retrieve"
that?
Yes.
ight i think radiation fuck my bot up....
(again, since I'm sharing the entire files publicly)
you can hardcode for it to only accept requests coming from your ip
you can just use env files tho
then share everything but that file
I'm sharing a project but that project is accessible by everyone by downloading the files.. but the project itself using an app ID and app Key.
.. I want to store those online but get used in code.
.. since I don't want the users recreate an account for the key and so.
so like drm?
definitely drm
any other tests you guys would recommend?
from now onwards, store a log of retrieved urls
let it happen again you'll have the required links to backstep it
whats drm if I may ask?
Not sure if that's what exactly relates to what I said.
well i have done it imma wait now untill i get thiws error again
thanks guys
drm is what protects software. for example what makes it harder to download a random game and play it without paying.
ah, wait, I got it wrong
basically you want publicly (yet hidden) useable api keys and tokens
bad, baaaaad idea
I want to like store a password online readed by code using a URL whereas I can only visit and check the password while other IPs don't.. so if I share the URL with others.. they won't be able to check the password since the files of my project are all PUBLIC.
Why so?
not possible to do safely
The only solution i see is to talk with a backend and use like jwt or something for authorization using the user's ip adress
@solemn latch
discorcl
also cant u just share the files that you feel safe sharing?
I'm talking about keys. :))
api keys?
hmm
Like I said
Imma head out now.
if u wanna do api keys
use jwt
you can use IP's to generate the keys if you want
but adding a login page would still be best
I'm using readline npm. ๐
u can just copy paste the whole bot and get different api keys for the copy and incase anything goes wrong your main thing is still there?
lol idk about this xD
i have never shared my code like that
Im making a command interline thing.
wdym?
so readline is to read files?
To read command prompt inputs
I made a project called Vocbabulary Search, allowing you to search for meaning of words, but the best one requires you to use an API key and the ID which you registered.
(for school)
Anyways.. I wanted to share them privately, but seeable by me only, but readable by code.
wdym with "them"
The keys.
Also api key and ID sounds more like a login system to me
ideally your keys wouldn't be readable even by you.
true
they are just keys, no need to access them
Like I said if you want to make something with API keys you should use JWT
you can use it to "encrypt" data into a key
like for example the user id
then you can "decrypt" the key and get the userid
and based on that you can authorize them
the users will have to input the keys themselves tho
unless you make a login page and encrypt the key based on the username for example
Yup.
then use that key to talk with a backend
I'll check more about it.
Wdym
well you don't want to publicly show the code right
you only want to show the api keys?
Vice Versa.
Basically THIS ^
then how will access the code?
if they don't even know their own api key?
and you don't want to add login stuff
That's why I want to store it online seeable by me only but readable by code by all.
I'll see.
Ooo Ooo
?
@lyric mountain i managed to get the same gif
ok
Is there more easy way
interesting what cause the bot to stop ๐ค
I suppose you can get the buttons from the message object and change it through that
but I think recreating is a better way
is it allowed if i make a counter for myself which shows how much times my bots commands were issued
if this is a good place to ask
Nwm then
don't think you can directly change a button without recreating the rows
yeah I haven't tried it
but I thought that might work
but recreating them is the best way
If you want something like that its so good
it'll be hard to find the issue then
What I like to do is make a function/method called getButtons() and using the parameters to add options @earnest phoenix
try to ask xiuh when s/he's free, maybe there's some important detail to reproduce it
Ill wait until discord api includes button.edit
I dont think they will add something like that
yeah, probably wont be added
Why not
because you can't edit buttons without editing a message
Yea
Yes i will do that later cause even i need to sleep now
for example when someone presses the settings category i want to disable it
Like I said I like to make a function called getButtons which returns the messageaction row
inside of the parameters
you can add like an array or an object or whatever which includes settings
do buttons even get their own id? 887044132269330000
you define their ids
thought so
for example:
// Thi sis typescript tho
function getButtons(options): MessageActionRow {
return new MessageActionRow().addComponents(
new MessageButton()
.setDisabled(options.disabled.includes("thisButton")
)
}
buttons = getButtons({ disabled: ["thisButton"] })
talking ended?
I don't think it's worth the effort lol
It's less effort then having to redo the buttons lol
its also way cleaner
Alr my code is 130 line
and teaches you functional programming which could be really useful in making your code more readable and understandable
I dont want to make it bigger
then don't edit the buttons
When i delete a picture, my bot logs it as not found. How can i make it send the picture deleted?
import Discord from 'discord.js'
import { Command, CommandProps } from '../@types'
import { client, db } from '../index'
let e: CommandProps
export async function messageDelete(message: Discord.Message | Discord.PartialMessage) {
let channel = await db.fetch(`modlog_${message.guild?.id}`)
if (!channel) return;
const deleteMessage = new Discord.MessageEmbed()
.setTimestamp()
// .setFooter(message.member?.user.username as string, `${message.member?.user.avatarURL}`)
.setAuthor(`${message.author?.username}` as string)
.setColor("RED")
.setDescription(`**A message from <@${message.author}> was deleted in <#${message.channel}>**`)
.addField("Content", message.content as string || "No content found... Either the message was a Sticker or a Picture")
.setFooter(`ID: ${message.author?.id}`)
var sChannel = message.guild?.channels.cache.get(channel) as Discord.TextBasedChannels
if (!sChannel) return;
sChannel.send({ embeds: [deleteMessage]})
}
If there is so something button.edit() i would use
well there is not and there will probably never be

Lol
?
is here alr empty?
or no?
again only playing left for me...
i see that dev day is more for making them one day less, than helping...
maybe universe said "fuck this dude in particular"
Omg
???
ur in similar situation as me, thats normal in this server ๐
you want it to not log this when it has no content? "No content found... Either the message was a Sticker or a Picture"
or i guess do you want to add another field if a picture was deleted?
its never empty
o ok. i go away. should i also delete previous messages?
Yes
I want it to log the picture which was deleted
Please stop seeking attention and keep channels on topic
so delete all mine mesages from this channel? or no?
if(message.attachments.first()) //addfield here
we don't care tbh
Where do i put that?
where you want to add a field for deleting attachments/images
Mac how do i clear cache
Dbl cacheclear
@urban slate
In order to clear your cache for the site, press CTRL+F5.
If this does not work, try one of these resources below:
Instructions on Microsoft Edge
Instructions on Google Chrome
Instructions on Mozilla Firefox
Instructions on Safari
Instructions on Opera
Instructions on Brave
Thnx lol
Yes
I always thought Brave was a meme
Some of my friends do
brave still is spooky imo, most suspicious browser
m$ edge is shit. and spies
Spies?
becaue its from m$ every thing they do spies
similar to google but google is doing for free, so a one thing beter
Lol
Hmmmm
i know that edge is free. but 1/2 apps they made is paid and in this moment i just compared companies, not products
ah it's you the dude who protests against ms
indeed. i use arch btw
Lmfao
ยฏ-ยฏ
what ide do you use to code?
you use github?
nope, replit but as repo is opensoure i know that people have access to it]
you really hate microsoft dont u
yep
would you've switched to guilded if discord agreed to microsoft's offer?
if i could - i'd send there a nuke
Isnt discord owned by ms? Or did they not sell
i have acc there, yea
discord denied the offer
Ohk nvm
iirc you were making a bot that mimics bash cmds
yes, i was cause noone helps me and people from new api thrown me out of their discord
wait but why
many things, nvm
talk to urself
i'll play some dumb games and go sleeping. everything i can do. bye
No, I meant why would you want to make a bot that mimics bash commands?
not ur business
first discuss was about how flawed making a file downloader bot was, second (2 days after) is about how he's trying to fight microsoft by being the flag-holder for opensource movement
ngl it IS a nice idea, the issue is just HOW it was made
but what's the point
geez. stop
of having a bot that mimics bash commands
im leaving. and im deleting bot from topgg cause i see i'll have problem cuase of it
bye
with the right implementation it'd be a cool bot
Idk why this person feels personally attacked by every single message people send
ye
Nah never been a mod
I swear I've seen u in red robes
Lol
dont think about it too much. probably a language barrier issue
Ig
You know what, I've been so burned out on my main project now I'm inspired to make a bot that uses bash commands
doesnt this surpass language barriers
I feel like it does
yeah same
DosBot
๐คฎ
or !/bin/bot
eventually you realize there are some people you cant help
LMAO
but I don't make public bots anymore
it's just my own project
I create them for personal growth mainly
make it opensource so you can get free jetbrains juice
I will
If youโre in a school then you can also get free jetbrains juice
I don't know whaty jetbrains juice is but sounds nice
btw anyone knows if you can still get a free .dev domain from github?
JetBrains IDEs
Trust me once you go JetBrains you never go back
lmao
and is still here
and now he's in a reaction tantrum
Although VSC is lightweight
i go mods
Compared to JetBrains ides
RAM GOES BRRR
jetbrains is the whole personal jet with built-in cinema and hot bathtub
True
is jetbrains rlly that good?
oh you can bet it is
but doesnt it cost money?
ye
that's why I said to start an opensource project
Do you go to school?
so you can get jetbrains juice for free
yes
You're making me wish they accepted it now ๐
even if I don't get programming in school?
I donโt think that matters
you just need to be oficially an student
mmmh
I'll look into it tomorrow
also
does github still do the .dev domains for students?
do note, that you NEED to think about what you'll do after you end school
bcuz you don't keep it forever
they did?
yeah
Like
2 years ago or something
I tried to apply
but needed a school email
and asked my school and they said we would get one this year
ic
geez. offtopic as fuck...
thats not development questions and it should be in #general . mods were already notified
Look at all this shit
domains are part of development
please dont minimod #rules-and-info
bro stop seeking for attention please
possible to set the setTimestamp this way?
Divide it by 1000
its built in. i dont think so
ok but we can put this in setTimestamp?
not the actual question, but you can format them https://discord.com/developers/docs/reference#message-formatting-timestamp-styles
idk
no
setTimestamp doesn't take parameters
like, in relative time?
You also can't but it in the footer
^ use footer for custom timestamps
+1
okay okay thx
do note before u try, you cant use markdown in footer
so no fancy unix timestamp parser
ow ?
you'll need to write ur own timestamp formatter
and output it as text
(that if u want relative time like in xxx days)
setDescription and necessarily at the top of the message?
else u can just use dateformat
ye
looks too small, probably seconds
oh, nope
ms
it's just the font playing tricks
how to switch in minute for unix timestamp ?
ms / 1000 = sec
sec / 60 = min
min / 60 = hr
hr / 24 = day
day / 7 = week
so ms -> min would be ms / 60_000
Eww meth math
oof
Am I allowed to use the !/bin/bot name?
unix timestamp is just normal timestamp divided by 1000
message.createAt ?
probably, people use names with weird charaters all the time
no prob
do I have ur permission?
my only beloved bot is shiro
I was referring to his actual number which wonโt be a valid timestamp after rounding either, Mr Kuhabukawaga
alright
don't see myself making any other bot
Math.floor
Did you even read what I wrote lol
bye. i go sleep i think and/or play something. but im just going to go afk
go on bro, have fun
lul didn't note the last part
that earlier timestamp is messed up bcuz he converted to minutes
Yeah
when he should've converted to seconds
You should told him the message format is doing the job for him after passing a timestamp
Shame on you
Hax
how is this an offer
Used it, itโs trash anyways
thresh
Worse than notepad++
you get: text editor
I get: analytics data, sellable coding habits and market info
lmao
I don't like how all of the offers are basically trials
nah not all
there is some cool stuff
Jetbrains products ^
some jet ides have both a community version and a paid version
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
community version are fully unlocked, they just don't have some official features ultimate has
but it's not like there isn't a plugin available for that either
but it's totally worth it, it saves so much time and headache when coding
naruto start
and given how user friendly jb is, you can't really not love them
n start
like "oh you're not a company owner and can't afford our ides? that's fine, here take this all-in lifetime license and be happy coding"
how do i automatically kick a user if he/she hasn't written anything in 30 days? (djs v12)
you get the paid version for free
IntelliJ Ultimate is the best ide
it's 100x compared to vscode
bruh...
ye
that's what I said
they have a shitton of support packs for non-commercial devs
even commercial ones get discounts
how do i get the latest timesttamp of a users message
JetBrains is honestly great
User friendly, has an educational and open source license, clean UI, etc
multiplayer coding feature
too pog
you'll need to keep a track on your db
contantly fetching from discord is not really a good option
Thatโs nice and all, but that requires friends to use
And/or coworkers
the only bad side is that itโs made in Java and itโs kinda heavy as ide, itโs not as fluid as vscode yet
Vscode isnโt an ide
Itโs a text editor
With some syntax highlighting
And extensions
IntelliJ IDEs are fully fledged IDEs with tons of features
well with the extentions it can be considered an ide
itโs basically what it is
itโs not just a text editor
I still wouldnโt even consider using vscode for anything other than light web dev and ts/js imo
Maybe some scripting languages
But certainly not any of the C derivatives
yeah itโs decent for frontend dev, still not that good
Both programs have their different use cases
Wdym you don't keep an emergency workforce chained in the basement?
Who doesnโt?
Iโm aware, but I wouldnโt really want to use JetBrains for something like setting up a few lines of html
Something simple
do anyone know how to do bitwise ops on a grafana query
im trying to add a panel to figure how much ram is currently being used, but i can only get it in bytes and well....bytes is not exactly user friendly nor eye friendly

im using prometheus with grafana if that makes a difference
i love counting by 8s
can anyone help me out pls, i made a game and would like it to show up on discord when i am playing it. How do i do this?
its just rpc isnt it?
ya
Can't u just encode it in decimal?
How is it currently? Hex?
just bytes
its reported by a dependency, i dont actually report it myself
i figured it out
i was just being rart
Yeah but, how is it represented?
Oh ok
when I go to add the bot, it says: this bot has been flagged by our anti-spam system for abusive behavior pending review and currently cannot be added to any additional servers.
what do i do? :/
You've already been told to reach the devs
:/
const { MessageEmbed } = require("discord.js");
const { client } = require('discord.js')
module.exports = {
name: "hack",
aliases: ["hacking"],
description:("Vote"),
async execute(message, args) {
const hacked = message.mentions.users.first();
const user = message.mentions.users.first();
const answers = [`Hack of ${user ? hacked.username : hacked} is just completed\n_**The Totally Real And Dangerous Hack Is Done!**_`, `Hack of ${user ? hacked.username : hacked} is just completed\n_**The Totally Real And Dangerous Hack Is Done!**_\nTop Visit: For More Updates!`, `Hack of ${user ? hacked.username : hacked} is just completed\n_**The Totally Real And Dangerous Hack Is Done!**_`, `Hack of ${user ? hacked.username : hacked} is just completed\n_**The Totally Real And Dangerous Hack Is Done!**_`,];
const words = [`duck`, `chicken`, `ok and?`, `never gonna give you up...`, `im gay`, `wtf`, `porn`, `lol`, `dank`];
const ipaddress = [`127.0.0.1:890`, `167.1.0.1:800`, `229.6.3.1:190`];
const dm = [`joe mama`, `@everyone Steam, Discord Steam Is Giving Out Free Nitro At: ***********`, `i just nuked a 400 member server!`, `how are you?`, `Vcodez.xyz is the best bot ever man!`, `Vcodez.xyz SUCKS! ITS SOOOOO BAD!`, `vote for trump today!`];
const virus = [`meme_virus.exe`, `bonzy_buddy.exe`, `steal_emotes.exe`, `free_nitro_scam`, `your_time_has_come.exe`];
if(user == client.users.cache.get(message.author.id))
{
return message.channel.send(" Ok, You are hacked Pick someone else")
}
function wait(ms){
let start = new Date().getTime();
let end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
if(!user)
{
return message.reply("Who to hack? Please Mention him");
}
const prompt = await message.channel.send(`Hacking ${user ? hacked.username : hacked} now...`);
await wait(2700);
await prompt.edit('[โ] Finding Discord Login...');
await wait(2700);
await prompt.edit(`[โ] Discord Login Found:\n**Email**: \`${hacked.username}***@gmail.com\`\n**Password**: \`*1*9**h\``);
await wait(3700);
await prompt.edit('[โ] Fetching dms');
await wait(3700);
await prompt.edit(`[โ] Last Dm: \`${dm[Math.floor(Math.random() * answers.length)]}\``);
await wait(3700);
await prompt.edit('[โ] Listing most common words...');
await wait(3700);
await prompt.edit(`[โ] Most common words are: \`${words[Math.floor(Math.random() * answers.length)]}\``);
await wait(2700);
await prompt.edit(`[โ] Injecting virus into discriminator #${hacked.discriminator}`);
await wait(3700);
await prompt.edit(`[โ] Virus Type \`${virus[Math.floor(Math.random() * answers.length)]}\` Injected!`);
await wait(3700);
await prompt.edit('[โ] Finding IP address');
await wait(5000);
await prompt.edit(`[โ] IP address Found: ${ipaddress[Math.floor(Math.random() * answers.length)]}`);
await wait(5000);
await prompt.edit('[โ] Spamming email...');
await wait(6700);
await prompt.edit('[โ] Selling data to facebook...');
await wait(3700);
await prompt.edit(`${answers[Math.floor(Math.random() * answers.length)]}`);
}
};
that client isnt logged in.
if(user == client.users.cache.get(message.author.id))
youll want to use message.client, or get it in your function parameters.
thanks!
what the holy fuck am I lookin at
yk stuff like .then exists right?
think about how nested that would be
could even just do a interval, loop over it.
function wait(ms){
let start = new Date().getTime();
let end = start;
while(end < start + ms) {
end = new Date().getTime();
}
lmaoooooo
lmao
this sleep function is the equivalent of hitting your computer with a baseball bat because it will most likely be waking up in a hospital
pls @earnest phoenix watch this talk or something ๐ญ https://www.youtube.com/watch?v=8aGhZQkoFbQ
JavaScript programmers like to use words like, โevent-loopโ, โnon-blockingโ, โcallbackโ, โasynchronousโ, โsingle-threadedโ and โconcurrencyโ.
We say things like โdonโt block the event loopโ, โmake sure your code runs at 60 frames-per-secondโ, โwell of course, it wonโt work, that function is an asynchronous callback!โ
If youโre anything like me...
function wait(ms) {
const end = Date.now() + ms;
while(Date.now() < end) {}
}
Dw i fix it
ok but watch the talk regardless
i will
this sleep function is the equivalent of hitting your computer with a baseball bat because it will most likely be waking up in a hospital
lmao
nailed it
For react when I update a state with returning a new state I also updated a useRef array. With this useref Im trying to update the dom. But its not working.
But, y bcoz as the state changed it should rerender the whole dom with correct useref value too
I mean, better than 30 await lines
And u can do one action per .then
why isn't this writing to the file (server-count.txt)?
client.on("guildCreate", guild => {
var logMSG = (`Server Count: ${serversIn}\nDate: ${moment().format('MMMM Do YYYY, h:mm:ss a')}\n`)
console.log(logMSG)
fs.writeFileSync(`server-count.txt`, logMSG);
})
30 levels of nesting is worse imo
it wouldn't be 30 levels
await sendMessage("blabla")
.then(() => sleep(3000))
.then(() => sendMessage("hi"))
.then(() => sleep(3800))
.then(() => ...);
1 then per line, no more than 1 level per .then
That's better than nesting, but still worse than await
Idk, then feels cleaner and can be handled by a single .catch
you tried to get client from the module
is it a bad idea to start a collector in another collectors end event?
Makes sense
Why nest collectors?
multi part thingy
that requires user input
so, collectors
well i just need like
2 more
also how do you map an array into an array object
say i have an array of like 3 different things
["foo", "bar, "what"]
then i want them to be in a array object like this
[{
"label": "foo",
"desc": "foo"
},{
"label": "bar",
"desc": "bar",
}, //....
.setColor("BLUE") .setDescription( Invite MUSICALLY`
i want to keep image before invite musically can someone help how to keep
arr.map(x => ({ label: x, desc: x }))
Why this is happening
@short spruce the endpoint url is not valid
oh
A bit flip will invalidate your JSON or break the javascript compiled bytecode
Both of those are unlikely to crash the entire bot
Btw can we coding bot with mobile?
Not a good idea
bro
i guess just god said no
at this point
Lol
we have tried everything to replicate the error which didnt even console log
but didnt get it again
Whenever I have a command that makes me pull my hair out I just delete the file and start from scratch
but it works for everyone everytime but didnt work specifically that time lol
a basic laptop will be good too
Connect a seven segment display and a mini keyboard to an rpi
hmm
will node run on that lol
are there any reliable apis/gh sources for copypastas? trying to roughly detect them in chat and auto delete
Yeah it can
so like this?
so like this?
so like this?
that's spam
Because the rpi is an actual computer
i mean like
oh
"watch out for this user!!"
or
"click for free nitro! <some link>"
no lol
just a db or maybe a file someone maintains with those kind of msgs
well i can add a single space and break it
trying to then match words together and del if like above 90% match
welll you can always make a bot whihc allows only certain links in the server
already got a func to do that
dont think an api will have somethin like that
there's a reason auto mod bots suck
they cannot seperate innocent users from rule breakers and most of the time they don't work
A human mod will be WAYYY better
and about the words.....the more that i think about this project of yours it sounds just like my bot lol
there's a reason i don't use them, but i'm making one anyways
my bot does the same stuff
mine's not for discord
well my bot doesnt get fucked up by a single space
just asking here because it's the kind of thing a discord bot would do
hmmm not sure cause my bot uses different methods for that
yes
Best idea
but i dont got that much time for that
Because you can write the copypasta ลรฏkรซ thรฏs
i mean i already plan to use this to block things such as big pastes https://twitch.gimu.org/
but yeah
A growing database for twitch chat copypasta. Submit your own copypasta to protect and preserve cultural heritage or browse through a variety of categories and learn.
if anybody wants to pull a db of those together though, i might start making one
i have a life
lol
ask a dbl mod to do that
oof
imagine having a life
It's funny because it's true
eyyy thats a mod with a good sense of humor right there
Firebase with machine learning and feed the entirety of twitch.gimu.org
i mean if i went to that length i'd be feeding it actual scam stuff though
and that gets complex
scammer dorks using embeds
At that point you should hire an actual mod
and at the point of an actual human, well outside of bot use tbh
lemme just put my nokia back in my draw
someone threw a nokia at ovh
ovh is a hosting right?
ohhhh
f
this is why you don't use brick walls instead of nokia phones
This is why they should have made backups lol
People literally lost their data in a fire
And cubedhosting's servers blew up
"hi, we host your server for the huge monthly fees you pay. last night our servers burned down so you lost everything. cool, have a good one"
okay
Pretty much
Which is why I started making daily local backups just in case
wait so i dont know much about this so like if i had my bot hosted on their servers and they burned in fire would i lose my bot's code?
if i didnt back it up
If the host hadn't made backups in a different location yeah
cherry servers has more insane fees
yooo thats outrageous
Bigger hosts usually have backups in other datacenters
no wonder one of the minecraft servers i was part of literally had fuck ovh emojis and stuff
So if one has a catastrophic failure you don't lose your data
But that was the problem with OVH. They either didn't have backups or backed up files in the same datacenter. So when it burnt down they lost those files.
They had backups in the same datacenter iirc
Kinda like putting all your eggs in one basket
all your eggs
Yeah which is why you as a dev should always make local backups of everything too.
Github backup repo moment
Yeah all my bot files are on github and I do daily local db dumps
looks for pendrive
how to start coding?
Hey! There are lots of useful resources in the pinned messages here! Feel free to check them out! ๐
db dumps?!?!1
Mhmm
you dump your db 
That's where it belongs

does anyone know the format for this? the link is clickable but the other parts of the text aren't. this is for your server description!
probably hyperlink
you can change text size using css
By big do you mean size or bold?
the bold
use <b>
**[text](url)**

Mixing html and markdown is stinky
never knew you could do that 
same on discord
so would it be like this? i wanted a big header so i used h2
<h2>vanity link!<h2>
im using the markdown guide to help me figure out heading sizes
<h2><b>Check out the <a href="link">support server</a></b></h2>
sir
your status
how did you do that?
teach me or guide me
howw do you actually get buttons on status bruh
Google Discord RPC API.
omg my head i tried it but my link just turns into an error page
Paste your code here but put it inside ``` triple backticks
where does it take you?
<h2><b>เฆ <a href="discord.gg">- discord.gg - #1 kpop mental health server </a></b></h2>
i removed the links
In the href property
i previewed it and the link worked but for some reason i clicked saved and it never worked ๐ญ it's still my same server desc
Clear your cache
aa there we go! it worked :D
now i just need to do the whole description again
my head hurts
for regular size bolds i just do it how you normally do it here right?
Wrap them in <b></b>
You're using HTML so stick with that instead of mixing it with markdown or it'll get messy
ahh alright got it!
for underlining texts what would be the format? i cant find it on the guide or im just blind
<u></u>
tyy

hard coded password?
and for another layer you should also code a value of expected workers and once that limit reaches do not allow anymore connections
and sessions may be able to reauth with a special token?
there's lots of ways
but then you're moving the problem an extra step aren't you (assuming workers aren't in the same server)
maybe even 2fa
hello i would like help
before the new pinkish and white update to top.gg my iframe was correctly adjusted and the site was responsive but now this is happening
before it the update it was good
well anyone can help
and if ur wondering the height of the iframe here you go
<iframe src="https://jarvis-bot.netlify.app/" width="880" height="990px">
That looks like a problem with your website not being responsive
ok
thats not anyproblem with the iframe cause it was better before the update
Open your website in a new tab and size it to 880 x 990px. It'll probably look the same.
well yes thankyou
will fix the responsive probelm
i was just confused with the height and width thanks
hey there
So like I have run into a issue, How would I be able to make a interactive scrolling thing, So like you have multiple pages to a embed and to scroll, Got the collector set up and the message itself, Then I realized, I need to loop the collector but I have no clue how that works,
So rihgt here is the collector when it collects things right?
How would I loop the collector back on a collect without making a massive chain?
A larger screenshot of the area;
How could I make this collector loop itself so I could keep it from just collecting it once? So it opens a new collector on it collecting input but without making it a massive loop
Long story, But you got any ideas?
And here I was thinking I got a response to the code question I sent only for it to be a scam link 
lmao
remove the max: 1
because of it the collector only collects one interaction and stops
Yeah but I then also want it to reset the timer so it starts back at 45 seconds
it would be much easier to remove the max 1 and handle the timer yourself
@novel snow
How would I be able to reset the timer so it goes back to 45 seconds?
awaitMessageComponents or something
But what if the user like abandons the message?
Like he just forgets about it or some shite
there is a timer on that too
Since I want it within the command file itself to keep things organised
Hmmmmmm
How would that work?
its much better for question-answer types of commands
const sent = await message.channel.send(...)
const answer = await sent.awaitMessageComponent(...)
if(!answer) { return await message.channel.send(...) }
const sent2 await message.channel.send(...)
const answer2 = await sent.awaitMessageComponent(...)
if(!answer2) { return await message.channel.send(...) }
console.log(answer, answer2)
something like that, i havent used it myself
i get something like this type of error
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/distubejs/prism-media.git
npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-14T10_50_05_449Z-debug.log
root@ip-172-31-37-83:/home/ubuntu/real# npm i discord.js
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/distubejs/prism-media.git
npm ERR! command-line line 0: unsupported option "accept-new".
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-09-14T10_50_26_042Z-debug.log
on npm install
Lemme see
How could I add a timeout to it and then like after the timeout is done it does something else?
Is there an equivalent of that in detritus
no
hey! do you know the command I have to use to implement the f1 template on my server?? thanks!
f1?
ye
idk
Yes, I was looking and they have a template that can be used which is the one I would like but I don't know what command I have to use to implement it in my event.
for example
That's not even an official discord website
@scenic kelp looks like a dbl wrongserver
Can someone answer this pls?
The stackoverflow dudes can
Yep Ik but thought i'll share here too
you don't necessarily have the wrong server, you're just very vague about what the template is
probably should have pinged for that but oh well
does anyone use heroku here? particularly heroku postgres one
https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=createReactionCollector
does anyone know if there is a maximum for reaction collectors?
hard limit no, but you should refrain from keeping too many active at once
oh ic, but what if I need to send an embed message with more than 25 fields? I was thinking about using reaction collector for pagination but it won't work since I need to send the message on multiple servers
do you know any solution for this?
the way I recommend is creating a handler for reaction events and listening to reaction events
idk how to explain, but basically have a single listener which pass the event to a handler containing the actual actions
if you know java I can show u an example
ahh I see what you mean, it works like reaction role right
basically, but you won't use collectors at all
you store functions in a map and retrieve once a reaction event is fired
aight I wasnt thinking deep enough lul but yea ig thats what im gonna use then
thanks โค๏ธ
np
dont use reactions tho
use buttons
its so much easier and you can store the pagination information inside the buttons themselves
but i heard buttons aint working on new version of discord.js, right...?
you can simply have a timeout and reset it when the collector collects something
they are lol
oh okay, let me try it then, because I rmb it was broken when I tried it lol, thanks anyway
like it was fine on v12 but not v13 for me hehe xd guess its working now
S
I'm trying to insert something into a SQL database, however I get the error that gameid doesn't have a default value. I'm a bit confused, since I made gameid be a primary key.
Code:
let sql;
sql = `INSERT INTO games (winnerid, loserid, winnerelo, loserelo) VALUES ('${id}', '${id2}', '${round1}', '${round2}')`;
console.log("Inserting game...");
const notSetEmbed = new Discord.MessageEmbed()
.setColor('#10D365')
.setTitle(winnerName + ' won against ' + loserName + ".")
.addFields(
{ name: 'Winner: ' + winnerName, value: 'ELO change: ' + p1 + " > " + round1 + ". +" + eloChange },
{ name: 'Loser: ' + loserName, value: 'ELO change: ' + p2 + " > " + round2 + ". -" + negChange },
)
.setTimestamp()
// Send the embd.
message.guild.channels.cache.get("883834087125700659").send({ embeds: [notSetEmbed] });
con.query(sql);
SQL:
CREATE TABLE `games` (
`winnerid` varchar(255) NOT NULL,
`loserid` varchar(255) NOT NULL,
`winnerelo` int(255) NOT NULL,
`loserelo` int(255) NOT NULL,
`gameid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE `games`
ADD PRIMARY KEY (`gameid`);
COMMIT;
you're not assigning anything to gameid
winnerid, loserid, winnerelo, loserelo = 4 fields but you declared 5 not nulls without default values
also don't use varchar(255) on mysql
use varchar(191)
I'm a bit confused, since I made gameid be a primary key.
making it a primary key will only define a constraint to it, you still need to supply a value or useAUTO_INCREMENT
Is it possible to use serverless functions to recieve interactions?
serverless?
i have this problem regarding pg:push where it raises an error when processing data for table.
...
pg_restore: processing data for table "public.table"
pg_restore: error: unrecognized data block type (0) while searching archive
sorry for not providing details ahead
are u manipulating the database through heroku?
today im not asking anything. dont ask me to ask. if something - currently watching memes, shitposts, checking socials and playing games ONLY. bye
and im also making backup of my bot page in topgg to be able to delete it after ban from here
noone. im not here
https://i.woo.pics/71461da00b.webp
It seems some users are not realizing they need to click "Test" before clicking "Next".
Should I just highlight the test button, or make the next button a "Test and Next" button?
Test and Next
Or maybe some popup like โWarning: you have not tested yet. Continue?โ
Seems like you already have something similar to that though
Id like to avoid people not testing here, as people will just fail to fill the webhook url properly and then get more confused 3 pages down when nothing works
Yeah fair
I mean the thing you have now seems pretty self explanatory, you have to click โTestโ before you can continue
Like that text says
Apparently its not enough still.
I might just leave everything exactly how it is(enable next too), but make the next button test on this page if they havent tested.
if the test fails just dont go to the next page and give the correct error
Yeah
i have a 300mbps connection but my bots ping is really high any fix for that?
where is it being hosted?
its like 500
on my laptop
like country?
discord text servers are all in the US iirc
well there you go
got it
Hello, I recently updated to Discord.js v13, however I keep getting the following error:
whats your node version?
https://discordjs.guide/preparations/#installing-node-js
v13 requires node v16.6.0
well any way to improve it?
You could try hosting it online
via services
nah i cant be bothered for all that stuff, i have never done that
rn node . feels heaven
v12 is deprecated, dont think you want to go to v12.
but its, npm install discord.js@12.5.3
just cause how simple it is
any vps can run node
oo wait
but i dont think u can update the repl node version
so ima have to stick with it sadly
others are on v13 djs on repl
i do own a website can i run host my bot on the same servers?
idk if it is vps
depends
huh
@cosmic forum
yep i just did it
however
the problem persists
I dont know replit as I use a VPS, so cant really help with it. but many people have updated nodejs on replit
wrong nodejs version
no idea then, however this error is from wrong nodejs versions
ah ok
timhack
to update node on replit u gotta use timhack
Handsome man
lmao
you can't hide, we know your identity
im just pushing my existing database through heroku
im using heroku cli
Lol
that's what I'm saying, use raw postgres cli
and then when i use heroku pg:push, it actually worked and stopped right after
this line
oh
you can access it remotely
How can I sort an invite to a user? So like the invite tracker.
Hey. ๐
For the help thing.. is it possible to recreate this with console.log.. but some type of console. option used for this?
So like if the invite from a user is 30 and when a user joins it is 31. How do I detect it?
Regarding your Presences request, while we're happy to provide access to our privileged gateway intents to power unique, compelling, user-facing functionality, we are not ready to provide access to that data solely for basic userinfo and serverinfo functionality, or bot statistics tracking.
If you end up building another feature that relies on the presence intent, simply reach out to us and we can review again at that time!
Which Feature needs Presences intent
Btw this message from discord
If you're asking what feature needs that intent then you most likely don't need it
I need it for get user info
And like client.user.username
But discord dont allow me to use it
Yeah
This doesn't need the intent
what can i add so that they let me
Actually needs
I cant use this code when this presencse off
...
This is something no one can answer.
This is something that is depending on your bot.
@quartz kindle all time lords need efficient bots: https://github.com/brainboxdotcc/DPP/releases/tag/v9.0.4 9.0.4 is out ๐
Telling them features that your bot doesn't have but included in your email is basically presence hunting.
But they want a command really need that intent

