#development
1 messages · Page 1324 of 1
yes
how to start py file on package.json
@earnest phoenix it clearly says json
it will always show the number of members from the first guild it finds
Okay
yah
keep in mind that if your bot ever joins another guild, the first guild is not guaranteed to be yours
Glitch doesn't support Python
glitch does iirc
could you use client.guilds.cache.first().memberCount instead?
keep in mind that if your bot ever joins another guild, the first guild is not guaranteed to be yours
@quartz kindle Idc about that, its only for 1 server
yes you can also use memberCount
(Since it's less hassle)
Uhh @quartz kindle Can u join and leave my server when i say, so that i can test it's working?
@narrow crescent your prob. solve ??????///
??
.memberCount will show total amount of members, including offline
.members.cache.size will show the cached members, which means online and active members only
guild user
Hmm
yah
That means i should use memberCount?
won't members.cache.size show an offline user until it is purged from the cache?
yes, its better if you want to include offlines
@crimson vapor only if a user becomes online then goes offline. if they never became online in the first place, they are never added to the cache
tim, i'll cache you
Okay so I replace the code with ```js
${client.guilds.cache.first().membersCount} Users, {type: 'WATCHING'
bruh
@crimson vapor btw for your problem, are you using intents?
Without an s in members
@trim saddle cache me bb
one sec let me check
that code will literally showing the member count for the first server in cache
i dunno how you mess up that much
just realized it won't work cuz there's an s in memberCount
wow constructive criticism 100
So i think shouldnt be a problem if its only 1
intents are in clientOptions right?
yes
yes, clientoptions#ws#intents
that code will literally showing the member count for the first server in cache
i dunno how you mess up that much
just realized it won't work cuz there's an
sinmemberCount
@earnest phoenix I told u i would remove s
in members
I'm drunk ig
Without an s in members
@narrow crescent
I don't think so
a kid shouldn't be drunk
v11
So it would work is i did that code?
Okay so I replace the code with ```js
${client.guilds.cache.first().memberCount} Users, {type: 'WATCHING'
@narrow crescent
had k eba b today and lot of popcron so my mind's dyin'
are you ok @earnest phoenix?
@crimson vapor it could be the garbage collector cleaning up memory from presenceUpdate events
nopr
Too bad repl doesn't detect infinite loop
ok that seems probable
try enabling intents and removing presence updates if you dont need them
client.once('ready', () => {
setInterval(() => {
client.user.setActivity(`${client.guilds.cache.first().memberCount} Users`, {type: 'WATCHING'})
}, 5000);
});
Tell me is this fine?
Too bad you can't handle your code to not make an infinite loop
yes
had 14 memory leaks today because SOMEONE 👏 WHO 👏 LITERALLY 👏 INVENTED 👏 JAVASCRIPT 👏 made a shitty browser named brave
I will fix the time
Tim what intents should I use? I have never used them
I don't exactly see how you'd get an infinite loop in any case
use https://ziad87.net/intents/, select events that you need
anything your bot really needs@crimson vapor
Lemme test it rn
you will need those which your bot relies on. check the intents list in the discord documentation
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
oh no
still waiting
oh wait
i was behind
@narrow crescent its alright but id suggest making it much slower than 5 seconds
Why in the name of all given fucks
@slender thistle fucks is an empty array
You're about to become an empty array
more like an empty list
You're about to become an empty array
@slender thistle are you talking to my wallet
but shiv what do you mean
because it's empty
Stop mocking my Python skills flaze, or I'll improperly indent you

Ok my brain is not functioning properly. I should go get some sleep
You boutta get 4 unnecessary spaces and break apart
Can't thank u guys enough
😤
Spunfid
i'm still waiting 😤 #development message
😤
<hr>
just one
<hr> <!-- line -->
hello
<hr> <!-- line -->
world```
but you might mean <br>, not <hr>
<hr> is a horizontal line
<br> just breaks the paragraph into a new line
could someone explain how to use intents with d.js
you specify the intents unser clientoptions.ws.intents
it can be a bitfield/number or Discord.Intents()
on the guide it also shows an array though
using #development message is easiest
bruh
play about with the intents until you find something good
I don't need the calc, im just confused on how they are placed, could I put js ws: { intents: 32257 }
and would that work
yes
ok
do you use any privileged intents?
nah
you're good then
new Client({ws: {intents: 4985938}})
new Client({ws: {intents: 42069}})
why no one uses byte moving and smh
w a i t
hot
<hr> <!-- line -->
hello
<hr> <!-- line -->
world```
@pale vessel Only like a normal line comes
I want a colored thick line
style it
hr {
color: x;
border: x;
}```
border?
or create a class for it
color in hex?
pseudocode
new Hamburger()
ty @quartz kindle and @pale vessel , no more spikes https://data.terano.dev/files/HoraSwyOhedPeps.png
lmao double ping for him
<hr>{
color: #777;
border: 8px solid #4BA1F1;
}<hr>
Me sad
@earnest phoenix can u help me out
I need help on two things. I have a json file with keys that are the id of users in a guild and the values as the number of points they have. When someone does ;leaderboard or ;lb, I want it to get the values and order them from greatest to least and stuff that into an embed, with many pages.
Also, since the keys are IDs of users, how would I do the conversion ID> Username?
python
Dont use json as db
I have no idea of discord for python but you probably need get the user object (using id) and read out its username property, hope that makes sense
ok thanks
Dont use json as db
@wary flame wdym by this
what else should we use
that orders it
an actual database like postgresql and mongodb
oh
the json file only needs to keep records of around a few hundred people
the bot i am making is for one server
its a private bot
Json is not a good option
yeet
@earnest phoenix JSON is only good for storing a little bit of data for transfering data between two different programming languages
If you use it as a database expect a corruption coming soon
ok thanks
it's not that json is bad, just almost every single language has bad file system
What is the ratelimit on editing channel topics?
None?
there is a rate limit on every single thing on the APO
A pplication
P rogramming
O il
oo
I feel like we've said many many times on this server not to use JSON to store data that changes constantly
At least 500 times it seems
You can't asynchronously write to a file or you'll get access violations.
Inevitably the JSON serialization/tokenization process will mess up because of that and poof, JSON db is gone.
I feel like we've said many many times on this server not to use JSON to store data that changes constantly
@faint prism I'm feeling bored of programming now because we have to literally shit on newbies to make them understand stuff
Feels like we should bean people for being dicks but also NOT bean people for being dicks
bored of programming now
Don't spend all your time helping beginners then. Start a new project to respark your interest
Feels like we should bean people for being dicks but also NOT bean people for being dicks
A rather contradicting statement.
If you don't want to help, don't.
Don't spend all your time helping beginners then. Start a new project to respark your interest
@faint prism welp i make shitty among us videos on YouTube now but i guess i can grind some time betterifying my rock paper scissors game
Dive into a new technology and learn all about it
Like CI/CD pipelines, Design Patterns, Unit Tests, or something
Pretty cool stuff
Design Patterns is literally how to structure code correctly or in a maintainable way.
oooooooooo
Everyone should start by learning the DRY design principle
https://en.wikipedia.org/wiki/Don't_repeat_yourself
DRY design principle is being kinda forced to use in C++
how do i install apache passenger in cpanel?
whats the rate limit for adding roles to members again? I dont rememebr it
@twin marsh
@restive furnace
pathc member
look up i sent ss
ok here it is again
and its that patch member
@tight plinth ^^
yeah
k, thanks ^^
@slender thistle how is it against the tos
not only does the support page for glitch support it
the main page for glitch supports it
j. Infrastructure Integrity
We reserve the right to delete, suspend, or terminate your access to, or ability to use, any and all Services that we determine to be placing undue strain on our infrastructure. These changes were made in response to ping services on Glitch and our efforts to make the site more stable. You can read more about those efforts here.
ping services
you shouldn't be adding roles in a matter of seconds
Back when Glitch didn't rely on hours and you had to ping the service every few minutes, Glitch essentially disallowed any pinging services and if you were spotted using one, your project would get terminated
still keeping it online
but youre saying bots entirely are against the tos
and acting as a ping service
@earnest phoenix they legit changed their terms to prevent discord bot hosting
^^
so it's similar to Heroku now?
heroku doesn't care in the slightest
like you have X hours per month and your bot may restart every 12/24 hours
also shiv whens that message about json databases being pinned
i only dont use heroku cuz almost nothing is compatible
whats going on with the vcs
what are they doing
i had to host 2 of my bots on heroku for while
Free hosting may be a good pin but JSON databases can be handled properly and we are not reliable for devs' fuckups
Free hosting may be a good pin but JSON databases can be handled properly and we are not reliable for devs' fuckups
@slender thistle ok fair nuff
might be my fault for adding too much shit
just get a vps
i dont have money
i dont have a job to get money
i cant get a job to get money
Can't?
can't?
how do i log into ssh?
all of this applies to free hosting: #development message
when i try, i cant type passowrd
@drifting wedge using a ssh client
JSON databases can be handled properly
If you implement a thread safe approach I guess
lol
@drifting wedge using a ssh client
@misty sigil im using cmd
ok so
well ima try
ssh <user>@<ip>
is a vps per month or per year
per month
oki
but like $3/month for cheapest ones
ah
thats from galaxy gate iirc
@earnest phoenix Or use an android phone or leave a PC running 24/7 for free
GalaxyGate Hosting
you could also do google cloud platform
it's free but it's complicated to setup for use outside the website
do i do ssh username@domain?
that's how you ssh into something yeah
Okay
Relevant https://linux.die.net/man/1/ssh
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, ...
Hi
it says password deneied every time
@drifting wedge then its wrong pswe
@drifting wedge then its wrong pswe
@restive furnace its not doe
it literally is
channel.send(msg, { disableMentions: 'everyone', 'here'});
^
SyntaxError: Unexpected token '}'
this happens when i start my host
it literally is
@restive furnace i copeied and pasted it tho
no
this thing is fucking wrong
channel.send(msg, { disableMentions: 'everyone', 'here'});
^SyntaxError: Unexpected token '}'
this happens when i start my host
@earnest phoenix
i put the exact same passowrd
@earnest phoenix did you read the error
mmh but it works on self host
you've got different code
hmm
I'm making an embed with a Author but i cant figure out how to do it? I shopld have the Guild name and icon
.setAuthor(`${message.guild.name}`, `${message.guild.icon_url}`)
its not working!!! how the do i connect to ssh?
the password isnt working
i have a subaccount and the user name is the subaccount name for copanel
wtf
do i put my pcs name?
or the account name to the place im connecringggg
@charred owl js .setAuthor(message.guild.name, message.guild.iconURL({ dynamic: true, size: 1024, format: 'png' }))
@drifting wedge write the password urself
copy pasting wont work
understand it
@drifting wedge write the password urself
@restive furnace I AM
IT FUCKING ISNT WORKINGNGNG
you just said u copypasted it
is the username my pc username
or the cpanel username
you just said u copypasted it
@restive furnace i tried both
linux?
and passwd
well, i don't think you're going to use windows server for hosting
so i assumed windows
yea...
and it doesn't depend which os ur on
and it doesn't depend which os ur on
do you even read what i send? 🤔
well ok.. do you even have a vps? or are you just trying to login into some random cpanel? or what??
then why can't you connect
well it says access denied
linux is the vps' kernel, and the distro is probably centos or ubuntu
well it says access denied
@drifting wedge why don't you ask new password from your friend then..?
@earnest phoenix ok
@earnest phoenix how can i so make a footer? with the author icon
.setFooter(<text>, <link>)```
@drifting wedge why don't you ask new password from your friend then..?
@restive furnace i can make new ssh passworrds incpanel
.setFooter('Request by', `${message.author.name}`);
Like this?
@drifting wedge ssh accounts are separate from cpanel accounts
you create both ssh username and ssh password in cpanel
@drifting wedge ssh accounts are separate from cpanel accounts
@quartz kindle ? theyres ssg passwords
like ssh access
unless the hosting company defines the ssh username as the same as the cpanel username
setFooter's first parameter is fotter text, second is avatar or image attachment @charred owl
unless the hosting company defines the ssh username as the same as the cpanel username
@quartz kindle so like i need my friend?
can i use
setInterval(() => {
fetch("app.herokuapp.com")
}
to keep heroku 24/7 ?
@quartz kindle ?
first parameter, what is that? Maybe i know what is it if you say it @earnest phoenix
i can make the ssh access?
@willow mirage no idea, i dont use heroku
:((
Functions and methods take parameters magnus
so what should i do?
cuz it will make my bot slow
@charred owl For example,
.setFooter(`Requested by ${message.author.tag}`, message.author.displayAvatarURL({
dynamic: true,
size: 1024,
format: 'png'
}))```
First parameter here is `Requested by ${message.author.tag}`
Second parameter here is `message.author.displayAvatarURL({
dynamic: true,
size: 1024,
format: 'png'
})`
(use jpg/webp instead if u have limited bandwith, and dynamic false)
@restive furnace me
that option doesnt affect your bot's bandwidth
what is bandwith
Depends,
dynamic: boolean converts the constructed url to gif if possible
size: number sets the size of the constructed url
format: string sets the extension of the url constructed
ohhh
It doesn't effect your bandwidth, but may on what you're doing (are you downloading the user's avatar, or having Discord render it for you)
bots never download images from discord, unless you explicitly fetch them using an http lib
yeah that's what I mean
im making a music bot i typed the code but it says this "Reference Error: Client is not defined" im new to coding and im writing in java script so yeah i need help
and it says that error after i try starting the bot
wait so for ssh, will the vps owner have to give me access or can i make my own acces? it lets me manage ssh
@polar girder client is not defined literally, theres nothing that I can do, just make sure it's defined.
anyone could help me how i can keep heroku alive
??? @restive furnace wut do you mean by defined?
im just following a YT tutorial and i know some coding but not that much and im very knew to JavaScript
like my first time using it
Tip 1: Don't ever follow some YT tutorials from stone age.
welp
Tip 2: Learn the programming language before hopping into the bot devel.
welpppp
Tip 3: https://anidiots.guide (it's written by idiots to beginners, not for idiots)
probably
but yeah follow my tip 1 always.
tip 2 is not required if you understand everything in the guide
ok
steal a yt bot and you'll go into technical debt
im going through git hub mainly
i went to yt to learn how to use it
i didnt just c and p the code
fair enough
someone pls help, for ssh connection
in cpanel it lets me make my own ssh key and passowrd
is that how i ssh into the server?
ping pls
What is wrong with this?
async run(message) {
const latency = msg.createdTimestamp - message.createdTimestamp;
const embed = new MessageEmbed()
.setColor("#f4f4f3")
.setDescription(`:ping_pong:\`${latency}ms\``)
.setTitle(`Ping`)
.setThumbnail(`https://i.pinimg.com/originals/53/1f/f3/531ff3381c36b88235ff246973c55a99.gif`)
.setFooter(`Requested by ${message.author.tag}`, message.author.displayAvatarURL({
dynamic: true,
size: 1024,
format: 'png'
}))
message.channel.send(embed);
}
You tell us. What went wrong? What was the error?
lol
It's your code. We don't know what the intentions are. What msg is supposed to help in that expression (latency -> how long something took) and where you're pulling it from is your responsibility.
Assuming it's a ping command, you'd typically send a message first, then subtract the time
So msg should represent the first message that was sent for testing.
does someone know how masked links in discordjs work?
are you referring to the exploit
doing that is against the TOS and will get your account terminated
Like some text you click which acts as the URL?
@sudden geyser yes
oh, hyperlinks
You use markdown to accomplish that: [text](url). For example, [See Google](https://google.com) would have the text "See Google" appear as a hyperlink.
They can only be used in embeds (webhooks are exempt from this). Typically you use them in the description or field values
cry is kinda sus
incorrect terminology throws you off when you know too much 
there's an exploit that's literally link masking
masking a link as another
like url redirection?
well, no
with a metric fuck ton of spoilers yes
Or are you masking the embed that Discord adds to msgs with links
Can I get 2 users again please? 👉👈
get alts
^ or make some command to simulate a user doing something
with a metric fuck ton of spoilers yes
this ^
you can display one link but have it function as another
You use markdown to accomplish that:
[text](url). For example,[See Google](https://google.com)would have the text "See Google" appear as a hyperlink.They can only be used in embeds (webhooks are exempt from this). Typically you use them in the description or field values
@sudden geyser Do i have to put the custom Text in ""?
uh
no
what
that entire thing has to be a string
what's inside is just markdown
this will also only work in embed field values and embed descriptions
Ohh, well im stupid
Can i do this?
async run(message) {
const msg = await message.channel.send('Pinging...');
const latency = msg.createdTimestamp - message.createdTimestamp;
const embed = new MessageEmbed()
.setColor("#f4f4f3")
.setDescription(`:ping_pong:\`${latency}ms\``)
.setTitle(`Ping`)
.setThumbnail(`https://i.pinimg.com/originals/53/1f/f3/531ff3381c36b88235ff246973c55a99.gif`)
.setFooter(`Requested by ${message.author.tag}`, message.author.displayAvatarURL({
dynamic: true,
size: 1024,
format: 'png'
}))
await msg.edit(embed);
}
maybe
If i run the command its send Pinging... but its do not edits the embed
set breakpoints
how and what is that
on the msg.edit probably
JIT
if you would've taken just 10 seconds out of your day to look at the docs (https://discord.js.org/#/docs/main/stable/class/Message?scrollTo=edit), you would've seen that the embed is the second argument
If it still isn't obvious:
and the domain is just like my domain?
yes
like where would i find the username
@drifting wedge
No, but depends on the SSHD config
Its a user on the system
Domain or ip work
i can out the domain?
just the domain?
like wut about the user?
its a cpanel
so idk how i would find the user?
ssh is a remote shell session
ssh is a remote shell session
@faint prism so i would need the vps user?
VPS is a virtual computer. Typically the only way to access them is via SSH
So, yes? Idk how to interpret your question is really
So, yes? Idk how to interpret your question is really
@faint prism how can i access the ssh basically
how do i find the credentials?
You need the machine's IP address (and port unless it's the default SSH of 22)
Idk how to use CPanel, that part is on you
You need the machine's IP address (and port unless it's the default SSH of 22)
@faint prism alr
Idk how to use CPanel, that parts on you
@faint prism 1 sec
so cpanel lets me make keys
oh even better
like ssh keys
using is key is a replacement for a password
there is an option in ssh to use a key during login
oh pog
there is an option in ssh to use a key during login
@faint prism should i be using cmd or a program
someone liked me something like putty
or something similarly named
puTTY is a tool that does SSH connections
Windows now has SSH as a command in CMD now though
Yeah, it's a file, and it's an extra argument where you specify the path to the key file
I think it's -i id_rsa if the key file name was id_rsa and in the current directory
check #development message
somedomain.com or ip addr
Is there any way to run python on a webserver?
Hi there <3, Is there a way to have a bot that can connect to two voice channels on the same server at the same time?
Is there any way to run python on a webserver?
@drifting wedge Flask, Sanic, aiohttp.web, Django
flask?!
owo
great
poggers
also @slender thistle can i dm?
i have a report
not using netcat for a webserver ||🤡||
Beginner devs using asp.net webapi be like: check out my weather forcast api 
Flask is a type of webserver tho
Flask is a type of webserver tho
@faint prism poggers then
alr
@faint prism how can i use the private key as the password?
ssh root@archbot.tech -i C:\Users\lets_not_doxx_me\Desktop\111\id_rsa
but it returned with an error
qui s'y connais en mongodb
but it returned with an error
@drifting wedge what error
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
copy and paste: not spamming
If you are getting this error then you probably reset the permissions on your hidden .ssh directory in your user folder, and your keys aren’t going to work anymore. It’s very important that these files not be writable by just anybody with a login to the box, so openssh will gi...
Always google an error msg
Hm, but you're on windows
Never had that issue. I guess rclick key file, permissions, security and make sure it doesn't say everyone or something
i dont have sudo
yourself
my user account?
If you're still getting issues
https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open
no its changed
Load key "C:\Users\owowowow\Desktop\111\id_rsa": Permission denied
It could be what makes it "Open"
so it may matter
okay, and that's for your account yeah?
yes
did you remove users?
i will rn
mk, then try again
weird
That's what my security for my private keys look like
you mentioned putty yeah?
yea
Have you given that a shot?
but using main cmd
ill try ig
wait
i made a new rsa file
lemme try that
well i dont think i have the password
thats the issue
thats why im trying to login with key
That's not abnormal for a VPS's SSH server to only be accessable via private key
It's considered to be much safer
That's not abnormal for a VPS's SSH server to only be accessable via private key
@faint prism its a webserver...
and webservers are services that are hosted on...? ||VPSes||
and webservers are services that are hosted on...?
@faint prism vps's?
Which is what you're SSHing into
lol
🔥 🔥 🔥 🔥 🔥 🔥 v
brb gonna threaten my brother to play among us with a nerf gun
cya in jail
*juvinile detention
yo guys, im in jail
alr @faint prism i was released
so how can i do it like so the permissions ant fucked up
Just google the error and throw everythin on stackoverflow at it
ok lol
anyone got any recommendations on where to host your bot? I currently have mine on heroku but im looking to move it somewhere that supports .json files
anyone know a bot that gives you topics ?
anyone got any recommendations on where to host your bot? I currently have mine on heroku but im looking to move it somewhere that supports .json files
@analog walrus any VPS supports json files
and dont tell me you're using a json db
Not this again
Although there is no error, the bot does not respond to commands who have information about the solution?
anyone got any recommendations on where to host your bot? I currently have mine on heroku but im looking to move it somewhere that supports .json files
@analog walrus you can find some decent VPS providers for cheap. I'd also recommend not going with a json db bc eventually you'll want to switch to an actual one. I had to do that around 1.5 months after first starting and it is just a mega waste of productivity having to switch from json to postgres bc it took time away from further developing my bot, so you might as well switch now and save yourself some time in the future.
dont use json at all
you might for like static shit like configs
but just dont use json
@analog walrus i use heroku but i use mongo
same concept
dpy has this whole thing about not using heroku for hosting, but if its your only option then ig its fine
would highly recommend a VPS
@jovial void what other dbs do you recommend?
im just looking to temporarily store strings at the moment
One message removed from a suspended account.
I am using postgres for my bot
One message removed from a suspended account.
One message removed from a suspended account.
play around and see which one you like the best
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.
well, temp storage can mean multiple things
if you want expiring data, all databases do that well too
How do i make a botinfo commabd
How do i un nuke my general chanel
@empty ruin delete it and make a new one
@inner crow what kind of info would you like on the botinfo command?
Like who made the bot and command list abd that the bot is for info
Sorry bad english
I want this to be in embed or a litel cooler and its norwegian so ye
What
Nvm
@inner crow bots are just users, so however you get user info you can use on the bot
You can't get the command list from anywhere though, so if you want to show commands for other bots you're going to have to find a way to store them
I want this to be in embed or a litel cooler and its norwegian so ye
@inner crow what library are you using and what programming language?
Someone who knows CSS dm me please
Hey guys,
I want to make a ping command for my bot that will check the author's internet ping (discord.js)
Any help will be great thx
you want to find the author's ping?
yeah ms and that stuff
That doesn't sound like something you can pull off. Typically you check your bot's ping.
you can't do that, you don't have access to any info about their connection
hey new, im woo

body {
background-image: url("https://thumbs.gfycat.com/BigFocusedCassowary-max-1mb.gif");
}
Why won’t this work
It’s supposed to be my bots background but isn’t working
is it in style tags?
okay, it needs to be in html style tags
Like wdym by that...
body { background: url('https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif') no-repeat center center fixed; background-size: cover; }``` this didnt work either
<head>
<style>
body {
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>
</head>
<body>
<h1>The background-image Property</h1>
<p>Hello World!</p>
</body>
</html>```
how about this
I just tried this on w#schools and it worked
W3schools
Wait what I just put worked!
@solemn latch I have a working code which is posted above but... it makes it hard to see my bots name how is that fixable
outline the text, or make the color far away from what the background is
light background = black text
dark background = white text
Hmm no clue where I would put that in code...
in the same box that you put your bots description in
light background = black text
dark background = white text
@solemn latch I’m talking about this...
<html>
<head>
<style>
body {
background-image: url("https://i.pinimg.com/originals/16/02/b2/1602b26c05ee78120695d592a68b8912.gif");
background-color: #cccccc;
}
</style>
</head>
<body>
<h1>Dicsord Bot</h1>
<p>Made By Liqxid</p>
</body>
</html>```
**Here is my code now but idk where to put what Woo said to make the colors of my bots name and description visible**
Make a box that goes under your text and change it's opacity. You can contrast the box and text color
googles your friend with css
please remove those html and head tags
Yea you can ask your best friend google
the Discord bot and made by liqxid? @solemn latch
remove everything except style, h1, and p
html, body and head is useless in a top.gg description
<style>{
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>
this?
remove html body and head
that?
you can add back what you had before, the h1 and the p
well my issue is I cant get the text to be a bright color so its readable...
and dont remove the body from inside the style, only the <body> parts
<style>
body {
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>
sigh...
im sorry i dont understand what you mean tbh
have you never done html before?
nah im just trying to learn this bit so i can be done with
i suggest you learn a bit about html, will save you a lot of time in the long run
the ones that say html, head, body you dont need.
this is called a "tag": <something>
<style>
body {
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>```
tags start like this <something> and end like this </something>
you can name them whatever you want, but there are several predefined tags with specific functions
for example <body> and <head> are built-in tags that serve special functions
<html> <body> and <head> should only exist once per page, but top.gg already has them
okay but I mainly came here because I have everything done just most the text isnt visible and i need that solved.
your description will be added inside the existing top.gg page
so top.gg already has its own html, body and head
so you dont add your own, you just add the other stuff, like <h1>, <p>, <style> etc...
Okay Thanks!
mmk
css targets tag inside a page, so for example, your css is targeting the <body> tag, and give it a custom background
this will be applied to top.gg's existing <body> tag
you should create a tag for your text, and give it a class
No clue how to do that tbh
for example, <h1> means a header, its used for big titles, <h2> is a smaller title, etc...
<p> is a paragraph
mmhm
so you can add something like ```html
<h1>my title here</h1>
<p>some description here</p>
now in order to target them correctly without screwing up the existing text in top.gg, you need to give them a class
for example, <h1> means a header, its used for big titles, <h2> is a smaller title, etc...
@quartz kindle i SO misread that
you can give them a class like this
Lmao
<p class="myclass">text here</p>
so now, inside your <style> tags, you can directly target this specific paragraph, by targeting its class name
like this
<h1>Dicsord Bot</h1>
<p>Made By Liqxid</p>
or this but p is paragraph
.myclass {
color:"red"
}
would that change all the text on the whole page?
Cause rn all see is this
.myclass will only target .myclass
So where would i put the <p> and how would i do it.
bc if this turns out to be simple hell ill learn a lot more then.
<p class="myclass">text here</p> this?
yes
so if I give the class a name could I just use top.gg?
and would I just add this onto the current code I have?
not sure if dots are supported, but you should give it a unique name that top.gg is not using anywhere else
sure
so where would I define the color in that?
<style/red>?
by using .techna
so im confused how would I target this?
the same way you have a style rule for body create a new rule for .techna
Hey Tim, think IDs might apply as well?
sure, you can also use IDs, but im going for classes because i dont think these paragraphs are gonna be unique
<style>
body.techna {
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>
like this?
Yeah fair
no, leave body like it was, make .techna a standalone
<style>
body {
.techna
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif");
background-color: #cccccc;
}
</style>
body {
...
}
.techna {
color:red
}
oops didnt mean to send
how about that ^
<style>
body {
background-image: url("https://i.pinimg.com/originals/00/2d/7e/002d7e638fb463fb7a266f5ffc7ac47d.gif%22");
background-color: #cccccc;
}
.techna {
color:red
}
</style>```
like that?
yes
like how I just edited it?
yup
Alright lemme go try it
now everywhere in your description, wherever you use class="techna", it will be red
you can use it both in a <p> or in a <h1> or in other stuff
Didn’t work...
<style>
body {
background-image: url("https://i.pinimg.com/originals/16/02/b2/1602b26c05ee78120695d592a68b8912.gif");
background-color: #cccccc;
}
.techna {
color:red
}
</style>
those are not in your description
im talking about your description
aka, what is gonna show up inside the white box
oh im trynna change the color of the important text but i get what you mean
like the bots name and stuff
if you want to change existing stuff that you didnt create, like top.gg's things, you need to find out what is their original class names and tag names
and target that
yikes.
for example, right click on the thing you want to change, and go to inspect element
yes
so you make a .bot-name and a .bot-description in your <style>
the same way you did .techna
how would I put both on the same line or can you not do that.
if you want to apply the same thing to multiple classes you can separate them by commas
.bot-name, .bot-description {}
okay
ohh thanks I have got it figured out from here I appreciate you very much! you have a nice day!
👍
Hello, so I have this command and wanted to list all the roles the user has. By default everybody has the @everyone role and it looks rather disturbing. Is there a way to ignore/exclude this role while executing the command?
(Looks like this then)
Didn’t work...
@earnest phoenix can you tell me what 00000011 equals as a decimal?
3 🤔
i have never encountered this before
@swift umbra It's a syntax error
Yeah it is
what about the 2's complement for 10001011?
ok
oh
ig it is
@faint prism the decimal is simple it’s 10184018294728.81839391948999
Also I solved the bot working issue
to convert to 2's complement you get the 1's complement first
10001011
01110100 <- 1's complement
@swift umbra that happens when you use an outdated version of node.js
discord.js requires node.js version 12 or bigger
Hello, so I have this command and wanted to list all the roles the user has. By default everybody has the
@everyonerole and it looks rather disturbing. Is there a way to ignore/exclude this role while executing the command?
@whole knot idk if anyone answered your question, but remove the role with the same id as the guild from the array or collection or whatever
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.
One message removed from a suspended account.
01110100
-
1
= 01110101 <- 2's complement
are you sure?
add console.log(process.version) to the beginning of your main file
before requiring discord.js
Ez
@earnest phoenix 117 actually lol
I was close
rip
if you're using something like pm2 and ran it before updating node, then the process will still be running with the old version
if(args.includes(`field1:`)) message.channel.send(`field 1 found`)
if(args.includes(`field2:`)) message.channel.send(`field 2 found`)
if(args.includes(`field3:`)) message.channel.send(`field 3 found`)
if(args.includes(`field4:`)) message.channel.send(`field 4 found`)
``` Just using this as a test right now, how do I check from this on what argument number it was?
can you clarify a bit? Like if they later on said field#: you'd be able to get the number?
I want to be able to find what arg it was said in
Say if it is -test I like field1: it will find field1 and get the arg number
So in this example it would be arg 2
oh well how are you passing arguments to your command? just like args[]?
let args = message.content.slice(prefix.length).trim().split(/ +/g);
Got to this point
Where I am getting the array of args
How would I get it to tell me what # field1: was found on
in the array
okay well you can do like ```js
array[].find(str => { return /(field)\d:/.test(str)})
something along those lines
/(field)\d:/ is just testing for field + digit + :
huh, just use array.indexOf('field1:')
Regex is appropriate since they want to match the number near the end as well
Ah
oh, will it change?
👍
guess you should program it according to context then
You could use [1-5] in regex
instead of \d
speedy hands
since you want the index, use .findIndex instead of .find
^ that too lol I was just doing it off the top of my head
something along the lines of what I wrote will work for the filter though
What’s the most reputable, no bullshit, no hidden fee, relativly cheap, vps? Don’t need too much memory, but need to be able to install shit, and about 2 gigs or ram
Out of stock
hey woo
Just a side question, do discord bots actually get donations?
Or is it like super rare, and only for huge bots?
super rare unless larger imo
not super rare all of the bot owners are filthy rich
heh
oh right, i understand the connection
Buy one.
all bot owners are filthy rich, here i am, a bot owner, eating ramen on a daily basis cuz its cheap 
all bot owners are filthy rich, here i am, a bot owner, eating ramen on a daily basis cuz its cheap
@opal plank not like 1000000000$ per Sec
@drifting wedge do you mind if i pm you?
5$ pm
If not lmk
for vps
how about $0 per month?
how about $0 per month?
@opal plank heroku.
Nice 👍
i'd rather self host than use heroku ngl
iirc they dont provide 30 day per month coverage
About 5$ per month?
so really bad choice of vps
Heroku is great, low ms. But I use vps.
89
whose?
Both of u
@earnest phoenix
Ah, dm if u wanna know
it is a very special ping bot that has a command with a 🏓 emoji
-ping
I'm alive!!!
you sure @pliant gorge ?
Lol
actually speaking of bad bots, lemme check the shards
do websites with bot stats run on the same server as the bot
or is data sent from the bot to the website
im tryna make a data page
not sure if i gotta send stuff from one server to another or not
R there restocks frequently for 1 gb standard vps?
if you're looking for servers I personally use AWS
i love them, always had good experiences with their team when i mess something up
and it's relatively cheap, some stuff is free for the first year
hi
if (C === "C"){
ctx.drawImage(factoryImg, 665, 400, 250, 250)
}
if (n === 1) {ctx.drawImage(mineImg, 700, 35, 200, 200)}
else if (s === 1) {ctx.drawImage(mineImg, 700, 959, 200, 200)}
else if (e === 1) {ctx.drawImage(mineImg, 140, 520, 200, 200)}
else if (w === 1) {ctx.drawImage(mineImg, 1280, 520, 200, 200)}
else if (na === 1) {ctx.drawImage(automineImg, 700, 35, 200, 200)}
else if (sa === 1) {ctx.drawImage(automineImg, 700, 959, 200, 200)}
else if (ea === 1) {ctx.drawImage(automineImg, 140, 520, 200, 200)}
else if (wa === 1) {ctx.drawImage(automineImg, 1280, 520, 200, 200)}
const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'welcome-image.png');
const embed = new Discord.MessageEmbed()
.setTitle("Here is your base!")
.setImage('attachment://welcome-image.png')
.setColor("GREEN")
message.channel.send({embed});
is there anything wrong here
cuz where i did message.channel.send(attachment)
it worked properly but .setImage(attachment or this
arent working
help plz

