#development
1 messages · Page 1122 of 1
wait
np
i wont open random files on discord
bruhhh
Spaces in directory names 🤮
you can embed trojans into txt files
dude
YOO bet I want a Trojan
then use hastebin like every other sane person
Error: Cannot find module '../User'
Require stack:
- J:\Hi Bot(js)\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js
- J:\Hi Bot(js)\node_modules\discord.js\src\structures\GuildMember.js
- J:\Hi Bot(js)\node_modules\discord.js\src\managers\GuildMemberManager.js
- J:\Hi Bot(js)\node_modules\discord.js\src\structures\Guild.js
- J:\Hi Bot(js)\node_modules\discord.js\src\managers\GuildManager.js
- J:\Hi Bot(js)\node_modules\discord.js\src\client\Client.js
- J:\Hi Bot(js)\node_modules\discord.js\src\index.js
- J:\Hi Bot(js)\index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at TextChannel.send (J:\Hi Bot(js)\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:154:18)
at Client.<anonymous> (J:\Hi Bot(js)\index.js:79:17)
at Client.emit (events.js:327:22)
at MessageCreateAction.handle (J:\Hi Bot(js)\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (J:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (J:\Hi Bot(js)\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
(node:8720) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
duh
you request somewhere /user but its not defined
show us your index.js
when will v11 discontinue?
Holy fuck
cannot find user
October
USE A HASTE PLEASE
when will v11 discontinue?
@surreal notch October
ok
I found this cool project the other day on github
Error: Cannot find module '../User Check your filenames and directory traversals
i bet it's gonna be too long
use a bin then ffs
and can someone tell me how to update serveer count in top.gg i cant understand docs
they provide examples
where
i only copied and pasted that
const Discord = require('discord.js');
const { prefix, token } = require('./config.json');
const client = new Discord.Client();
client.once('ready', () => {
console.log('Ready!');
});
client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).trim().split(/ +/);
const command = args.shift().toLowerCase();
if (command === 'ping') {
message.channel.send('Pong.');
} else if (command === 'beep') {
message.channel.send('Boop.');
}
// other commands...
});
client.login(token)
bruhhh
In the docs
that was in the guide ;-;
imma have a heart attack reading these non-codeblock, non-hastebin snippets
USE ```
imma have a heart attack reading these non-codeblock, non-hastebin snippets
@opaque eagle same
e
Follow the guide in order
you can embed trojans into txt files
@lusty quest
No. A text file isn't embeddable. It's simply a file full of characters, and unless you attempt to run it as an executable you're fine.
Also:
A genuine txt-file can contain virus code but it cannot be executed, so it's totally safe. However, a file can use double file extension like this, so watch out:
a-virus-file.txt.exe
Windows hides by default .exe because it's a known file type.
real programmers test in prod
@quartz kindle welp I must be the realest programmer ever
Is that the actual contents of the index.js file when you ran it? @jolly wave
oooooof wait
me comfy af with github actions
Don't forget to use ```
^
e
```js
CODE
```
me comfy af with github actions
@opaque eagle Get dat pipeline boi
or use a hastebin if it’s too long
^
please don’t just
Djhsjhjs
paste in https://hasteb.in
literally that
@earnest phoenix are you new to javascript?
Don't just jump to discord.js without learning the basic stuff of the language itself
yea ^
thats why discord.js is so great
you should learn base js first.
man i dropped the ball just now, accidently set my prod prefix to: debug+ instead of +
oof
derp
nice 1
May I tell you to fuck off, autocorrect
^ i swear sometimes
the autocorrect devs need help from us
When I was trying to type the variable name, it took like 3 attempts because auto correct
Question: Is it adverting if I ever post my bot's source repo?
no
I don’t think so

You made code that deleted a file?
okay
idk
Well, I want to know if any Discord.NET devs want to view my source. I follow S.O.L.I.D. design principles, so I figure it'd be refreshing to see good coding lol
ok
Probably should start using git
reformat
why am i getting this error when my procfile is exactly named: Procfile
that isn’t an error by the looks of it
git init; git add .; git commit -m "First commit! :)"
Forgot the "
why am i getting this error when my procfile is exactly named: Procfile
@dense heron it’s procfile
not Procfile
ty
Doesn’t matter
wait it doesn’t?
it's actually Procfile and it mattered for me
Both should work
at least for me...
it looks like thi
Not case sensitive?
it was for me
Now worker should be lowercase
worker not Worker
and the file is still here
You don't need to censor swearing
Probably should still start using git
e
nope still wont work
Swearing isnt against the rules
had a heart attack when i saw nothing was on my usb key
xd
i was about to create a new bot
why is it not working???????
code harder
why is it not working???????
@dense heron Worker: needs to be lowercase
that didnt work either
Is the logs the same?
Is the logs the same?
@radiant kraken yes
Its litterally
variablename = whateveryousetvariableto
I cannot be more clear than that
Yeah
I've linked you to things that explain variables
Yes it's fucking simple
@earnest phoenix have you finished learning JavaScript so quickly?
You people need to chill
I'm being nice tho 
If you don't even know what a variable is, I suggest you stop what you are doing, & go read a book about the programming language you are attempting to use
Also yes, what Avacado is saying
nice server
so why is it not working its so fucking annoying
"Avacado"
Check mod logs to see if it’s kicked
wait patiently
he should have the developer role
It does say approved
@radiant kraken any clues?
Idk sorry, it's long since the last time i used Heroku
ok
he should have the developer role
@pale vessel don't rely on the role anymore, Luca keeps erroring out on assigning the role because Discord™️
I am doing a command, with wich u can create a temporary voice channel, that gets deleted, when nobody is in it, but for now it gets deleted, because when I type the command, there is nobody in the room and it gets deleted. The things is, when I use setTime, it also gets deleted.
Who made Luca?
.then(cha =>
(message.member.voice.connection)?console.log(connected):cha.delete({ timeout: 10000, reason: 'It had to be done.' }))
You mean when the timer ends it still deletes it @midnight blaze ?
Or the bot is still instantly deleting the room
the bot deletes the room
even when I am connected
but It should not delete it when I am in the room
Your timer needs to check if someone is in the room before deleting, aswell as any room deletions need to check before deleting
well that is what I am doing, or at least what i tried to do
(message.member.voice.connection)?
if this is true : console.log(something)
else delete
That would check if a specific member is in a voice channel right?
Not if anyone's in the voice channel
well, that was my idea
the person who is making the channel
if he leaves, then it gets deleted
no matter if someone is still there
Then you'd probably want to store members and their respective channels in a variable
this is a command for my language learning server. A command for teachers, they open a voice room. If they leave, the channel should be deleted.
hmm
ok 🤔
but why should I?
they make a command and I use the message event, so I get the information that I need
channel and msg id
Help me gays
ok
Avocado
Ok, so anyone an idea how to make such a command?
I kinda had it for a while, but then I messed it up and I can not figure it out how I manage it to make it work
db
why db? 🤔 I dont need to store data
Oh yeah?
I use this for notification when someone adds the bot but how to get notification when someone removes bot frm servr
u get author id and channel id by the message event listener
guildDelete lol
@restive pebble
I don't store guild or channel info
Ok
Get me projekt bot security
like a person made a channel
with a command, yep
?createchannel
If i want to reference it, I just get the values from the client session. I don't need to store it though
if author id is connected to channel = channel wont get deleted
why do I need db for that
voice or text channel?
the db would be in cases your bot restarts
voice
when starting up, the bot will have no clue whos the owner of what channel
that's all in memory though 👁️ 👄 👁️
aha, but woo, it is only for my own server :p
yeah what woo said
not for many servers you know
just a little command, not a big deal if it gets offline
youll have to manually clean up rooms then from time to time
@earnest phoenix, what lib do your bot's use
@faint prism newer bots use disqord or dsp, older ones use discord.net
voiceStateUpdate
then match that user id
.net 
.net :GWjianWut:
@restive pebble I use .NET
I am sure with some promises you would be able to do it xd
ok cool
You aren't dissing .net are you?
we need .kek url
.succ
jeremy.clarkson
That'd almost seem like a local domain
I have .dev url tho 👀 namecheap is nice
like rasperypi.localhost
you get .dev for free on some provider with github edu pack
what fr
yeah
Guess I better go claim it
Ok I wanted that if someone uses my cmd it should show me in my official server
mhmm
bot.guilds.cache.get("ur server id").channels.cache.find(c => c.name === "channel name").send(cmd)
@surreal notch ^^^
happy bd @earnest phoenix
happy bd
happy birthday
Does anyone have a CI/CD pipeline setup?
@earnest phoenix I don't want only for my server but for every server my bot is
That's a pipeline @earnest phoenix
Do you use it for deployment to prod?
U wanted to send cmd that ur typed to ur channel in ur server
@earnest phoenix I want that if my bot is in ur server and u uses the cmd that should reflect in my server that this user have used this cmd in this guild
Why I have to give server id
It's the incoming message's guild
That's a pipeline @earnest phoenix
Do you use it for deployment to prod?
@faint prism nah since i don't have any applications that need deployment however it can be used for deployment
So uh, im having some pain figuring out how to make a trigger for commands in discord.js
Does anyone know how?
i release builds of an application with it though
just prefix my commit message with [rel]
can u add my bot pls
pay me
#support @calm junco, also #502193464054644737
pwease
advert
no ads.
sorry
-faq 1
Don't just go asking people to invite your bot
but if you give me money i wont mind it
this doesnt work
.then(cha => message.member.voice.cha.join())
if my member would join
how do u login to ur bot
?
What do you mean, cloudiix?
UnhandledPromiseRejectionWarning: TypeError: Cannot read p
roperty 'join' of undefined
where is TIM he would know how
What do you expect message.member.voice.cha to be
cha => the created voice channel
you make a selfbot with a fake discord link to force your selfbot to join a server
that’s how
how do u login to ur bot, it says this
Selfbots are against TOS
ohh
i KNOW
oof
:(
im dumb lol
you did not have to tell us that
cha => the created voice channel
usechathen
I'm using Azure DevOps pipeline. I'd like to (on build & unit test pass) checkin the commit to gated main branch.
On the main branch I'd need a CD pipeline that on new commit, builds and publish the build artifacts via SSH to my bot server.
Does that sound like how I should go about that?
@earnest phoenix
client.on("message", async message => {
client.channels.cache.get("727217470431035492").send(`${message.content.split(' ')[0]} command was ran at ${message.guild.name} by ${message.author.username}`);
})```
Ur code didnt worked
But maybe this work
ok
Btw don't make selfbots
I hope somone is here
.then(cha => (message.member.voice.cha)? message.member.voice.cha.join():console.log("test"))
xD
Lmfao
i did explain you to use cha
cha is not a property
not messagemembervoicechannel
u mean
cha is not a property
^ of messagemembervoicechannel
let x = 5
// error because `a` doesn't have an `x` property
console.log(a.x)
// no error, will output 5
console.log(x)```
A property is attached to an object/class, a variable is in separate scope
free, I know what u mean, but my bot joins then^^ that is why I am using message.member
.then(cha => cha.join())
I want that my member joins and not my bot
what you want then?
what
its not possible k
you can't force other people into a voice channel
you cant make a member join a channel
are you on crack
if your bot has permission, it can move a member
but the user needs to be in a channel already
that, I can do. Lol
no, you cannot
moving a member from a channel into another channel is NOT the equivalent of forcing them to join one
the goal is just that the creator of the channel should be able to join the channel and when the creator leaves the channel: the channel gets deleted
then listen for the event and wait for them to join a channel
you can't force the user to do anything
a lot of bots have a channel that users can join to create a channel
set a timeout for how long the bot should be listening for before it just deletes the channel because the user didn't join
that is what I did at the start, but it deleted the channel anyways
because you didn't cancel the timeout when the user joined
for example
user joins a channel called "create a channel"
the bot creates a channel called "users channel"
bot moves user to "users channel"
bot starts watching for user to leave channel.
TypeError: Cannot read property 'channels' of undefined```
something before “channels” is undefined
what lib
classes
i need help
classes lib?
can't
but he's still running
u can't restart right
idk why
@earnest phoenix createGuilds is an event
inb4 the restart command is just logging out and logging back in
Im kinda nwe
im here
idk how but i think another version is running
these are the docs?
yes
gets emitted when the bot joins a new channel
restart doesnt stop the bot
it stops and starts the bot
No
bots have a gender now? wild
did you make a command to restart
pm2 autorestart the app
also you should probably update from windows caveman edition, microsoft officially dropped support for it and many other services are also going to stop supporting it
ye exit
try Destroy()
Mkay.
And use Firefox
Why
...
i cant even tell whats going on in this picture
god that server list gives me anxiety
most of its not readable
https://prnt.sc/
@jolly wave
Windows+Shift+S
?
Extremely light weight screenshot tool, even my old laptop from 2003 can run it
use sharex
¯_(ツ)_/¯
lightshot is yuck
use sharex
oh nvm he uses Windows7
Screw ShareX, Lightshot works fine if you don't need a million different options
Bruuhhh
but color is alitte bit trash
went from code to roasting him for his system
I killed hhe terminal and he's still running
@jolly wave discord shows it’s running for a few minutes or so before turning off
JUST HELP HIM
why don't you help him
xD
@earnest phoenix you'd be surprised from how many people are leaking vital information daily with lightshot just because they don't realise lightshot is a public uploader
cuz idk what is the problem
That's been 10 mins
i only use lightshot for my clipboard, never used the upload feature because lightshot site looks ass
I don't upload with Lightshot, I copy the image to clipboard 
restart your machine if you're clueless and don't know how to use task manager
@earnest phoenix
some 2008 looking site
...
exactly lol vertigo
i think we need more info
Nope
Kay
shows an xbox
oh
Wait
then idk
ctrl + c?
no he want to turn off with Js
not manully
oh
whats your code
I use Flameshot on Linux cuz i have no money to buy Windows 10
stay on linux ok
K
client.on('message', msg => { if (msg.author.id === '702457675887280198') { if (msg.content === '?restart') msg.channel.send("Are you sure you wanna restart the bot?It will apply to all servers!") if (msg.content === 'Yes') process.exit() if (msg.content === 'No') msg.channel.send(Cancelling...
cancelled!) } })
oof
what
but maybe it dont help
require MessageEmbed
@earnest phoenix what's the full stacktrace
const {MessageEmbed} = require("discord.js")
@earnest phoenix
LoL me 2 sometime
@earnest phoenix You can get a Windows 10 key for like $6 on a 3rd party site
command : if (command === 'hi') { message.channel.send('Hi!');
but i dont want to spend money for OS
e
paid $5 for windows 10 pro
is this a channel bout computer or FREAKING CODE
Im still trying with GuildCreate but its not really working, someone can send me a link to the good doc 😓
yes ik
you don't have to even spend money on win10
we asked for restart code
get a preactivated build or edit the key servers
ye
you should update to windows 10 regardless mainly because of security patches
Im still trying with GuildCreate but its not really working, someone can send me a link to the good doc 😓
(Don't hate on me, I'm a beginner)
the docs are perfectly fine
I can't find the good one
I know
what have you tried
Like dumb shit
and what isn't working
lemme sent it
so the other running instance will be stopped since the token is not good rn
client.on('guildCreate'){
message.channel.send("Hello! My prefix is "-", use "-help" for all my commands!")
}
message.channel.send("Hello! My prefix is \"-\", use \"-help\" for all my commands!")
}```
or this
it sucks
I know
that's not how events work
This channel is about everything about Development so repair PC ? maybe No
Oh
look at your message event for an example
lambdas ftw
what the fuck is that code
Wdym Woo?
I dont understand 2
I know it sucks
Guild create then message.chennl ??
on (string) send(string)
ofc i
know
u had 2 terminals
basic mistake
There is a message on GuildCreate Event ???
hmmm
what
i fked it up
i know
i mean look at the message event
lmao
Nutella
to look at the structure
First only a terminal was running
Why would I keep two instance of my bot open
It's stupid
Idk
K want more screen
everyone does
I just make it like really bad
or
client.on("GuildCreate", guild => {
console.log(guild.name)
})
uhh
spoon feeding op
Btw flazepe
lowercase G
Anyone have an idea as to why my bot's cpu usage has dropped 15% and the latency is sitting at 900ms? I haven't made any code changes that would cause this...
Thx for correcting ur message
ye
prolly
@faint prism Maybe wrong place of ur server
could just be discord's side, cpu usage probably dropped because a smaller influx @faint prism
Also dumbass, I'm learning js
Well I assume it's Discords-side issue
Also dumbass, I'm learning js
@jolly wave
you became the very thing you swore to destroy
Does that sound like a rate-limit thing?
copy paste code
they would just affect response time on the given action you're ratelimited on
i dont copy paste
Hm
check out the latency on their api status page
@earnest phoenix I added ur code, but it doesn't show on console log the guild name
copy paste-able code
for some reason
Btw cry
it will only log when you join a guild
You know why my blocked user keep growing?
@earnest phoenix Well cuz the event didnt happend
Cause of people like you
I added it to a test server
u need to kick ur bot then add it again
lol
good job, i didn't ask nor do i care
i did
Btw I blocked you
are we back to square one
i didnt ask
for some reason i fked it up again
@earnest phoenix errorr ??
Nope
0 errors
@jolly wave bruh
hmmmm

like i added it but there happend like nothing
they're underage
don't argue here
surely behaving like so
show code
Shivaco mute me if you want Im tired of this channel anyways
console.log(guild.name)
})
```
Keep this channel on topic.
this
Let's go back to coding for me
ok
nice
Hm
Imma show u a example but only for this time
Why it doesn't work, I re-added it
k
wait ur coding on phone?
nope
just for now i am on phone
oh
no it's github
yes
i add everything on github
Actually coding on phone exist but when I tried a failed lol
coding on phone is painful
Yup
@sudden geyser LoL
it's like cleaning plates with paper
Oof
Same tbh
Yes
@solemn latch wtf then where on Nokia ?
^ programming on calculator, best way to program
LoL
lol
@earnest phoenix so what happend
punch cards?
wut
making a comeback
punch card programming
@solemn latch aka COBOL and maybe FORTRAN
tfw you fly to the moon with 32kb of ram but you run an electron app on 2 gigs of ram and windows BSODs
^
People get lazy with these "comfy" high-level languages
Relevant #development meme
It's all about the right tool
for the job 🍎
assembly* ftfy
Hello is someone's bot here got hacked cause I got dm from it
LMAO
@viral iris [Click Here](Link Here)
@trim saddle fixed but thx
dont
what are you trying to do with their api?
Get a muaic desc
just scrape it
Hi, how can i check if mentioned user has a permission in discord.js. I tried but it's not working:js const user = message.mentions.users.first(); if (user.hasPermission(["BAN_MEMBERS"])) return message.channel.send("❌ You can't ban a staff member")
users dont have permissions
members do
https://discord.js.org/#/docs/main/stable/class/User
^ user class
https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=hasPermission
^ hasPermission for member class.
https://discord.js.org/#/docs/main/stable/class/MessageMentions?scrollTo=members
message.mentions.members rather than users
@solemn latch how i can get the track id
@solemn latch thank you very much
or some
hmm
:0 it works
not string.includes
so, how can i download track from Spotify for stream it by Discord Bod?
Lo4, that's not how the OR operator works. You need to do it like this:
message.content === "Something" || message.content === "somethingElse" || message.content === "..." || ... and so on
Hey Guys, Discord has disabled my bot and asked me to contact them for more information. I have but obviously they'll take a while to respond. I was wondering if anyone has had a similar experience and could shed some light on the issue?
@frank wyvern mine got disabled too - what does your bot do?
yo, I was able to do it and yo guys talking about db
db was just incase of bot restarts
storing everything in a collection or map was just because it is generally cleaner
.then(cha => {
setTimeout(() =>
(message.member.voice.channelID==cha.id)?message.channel.send("connected"):setTimeout(() => cha.delete({ timeout: 10000, reason: 'It had to be done.' }), 10000)
, 10000)
}).then
Just in case someone wonders
how to it
lol
sry, I am tired
When you cum
Oops wrong channel
lol
netflix.download()
How i can downloads films on Netflix web (HTML5)
H a c c
obvs
When you cum
@pure lion wtf
I have never thought I would have to use settimeout inside a settimeout
generally, bots responding to bots is api abuse
which, a few people have been reporting their bots got completely banned from discord
so id avoid api abuse
i mean im tired of make a command handler, so anyknow hot to disable the help command on discord.js-commando?
i mean im tired of make a command handler, so anyknow hot to disable the help command on discord.js-commando?
@dire obsidian there is an option
help: false, rigth?
idk
What is djs-commando
discord.js but with command handler integrated
discord js command client
Oh
Imagine not writing your own
~~Eris's version is much better ~~
no
@misty sigil f o u r l i n e s
Hm, I am gonna ask it again.
How can i download Tracks from Spotify and stream it by Bot?
I need no sleep. I need answers
if your looking for aliases(i think thats what your describing), youd probably want a full command handler
I use a custom version of discord-akairo
so maybe .-. maybe i need a command handler code, sorry boys
Works great
bot.registry.registerDefaultCommands({
help: false,
prefix: false,
ping: false,
_eval: false,
unknownCommand: true,
commandState: true
})```I found this on stack
https://stackoverflow.com/questions/54430142/how-to-disable-defaults-commands-on-discord-js-commando
...
https://stackoverflow.com/questions/54430142/how-to-disable-defaults-commands-on-discord-js-commando
@golden condor @dire obsidian
The access is permanently forbidden and tied to the application logic, such as insufficient rights to a resource.
If i say :
c!apple
Bot say:Apple
If i say:c!banana
Bot say:AppleHow to do that
@earnest phoenix ```JS
ok
the server is forbidding your requests, ie you dont have access to it
@earnest phoenix do you use sitch or what?
if its your server, you should know how to properly authenticate to it
yes javascript
@earnest phoenix I 4got pressshiftand message Sended...
if (msg === !banana) {
msg.channel.send('banana');
}
yep
i gave you resources on how to do it
one moment..
pretty much copy paste code on the guide
Didn't Woo already help you Lor4nd
the kind i like
Mood
.on('message', (message)=>{
if(message.content == "c!apple" || message.content == "c!banana")
{
message.reply(apple);
}
}
It is the simplest solution. Are you need for more some features in it?
@earnest phoenix
^^^^
By the way. I still need help with downloading track from Spotify
spotify api doesnt provide music
just data for stuff
searching tracks, albums etc
getting release dates
I know, but I saw so mush bots, that can it
Lost: quick question
Also lost: officiallylost is typing
i'm trying to make the background colour of the option to be the role colour, so.. i've got the role colour but it gives it in the base 16 thingy believe, how can i convert the number to a hex/rgb/ anything which will change the colour in css
Doubt
those bots typically search spotify for a song title, and then search the song on another platform
Oh
Like pootube
so.. any ideas how i can change the colour of the backgeound to be the role colour?
Define base 16 thingy
like, this
Why not use hex
yeah im stupid
:l
I thought, if I can't download full audio from YouTube...
discord sends u the number thing
You ca-
not hex
so im tryna convert that to hex, if that makes sense?
Yeah
trying to convert base 16 to hex?
In mathematics and computing, hexadecimal (also base 16, or hex) is a positional system that represents numbers using a base of 16.
What Libraries (unless YTDL) can help me with downloading audio?
lavalink is something bots frequently use
and i need to convert the number thingy to hex/rgb
discord sends color data in hex does it not?
O h
Are you sending the color from backend?
im sending an array of roles from the backend so i can create the select thing in the frontend
so, i can access the role colour
There's probably a package somewhere
huh
Just map and convert to hex
Probably
how would i do that with html then?
send the stuff in the script tag to html? w/o framework
https://stackoverflow.com/questions/63290310/peerjs-im-trying-to-get-my-peerjs-server-work-through-nginx-ssl-but-its-just
yoOOOooooOOoOooOOoOOOOoOOooooooooOOoOOo
Well you're using a template engine of sorts right?
just ejs
Eggspress
color.toString(16);
What does the number in toString mean
????
base 16
Okay then what you can do is give the element a style attribute and set it to the color
ie hex
yes..
what was the command to enable eslint?
i've got that bit done, lemme show u what i got rn
npx eslint?
Alright
don't forget to add .padStart(6, "0");
I shared a screenshot of how to convert a while ago lol
<select class="select-role" name="role">
<% roles.forEach((role) => { %>
<option style="background-color: <%- role.color %>" value="<%- role.id %>"><%- role.name %></option>
<% }) %>
</select>``` `role.color` is the number thing
number.toString(16).padStart(6, "0")


