#development

1 messages · Page 1349 of 1

wicked pivot
#
const {readdirSync} = require('fs')
const categoryList = readdirSync('./assets/commands')

let embed = new MessageEmbed()
    .setTitle('Help')

    for(const category of categoryList){
        embed.addField(
            `${category}`,
            `${bot.commands.filter(cat => cat.help.category === category.toLowerCase()).map(cmd => prefix + cmd.help.name).join(', ')}`
        )
    }```
hollow sedge
#
  1. use semicolons
  2. dont use interpolation like that
earnest phoenix
#

Define it

solemn latch
#

underlines are fun

earnest phoenix
#

Syntax errors be like

#

You might want to brush up your js knowledge before making a bot

jade stirrup
hollow sedge
#

capitalize color (Color)

#

also

#

put them on the same line

#

python doesnt like when you dont

sudden geyser
hollow sedge
#

if you really want them to be on different lines put a \ after the line above

sudden geyser
#

That extra space before embed shouldn't be there.

hollow sedge
#

^ theres a ton of problems there

tight sluice
#

A lot of unexpected indents in that code.

sudden geyser
#

also you're using legacy code that isn't included in the library anymore.

#

Why are there quotes around Client?

#

That probably won't fix your problem.

hollow sedge
#
  1. importing keep_alive wrong
  2. no need to use pass_context = True, context is always passed now
  3. put the arguments on the same line as the discord.Embed
  4. discord.Color not discord.color
  5. no () at the end of discord.Color.orange
  6. change incline to inline
  7. fix unexpected spacing
#

@jade stirrup

jade stirrup
#

it says project says uses requirement.txt

earnest phoenix
#

Client is a class of discord.js @earnest phoenix

#
const client = new Discord.Client();```
hollow sedge
#

@earnest phoenix so many people have told you, please truly learn how js works

sudden geyser
#

neglected we can't help you if you don't help yourself

solemn latch
#

capitalization matters in variables

#

Client and client are different variables.

#

your assigning to client but using Client

jade stirrup
#

now completly different question does anyone here know hiow to make an app

sudden geyser
#

nah it's just throwing a fit

jade stirrup
#

bruh my thyings still not running

hollow sedge
#

bruh my thyings still not running
@jade stirrup bruh did you do all the things i told you to?

jade stirrup
hollow sedge
#

dude

jade stirrup
#

yes

hollow sedge
#

i wrote you a whole list

jade stirrup
#

i did those things

sudden geyser
#

it doesn't look like you fixed any of the issues we pointed out

hollow sedge
#
  1. importing keep_alive wrong
  2. no need to use pass_context = True, context is always passed now
  3. put the arguments on the same line as the discord.Embed
  4. discord.Color not discord.color
  5. no () at the end of discord.Color.orange
  6. change incline to inline
  7. fix unexpected spacing
    @jade stirrup
jade stirrup
#

thats a old screenie

sudden geyser
#

then you should give us the up-to-date one. Why isn't it working? We can't help you if we don't have enough info

jade stirrup
#

hold on fixing some more stuff

#

what argument

#

goes on the ame line

hollow sedge
#
  1. change client to bot (@client.command -->> @bot.command, client = commands.bot -- > bot = commands.bot)
  2. instead of client.send_message use ctx.send(embed=embed), you dont need author
  3. instead of client.say use ctx.send("text")
zenith knoll
#

client.guilds.cache.reduce((a, g) => a + g.memberCount, 0) returns NaN

#

it worked up until an hour ago

hollow sedge
#

goes on the ame line
@jade stirrup discord.Embed(color=)

jade stirrup
#

i should change all the client to ctx or just that one

hollow sedge
#

"ctx" means context so when you say ctx.send, it sends a message to the channel that called the bot

#

so change the two sending lines to ctx

jade stirrup
#

how do you guys know this so well

hollow sedge
#

🤷 we've just used it for a good amount of time

jade stirrup
#

oh

#

wow

#

better

#

?

#

hello

hollow sedge
#

yes

#

but move the parentheses up

#

to the same line

#

you also should actually learn python before creating a bot..

jade stirrup
#

Looks like this project uses requirements.txt. To install dependencies on Repl.it please use pyproject.toml or the built in packager.

hollow sedge
#

well do you have a requirements.txt in your files?

jade stirrup
#

i dont know

hollow sedge
#

also you actually do need the parentheses to call the function: discord.Color.orange()

#

i was wrong about that

#

i dont know
@jade stirrup well look through your files and check then

drifting wedge
#

@jade stirrup do you know python?

jade stirrup
#

@drifting wedge

drifting wedge
#

?

jade stirrup
#

@hollow sedge i dont think i have it how do i get it

hollow sedge
#

thats not whats its saying

jade stirrup
#

@drifting wedge no

drifting wedge
#

Well learn some

hollow sedge
#

the point is that you shouldnt have it @jade stirrup

drifting wedge
#

Then come back

jade stirrup
#

how do i get it

hollow sedge
#

i agree with 0Exe

drifting wedge
#

Literally Search up, learn python YouTube

jade stirrup
#

hmm a lright

drifting wedge
#

Or maybe even watch a dpy tutorial

#

Even if u don’t wanna learn python

#

Learn dog

opaque seal
#

I'm not understanding if my code is working properly or no:
I require a file called cache.js in index.js, then I require that file again in bot.js.
I have a console.log() inside cache.js and it runs twice, shouldn't it only run once?

drifting wedge
#

Dpy

#

Idk man, don’t do js, mb

#

I don’t

jade stirrup
#

i dont mind learning im just afraid ill forget it

drifting wedge
#

Ok lemme spoon feed ya, wut u need help with?

#

🥄 + oliythink = spoonfeed there, your coding problems fixed

zenith knoll
#

client.guilds.cache.reduce((a, g) => a + g.memberCount, 0) returns NaN
it worked up until an hour ago

earnest phoenix
#

The reason behind this is that, one of the guilds are unavailable

zenith knoll
#

wdym

#

@earnest phoenix

#

and whats the/a fix?

honest perch
#

time to go to my friend who helps and teaches and doesn't criticize like do you know a 13yr who just KNOWS java script?
@earnest phoenix yeah me

earnest phoenix
#
client.guilds.cache.filter(g => g.available).reduce((a, g) => a + g.memberCount, 0)```
jade stirrup
#

agggh i dont have the brain compacity for this

earnest phoenix
#

Am I able to host a SQL database online instead of my own VPS? If so, how can I import it? Normally I import by using sql.open(./database.sqlite).

honest perch
#

An sql database is always online

#

Except from sqlite ofc

#

Also it would be done through some connection string, read the docs of the db software you're using

earnest phoenix
#

Like right now, the database is hosted on the VPS the bot is on. Can I host the SQL database on an SQL server/host somewhere is and then import it instead of importing via file path.

honest perch
#

There is no such thing as an sql server

earnest phoenix
#

Host it on my website then

honest perch
#

It has to be on a normal server

#

And what sql database are you using

earnest phoenix
#

Like via URL import instead of a path file import

#

sqlite

honest perch
#

Sqlite? No

earnest phoenix
#

Ah ok

honest perch
#

Sqlite it local

earnest phoenix
#

You pass in a constructor if something is not a constructor OMEGALUL

#

Sqlite it local
@honest perch Alright, thank you.

#

Or show code of where you have this constructor problem

honest perch
#

Its hard not to criticize someone's who is refusing to learn javascript and who is trying to make a discord bot which you should have the understanding of javascript and how nodejs works. You should start with simpler projects if you are not knowledgeable in js. By starting with a discord bot you will just get stuck, spoon-fed and you will learn nothing

#

Don't start with a discord bot

#

Do something simple

#

Like adding, functions

#

Requiring files

#

In javascript

earnest phoenix
#

@honest perch If I were to use Github to host the bot, what database could I use to automatically add new tables/rows/data to the database instead of manually editing the database?

honest perch
#

You cant use github to host a bot

#

Github is for git repositories

earnest phoenix
#

@earnest phoenix "Enmap" => Enmap

#

Learn JavaScript

#

Heroku I mean, Github deploy method

honest perch
#

If you have a vps

earnest phoenix
#

Man people refuse to learn

honest perch
#

Use something like postgres

earnest phoenix
#

I didn't even link any sites OMEGALUL

#

And also you're copy pasting code which is something you shouldn't do while coding

honest perch
#

I think I'm about to explode

earnest phoenix
#

I already have exploded, my soul is just talking

#

You gotta require enmap mate

honest perch
#

Why did I learn js, whyyyy

earnest phoenix
honest perch
#

I'm gonna do more go this week

drifting wedge
#

I use json db, and host on heroku, and have my token as a bot command

#

My bots better than mee6

honest perch
#

Instead of making a discord bot

#

Did you even listen to anything we said

#

Learn js

#

Seriously

#

Don't make a discord bot

blissful coral
#

Oh my

#

Please learn a bit of basic js first

honest perch
#

Ok nevermind I'm going to sleep

#

Goodnight

blissful coral
#

you can't really get HANDS ON with code

#

or typing

#

but sure let me build a model rq brb

solemn latch
#

also, every site is hands on.
its never recommended to copy paste code, you should be typing the code out yourself.

drifting wedge
#

also, every site is hands on.
its never recommended to copy paste code, you should be typing the code out yourself.
@solemn latch uh oh

earnest phoenix
#

And not wrap everything that is not defined between quotation marks OMEGALUL

solemn latch
#

spooky

drifting wedge
#

how do i get like the first channel in a server

#

llike the top one

quartz kindle
#

check the channel with the highest position

stark abyss
#

anyone got some fun suggestions to code ? I only know js / djs

drifting wedge
#

how do i get the position?

#

like do i do get_channel

#

but like how do i specify the position?

quartz kindle
#

@drifting wedge channels have a position parameter

#

check the documentation for the guild channel class

restive lily
#
@commands.command()
    @commands.has_role(name="Head Dealer")
    async def dealers(self, ctx, user: discord.Member):
        await user.add_roles(discord.utils.get(ctx.guild.roles, name="Dealers") 
        channel = discord.utils.get(ctx.guild.text_channels, name="coromodlogs")
        await channel.send(f"`{ctx.author.mention}({ctx.author.id})` has given `{user.mention}({user.id})` the `Dealers` Role")```
https://media.discordapp.net/attachments/769367455616991298/770089559382949908/unknown.png
https://media.discordapp.net/attachments/769367455616991298/770089766648807455/unknown.png?width=1026&height=432
#

@quartz kindle Do you have any idea?

earnest phoenix
#

Read the error

restive lily
#

yes i did

#

i dont want the unknown syntax is

sudden geyser
#

What version of Python are you using

restive lily
#

rewrite

sudden geyser
#

v2, v3

restive lily
#

pretty sure its the most updated one

quartz kindle
#

python version, not pip version

#

lmao

restive lily
#

all i know

sudden geyser
#

bruh

quartz kindle
sudden geyser
#

you'll always get python v2 there though

#

since the separate python3 command

earnest phoenix
#

python3 --version

quartz kindle
#

python3 has its own executable?

sudden geyser
#

yeah sort of

#

to not break

restive lily
#

i think mine is 3 since i use pip3

quartz kindle
#

then do what paimon said

restive lily
#

and i did

earnest phoenix
#

@quartz kindle its hayper

restive lily
#

i dont know what the unkown thing is

earnest phoenix
#

Smh

restive lily
#

since all my other commands work

quartz kindle
#

they asked you for your python version

#

and you still didnt say which one it is

restive lily
#

yes and i dont know it

earnest phoenix
#

go to cmd

quartz kindle
#

did you do what paimon said?

earnest phoenix
#

Type python3 --version

#

@quartz kindle ITS HAYPER SDGDFDFF

quartz kindle
#

no its paimon

#

:^)

earnest phoenix
#

no its patrick

restive lily
quartz kindle
#

Lol

earnest phoenix
#

Wtf

#

do python --version

restive lily
#

3.8.3

earnest phoenix
#

Ight

#

Lemme research about syntax

restive lily
#

ok ty

earnest phoenix
#

Try using @asyncio.coroutine instead of async

#

And yield from instead of await

#

no its paimon
@quartz kindle Did you mean emergency food

#

no that's an old version

restive lily
#

no bc all of my other commands have async def

earnest phoenix
#

Ok why yhe fuck

#

he's just missing ) at await user.add_roles(discord.utils.get(ctx.guild.roles, name="Dealers")

#

Oh

#

I am fuckin dumb

quartz kindle
#

true, nice catch

#

misleading error then

restive lily
#

see why i was confused

earnest phoenix
#

the IDE is showing another error compared to the other screenshot

restive lily
#

also im blind for not seeing that

earnest phoenix
#

which is pree funni

restive lily
#

ty tho

quartz kindle
#

@earnest phoenix wat

earnest phoenix
#

Paimon is considered as emergency food lmao Tim

#

Wdym

quartz kindle
#

@earnest phoenix you're asking how to read the documentation?

#
#

click documentation

#

Discord.Client shouldnt be null, unless you did something wrong

#

to find the Client class, look at the left side menu

#

there is a section called "CLASSES"

#

and in there you will find Client

#

if you're saying that Discord.Client is null, then you did something wrong

#

show your code

#

show your code

hollow sedge
#

we were helping neglected earlier, he just needs to actually learn js

#

The problem is he put Client instead of client

#

Which is a problem we already addressed

earnest phoenix
#

Oh my

#

Copy and paste code

hollow sedge
#

Again, you can't just make it a string of it's undefined

#

We've already told you everything

#

You need to learn js

earnest phoenix
#

@hollow sedge maybe it isnt client

hollow sedge
#

@hollow sedge maybe it isnt client
@earnest phoenix ik it is because we were helping him earlier

#

He had the same problem

#

it's already defined

#

You just put the wrong variable name

#

The problem is he put Client instead of client
@hollow sedge

#

Also it's obvious you are copy and pasting

#

The comments

thick gull
#

Spain without the S

hollow sedge
#

We can't help you, you literally just need to learn js

quartz kindle
#

on the top of your file, did you do client = new Discord.Client() or Client = new Discord.Client()?

hollow sedge
#

You can't come here and ask about every single error/problem you have

quartz kindle
#

which one

#

with an uppercase C?

#

then Client.user is correct

hollow sedge
quartz kindle
#

can you show more of the code?

hollow sedge
#

He changed it?

thick gull
#

you could post it as a code block

quartz kindle
#

it would be better to put the code into hastebin or pastebin or whatever bin

hollow sedge
#

Tim fr just stop helping this guy

#

He needs to learn the language

thick gull
#

copy pasted code usually doesn’t work

#

but

quartz kindle
#

because this makes no sense

hollow sedge
#

telling me the same thing over and over gain wont help
@earnest phoenix I'm not telling you, I'm telling Tim to stop helping you

quartz kindle
#

also, the error is saying the problem is on line 128

#

you're showing lines 136+

hollow sedge
#

@hollow sedge 'learn code'-Cloudfox
'learn code'-Cloudfox how about we repeat that A HUNDREN TIMES
@earnest phoenix how many of those times did you listen?

#

None

#

It's funny how your username is neglected when you neglect every person who actually tries to show you the right way to get started

quartz kindle
#

remove both '

carmine summit
#

.displayAvatarURL()

quartz kindle
#

avatarURL() and displayAvatarURL() both do the same thing, but displayAvatarURL() falls back to a default avatar if the user doesnt have one, while avatarURL() doesnt

quartz kindle
#

but thats not the issue here

#

did you fix what i told you to fix?

solemn latch
#

capitalization matters

#

its not the same code

#

you have different capitalization

quartz kindle
#

you defined your client as Client meaning you have to use Client with a capital C everywhere

#

anyway show more code

solemn latch
#

I think you also might be confusing what single quotes are used for sometimes.
your just turning things into strings to fix errors

#

which isnt fixing stuff

#

its just making it a string

quartz kindle
#

i need to see where that code block starts

vernal rivet
#

HOW LONG WAS I GONE FOR? stuff just went down when i was gone

quartz kindle
#

that code block ends on line 152

#

where does it start?

umbral zealot
#

should be client not Client

faint prism
#

Lol

umbral zealot
#

they're 2 different things.

vernal rivet
quartz kindle
#

🤦

vernal rivet
#

where does that brace go to, is what tim is asking

faint prism
#

Gl Tim

quartz kindle
#

please put your entire code on hastebin and send it

#

you just keep posting pictures of the wrong parts of it

umbral zealot
#

... I think maybe this isn't inside an event.

#

that would explain it

faint prism
#

It's a website

#

Where you share text or code

vernal rivet
#

looks like an MessageEmbed Object

quartz kindle
#

@umbral zealot thats exactly what it is

umbral zealot
#

https://hasteb.in/ , paste the code here (REMOVE YOUR TOKEN), then do CTRL+S, and give us the URL that results with this.

quartz kindle
#

and its not the only part of his code thats not inside an event

#

but i want to see the full code so i can show him

umbral zealot
#

this is gonna be a case of learn js before making a bot I can smell it.

faint prism
#

It is

#

Just check the history

#

Cloudfox knows

hollow sedge
#

this is gonna be a case of learn js before making a bot I can smell it.
@umbral zealot if only someone already said this..

umbral zealot
#

yeah I can definitely see where this has already gone and will keep going.

#

doesn't take a long stroll up the park to see this guy's a pure Tyler.

hollow sedge
#

Idk how Tim has the energy to help this guy

umbral zealot
#

Oh god this is... wow that's a mess.

faint prism
#

Oh my

hollow sedge
#

Oh god this is... wow that's a mess.
@umbral zealot cause it's copy and pasted

umbral zealot
hollow sedge
#

@umbral zealot omg that should be pinned

umbral zealot
#

I know.

vernal rivet
#

is that pinned? can we have that pinned please

earnest phoenix
#

@mint thicket

mint thicket
#

?

umbral zealot
#

Look buddy it's clearly you have absolutely no idea how this code works. The solution to this is simple: Please take the time to learn javascript.

mint thicket
#

what the frick is going on here

vernal rivet
#

pinned that message of the link that evie sent please, it is pin material

mint thicket
#

yall need to calm down

umbral zealot
#

It'll take a few weeks, months, then you'll be able to do this on your own and not rely on everyone else doing this for you. It'll be very helpful to everyone.

vernal rivet
#

HyperStumbles can't, i am too hyper right now

mint thicket
#

@umbral zealot talking to you specifically

faint prism
#

Why did you ping a mod?

mint thicket
#

youre probably right, but could you be less aggressive about it

hollow sedge
#

Why did you ping a mod?
@faint prism to potentially pin the message

earnest phoenix
#

Uh...

quartz kindle
#

i must say

#

i've seen all sorts of mess

earnest phoenix
#

Btw criticism help you improve....

quartz kindle
#

but i've never seen something quite like this

#

lmao

earnest phoenix
#

Also bean i ping you about pin thingy you should pin that message

faint prism
#

Same lmao

solemn latch
#

lmao

vernal rivet
#

oh?

umbral zealot
#

Eh, it's the "look, buddy" isn't it? Sorry bean. I'll tone it down.

mint thicket
#

oh im not touching this channels pins with an 8ft pole

earnest phoenix
#

lOl

vernal rivet
#

dogekek i like this mod, he is pretty chill

faint prism
#

You're code looks like an AI tried to make it from random sections of different GitHub repos, and failed, terribly... Sorry

#

It's just kind of incoherent

hollow sedge
#

Omg

#

I thought that was a joke

umbral zealot
#

@earnest phoenix the unfortunate reality is that this entire code is just a mess of copy/pasted things that don't work together, placed in completely random locations. It can't work. We can't fix this, you need to take the time to learn javascript.

hollow sedge
#

You mean the code is real??

solemn latch
#

its so messed up, hastebin thought it was php code 🤔

vernal rivet
#

cloudfox, i wish i can tell you it is a dream, but i mean, can i really say that

solemn latch
hollow sedge
#

cloudfox, i wish i can tell you it is a dream, but i mean, can i really say that
@vernal rivet 'better' - sqlite3..like I just don't understand how that would help you find sqlite

vernal rivet
quartz kindle
#

@earnest phoenix im gonna be honest with you, your code has many many issues, all of them are 100% because you dont understand the language. You can keep trying and keep hitting your head, and you might eventually manage to get something working, but if you really want to make it work and avoid such issues in the future, you really should learn some basic javascript. That code you said about sqlite is not even valid javascript to begin with, and stuff like "message.channel.send"({}) is also not valid javascript, you're missing all the basic rules of the language itself

umbral zealot
hollow sedge
#

Too close to the real thing

sonic lodge
#

the guides expect you to have decent javascript knowledge don't they?

umbral zealot
#

yes.

solemn latch
#

yeah

vernal rivet
#

tbh, thats probably more efficient than modern cars happy_boy ||jk just want to make a joke||

umbral zealot
#

It's fine everyone, he said he'd go learn, now we can stop screaming at him 😄

vernal rivet
#

wait we were screaming at him?

hollow sedge
#

It's fine everyone, he said he'd go learn, now we can stop screaming at him 😄
@umbral zealot yeah it's just hilarious tho

vernal rivet
#

i didn't noticed

solemn latch
#

honestly, keep it.
I love looking at my early days code, some really bad things in it.

earnest phoenix
#

Same

solemn latch
#

should be in recycling bin :p

hollow sedge
#

It's ok, all his code was posted here anyways 😆

solemn latch
#

oh yeah

#

we have backups

#

i tried working with an api in my first few weeks programming

umbral zealot
solemn latch
#

i had zero idea what api's where

#

or how they worked

vernal rivet
#

i like to laughing at my old programs, and say "look at this idiot. its like he just crawled out of a hole, and started to program with a 1955 computer, and doesn't know what programming is"

solemn latch
#

everythings an api really.

sonic lodge
#

"application programming interface"

vernal rivet
#

wait everything milk_think

#

yes? why?

faint prism
#

The API is what you were attempting to interact with to do stuff with discord

solemn latch
#

^

#

every message we are sending it going to the discord api

vernal rivet
#

if everything is an api, does that mean bamboo is an api?

vernal rivet
#

i mean that is a valid question tbh

#

shrug i forgot that exist tbh

solemn latch
#

its not really that good beyond very basic concepts

vernal rivet
#

^^^

#

if i forgot that exist, then that means its not good to recommend to newer people

solemn latch
#

if you go into it understanding it will only teach you stuff like, what a variable is, what a function is, and what strings are its not that bad.

hollow sedge
#

Someone did send it to you

vernal rivet
#

its like basic basic concepts

umbral zealot
#

yeah they're all in the link I sent

vernal rivet
#

this exist?

umbral zealot
#

the one you said you "read multiple times"

vernal rivet
#

thats discord.js docs. not javascript docs.

solemn latch
#

probably along with the guide

umbral zealot
#

well now you have the proper links.

hollow sedge
#

If you had listened you me, you could've been learning js instead of "making" your bot

vernal rivet
#

cloudfox how do you like the vscode theme?

solemn latch
#

Development communities are always a bit harsh.

hollow sedge
#

cloudfox how do you like the vscode theme?
@vernal rivet it's beautiful, it brings a tear to my eye just to think about it

#

Also I feel like it kind of has halloween colors

vernal rivet
#

dogekek tbh best answer i seen yet

hollow sedge
#

Which is cool

restive lily
#

this is my host and my bot will go online for 1 second then it goes offline

faint prism
#

@earnest phoenix I sent you w3schools js tutorial

restive lily
#

my bot runs fine in vsc

vernal rivet
#

idk shrug i don't do py

faint prism
#

Show code

restive lily
#

my code is fine

#

it works in vsc

#

the line it has an error is the bots token

vernal rivet
#

idk if it has the same thing that discord.net has with task.delay(-1);

umbral zealot
#

if the code works fine in VSC but not the host, then the host is the problem 😉

restive lily
#

yes but the host worked yesterday

faint prism
#

So your environment changed?

#

Use docker ig

restive lily
#

huh

umbral zealot
#

If something stops working and nothing's changed, something's changed

faint prism
#

Oh you don't know what that is? Nvm then

hollow sedge
#

That moment when your host has mood swings

restive lily
#

this happened to me a few months ago but i forgot what i did to fix it

#

lmao

vernal rivet
#

cause syntax is how the computer reads. its similar to how we would read messages on discord

hollow sedge
#

well you might throw an error for debugging purposes too

vernal rivet
#

^^^^^

#

if you think that way, then yes. but errors means something is causing conflict, and preventing the program to execute.

earnest phoenix
#

@restive lily what's the full error btw?

hollow sedge
#

even if its because you messed up, errors help you realize where you messed up and how you messed up

restive lily
#

@earnest phoenix its a problem with my host

#

idk remember how to fix the problem

vernal rivet
#

to debug

hollow sedge
#

@earnest phoenix so you can get feedback on what to fix

quartz kindle
#

in the above case, yes, thats an error for testing purposes

vernal rivet
#

that and to prevent any kind of damage to the program

umbral zealot
#

You want error messages to stop your bot the same way you want to shut down your car's engine when it starts making weird noises. It's a bad idea to keep things going when they're broken 🙂

earnest phoenix
#

that error only pop up for a few reasons, SSL, improper token, or deny_new error

restive lily
#

it says deny_new at the bottom

earnest phoenix
#

i see

#

then update

#

it was fixed on the newer version

restive lily
earnest phoenix
#

it's pip install -U discord.py

#

-U or --upgrade, both works

restive lily
#

thank you, when i update ill see if it works

hollow sedge
#

why are you able to use pip but not python, wouldnt it be pip3?

earnest phoenix
#

yea might be pip3 if he's using python3

restive lily
#

tbh idk

#

but it worked

#

tysm

earnest phoenix
#

oki

hollow sedge
#

@restive lily which one fixed the problem

restive lily
#

first one stella said

hollow sedge
#

thats for an html file, not a js file

#

rename to "my.html"

quartz kindle
#

you're not planning on making a discord bot with that... are you?

#

ah good

umbral zealot
#

yes... I really hope we're not going to get a step by step of your entire learning process every 5 minutes for the next 2 months.

#

not really.

quartz kindle
#

i would gladly do it

#

if i got paid for it

errant perch
#

{"331222209299349504":{"value":"test"},"719362069975138354":{"value":"test"}} how do i cycle through the user id's in this string? javascript

quartz kindle
#

if its still a string, parse it as json first

#

then you can use Object.keys(parsedJsonHere) to get an array of keys

#

@earnest phoenix doesnt even pay my internet bill

sage bobcat
#

One message removed from a suspended account.

errant perch
#

thanks for the help tim

quartz kindle
#

@sage bobcat oliy bucks are not worth anything anymore, since oliy left

#

now you have to pay me in veldbucks

sage bobcat
#

One message removed from a suspended account.

quartz kindle
#

if i recall correctly, it was 420 oliy bucks for 69 veldbucks

sonic lodge
#

1 oliy * (69 veld / 420 oliy) = 0.16 veld

quartz kindle
#

an external file is a file that is not the main file

sonic lodge
#

there ya go

quartz kindle
#

which part of the file do you want to show?

#

is it a js file?

#

it depends on the file type

#

js files are loaded through script tags, css files are loaded through link tags

#

show an alert with an external script

#

that means

#

you copy everything you wrote inside <script></script>

#

and you put it in another js file

#

then in the main file, you replace it with <script src="otherfile.js"></script>

#

so instead of having the js code inside the main file, you put the js code in a different file, and load it inside the main file

#

you create a js file

#

in the same folder where your html file is

#

and you put the alert code in there

#

then in the html file, you load this js file

#

using a <script> tag with a src attribute

#

<script src="thefileyoucreatedwiththealertcodeinside.js"></script>

hollow sedge
#

Somethings wrong if you need a tutorial to do a tutorial

#

You might just want to do it again until you fully understand it

dire obsidian
#

Somebody knows how change the bar color on a <progress> ?

#

When i try to change it, it just turn green

still cliff
rose warren
#

Anyone have experience with the Patreon API? I noticed they're no longer maintaining it. Does it work correctly? Am I better off just letting the Patreon bot assign Patron roles in my support server or would it be worth my while adding it to my bot? Currently, I have a bot that unlocks Patreon tiers on my main bot for users depending on the Patreon roles they were given by the Patreon bot in my server. It's kinda hacky...

solid pendant
#

where is my bot

#

-botinfo 769099528846311454

gilded plankBOT
#
Bot info
ID

769099528846311454

Username

Funny Bot

Discriminator

5192

Short Description

Moderasyon , Eğlence ve aynı zamanda bir Müzik Botudur.

Library

discord.js

Prefix

%

Total Upvotes

1

Monthly Upvotes

0

Server Count

No server count

Owner(s)

@solid pendant

solid pendant
#

Why is my bot not on the server?

earnest phoenix
#

why would it be

ionic dawn
#

@solid pendant it will be once its verified by a moderator

solid pendant
#

@ionic dawn who will verify me

ionic dawn
#

Read my message

solid pendant
#

who will verify my bot@ionic dawn

ionic dawn
#

A moderator

tame kestrel
#

@ionic dawn Bots are no longer added to the DBL discord server if that's what you're asking.

delicate shore
#

My website comes if someone searched PGamerX website

#

But doesn't come if someone sesrch PGamerX

#

I have tried every thing

#

For SEO

ionic dawn
#

@tame kestrel they aren't?, sorry then for giving him wrong information sadBonk

rugged cobalt
#

If I'm trying to host my bot on digital ocean and I'm using PostgreSQL (locally stored) how would I get the data from the database and put it into the hosting vps

earnest phoenix
#

@delicate shore try using google lighthouse

#

it has free SEO, site performance and all that jazz

#

press F12

#

then on the top click lighthouse

ionic dawn
#

@rugged cobalt with locally stored you mean stored in your PC or the digical ocean host?

abstract coyote
#

Hey i've never tried making a music command, which music package is the best?

earnest phoenix
abstract coyote
#

like an npm package

rugged cobalt
#

@rugged cobalt with locally stored you mean stored in your PC or the digical ocean host?
@ionic dawn on my pc but I want to put it with the source code onto the digital ocean host. How would I do that

earnest phoenix
#

wHAT CAN I ADD MY BOT ON THİS SERVER

slender thistle
#

wHAT CAN I ADD MY BOT ON THİS SERVER
@earnest phoenix no

ionic dawn
#

I don't know the exact process since I didnt use digital ocean but, if its a vps is just movin the database from your local machine to the vps

shrewd parrot
#

How would one manage a mongodb connection throughout the entire bot and reduce the load on the CPU said connections would make.

rugged cobalt
#

Yeah that's the part I don't know how to do

shrewd parrot
#

@rugged cobalt if you want to put your bot onto digital ocean as a host you can either use FTP or use github and git pull

rugged cobalt
#

But do I have to do anything special with the code or do I just upload it and the pg database will still work there

shrewd parrot
#

um you would likely need to setup the pg database on the host but the code should be a simple copy paste (Other than setting the ip for the pg database)

earnest phoenix
#

@rugged cobalt why not use an external server for the database

ionic dawn
#

if you already have a server why use another one

shrewd parrot
#

^^ this too

earnest phoenix
#

Because it's gud

ionic dawn
#

good for what

#

asking another server for the information?

#

If you have a decent vps theres no problem in have your db on it

earnest phoenix
#

well idk why but i do it for my stuff

ionic dawn
#

I mean... request to other servers just makes the server have a lil bit more delay

rugged cobalt
#

Can you upload your dB to a droplet on digital ocean and if you can how much space do you get for free

ionic dawn
#

since you have to send the request and wait for the answer

#

and you depend on 2 servers

earnest phoenix
#

also i use google firebase realtime database so i absolutely have to store my stuff on the server for that and the fastest speed i can get between the two servers requesting stuff is to directly use firebase hosting

ionic dawn
shrewd parrot
#

Personally I'm using mongo (Just because I have used them before so I know what to do) But can anyone help me with configuring a single connection for the bot so it doesn't have to make a connection for each command that is run (Trying to reduce memory and CPU load)

earnest phoenix
#

@shrewd parrot just make one connection in the main bot file and pass the mongo instance to each command

#

so it doesn't have to reconnect

#

iirc

shrewd parrot
#

Like so?

const client = new MongoClient("mongodb+srv://username:password@cluster0.daswr.mongodb.net/bot?retryWrites=true&w=majority", {useUnifiedTopology: true});
const connection = await client.connect()
const database = connection.db("bot")
bot.on("messageCreate", (message) => {
  require("./discordEvents/message").Run(bot, message, database);
})
earnest phoenix
#

@shrewd parrot exactly

cobalt sky
#

hello

earnest phoenix
#

hello!

cobalt sky
#

can you help me with code for command please?

shrewd parrot
#

ty @earnest phoenix (I'll give it a test now)

earnest phoenix
#

yes

#

ask away

#

we'll help with anything

cobalt sky
#

i want slowmode command

shrewd parrot
#

ah wait how would I do that asynchronously due to not being in a function?

cobalt sky
#

I tried 5 codes but none of them worked

earnest phoenix
#

i want slowmode command
@cobalt sky which library are you using for your bot?

#

discord.js?

cobalt sky
#

discord.js

earnest phoenix
#

you can do message.channel.setRateLimitPerUser(<milliseconds>) to change the slowmode

cobalt sky
#

i have code but he dont work do you want to send you?

earnest phoenix
#

yes

#

it would be spammy to send a big block of code in chat

abstract coyote
#

You could also use a set and then a timeout to make it a bit more interesting, but the setRateLimitPerUser is much easier to use and just pog c:

earnest phoenix
#

@abstract coyote you can't change the slowmode in djs without using TextChannel#setRateLimitPerUser

abstract coyote
#

yeah

cobalt sky
#

i type code

earnest phoenix
#

@cobalt sky Put all your code on their and press get link then send the link here

cobalt sky
earnest phoenix
#

@cobalt sky that should work probably

#

does it throw any error?

cobalt sky
#

no

abstract coyote
#

after you used the command?

earnest phoenix
#

thonk

#

wait you're not parsing the time as a Date

#

it gets passed to setRateLimitPerUser as a String which djs ignores

#

try adding parseInt(time) inside the setRateLimitPerUser @cobalt sky

gentle lynx
#

can I remove this folder?

cobalt sky
#

try adding parseInt(time) inside the setRateLimitPerUser @cobalt sky
@earnest phoenix i try but again not work

earnest phoenix
#

what did you type?

#

prefixslowmode 3 minutes or something?

cobalt sky
#

prefixslowmode 3

earnest phoenix
pure lion
#

Can anyone tell me how I can set up a TF2 community server on my Debian Linux vps?

earnest phoenix
#

send your code

#

Can anyone tell me how I can set up a TF2 community server on my Debian Linux vps?
@pure lion you don't

pure lion
#

But I wanna host one

shrewd parrot
#

wrong place to ask @pure lion

earnest phoenix
#

it is programming related

shrewd parrot
#

Channel for chatting about (bot) development

open rune
#

what

shrewd parrot
#

¯_(ツ)_/¯

cobalt sky
earnest phoenix
#

@cobalt sky facepalm the parseInt(time)should be inside the brackets around setRateLimitPerUser

abstract coyote
#

oh

#

HMPH

#

nobody saw that Thonk

earnest phoenix
#

lol

abstract coyote
#

we don't talk about it ;-;

earnest phoenix
#

shut nobody will talk about it

abstract coyote
#

yos!

#

By the way which npm package is the most reccomended for playing music?

cobalt sky
#

@cobalt sky :facepalm: the parseInt(time)should be inside the brackets around setRateLimitPerUser
@earnest phoenix message.channel.setRateLimitPerUser(parseInt(time)) again not work

shrewd parrot
#

Um don't know why but all of a sudden since I added the code below

async function databaseLoad(){
    const client = new MongoClient("mongodb+srv://among-us-bot:BW3Lb86EifZOiu3U@cluster0.daswr.mongodb.net/bot?retryWrites=true&w=majority", {useUnifiedTopology: true});
    const connection = await client.connect()
    const database = connection.db("bot")
    return database
}

databaseLoad().then(data => {
    database = data
})
setTimeout(async() => {
    require('./services/prefixFetch').Run(database)
}, 5*1000);

The bot isn't starting (Well not getting a ready event)

#

pm don't ya dare meme on me

waxen tinsel
#

if its an active connection, does it need to be kept running in another thread or smthing?

shrewd parrot
#

shouldn't need to as it's just a state

#

not really sure though

#

oh um ok i'm stupid (I forgot to run bot.connect()) 🤣

ionic dawn
waxen tinsel
earnest phoenix
#

@earnest phoenix message.channel.setRateLimitPerUser(parseInt(time)) again not work
@cobalt sky because it only accepts milliseconds of time
so if you type <bot prefix>slowmode 3000 the bot will set the channel slowmode to 3 seconds
if you want to be able to do <bot prefix>slowmode 1 hour you'll need to parse it as a Date object
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
(i don't know how to parse Date objects sorry)

#

@cobalt sky oh wait you can just do Date.parse(time) nevermind the docs say it's not recommended

woven sundial
#

Heya, I have a problem, I'm trying to write an ID in a json but it doesent write it :/ Can someone help me ?

my code : ```js
const fs = require("fs")
if(!users.list.includes(message.author.id)){
fs.readFile('./giveaway.json', 'utf-8', function(err, data) {
if (err) throw err

  var arrayOfObjects = JSON.parse(data)
  arrayOfObjects.list.push(message.author.id)

  console.log(arrayOfObjects)

  fs.writeFile('./giveaway.json', JSON.stringify(arrayOfObjects), 'utf-8', function(err) {
    if (err) throw err
    const embed = new MessageEmbed()
  .setTitle("Inscription au Giveaway réussie !")
  .setDescription(
    "Votre inscription au giveaway à bien été enregistrée ! Bonne chance"
    )
    .setThumbnail(message.author.avatarURL())
  .setColor("GREEN");
    console.log('Done!')
    console.log(users.list)
    message.channel.send(embed)
  })
})

}```

my console returns me for the first console.log the list of ID + mine
but the second one not

earnest phoenix
#

or you can use hastebin if you want

ionic dawn
#

@earnest phoenix spamming your pastebin service?

earnest phoenix
woven sundial
earnest phoenix
#

this exists?

woven sundial
#

it exists

zealous sable
#

There’s hundreds of paste services lol

pure lion
#

wrong place to ask @pure lion
@TheMystery#7755 🥚

earnest phoenix
#

that is just a worse version of hastebin

woven sundial
#

so, can someone help me please ? sadcat

earnest phoenix
#

ok

woven sundial
#

idk why doesnt it write it in the json

#

it add it at the push line but not after the write one

earnest phoenix
#

I'm trying to write an ID in a json but it doesent write it
@woven sundial JSON DATABASE AAAAAAAAAAAAAAAAAAAAAA

woven sundial
#

It's just for a few IDs

earnest phoenix
#

JSON is NOT meant to be used as a database anyways

woven sundial
#

yep, but that's not fixing my issue tho bg

ionic dawn
#

@woven sundial if you are trying to save any sort of data dont try to use single files somewhere in your folders, build a proper db like mongo(nonSQL) or MySQL

earnest phoenix
#

you'll regret JSON databases later

ionic dawn
#

yeah but for small things its good

earnest phoenix
#

use smth like mongo or SQL or (my recommendation) any of the two google firebase databases

woven sundial
#

yea, but does anyone have an idea why does it don't write the new datas in the json ? 🤔

ionic dawn
#

this no

#

check if the route is correct

woven sundial
#

it is :/

ionic dawn
#

is it throwing any error?

woven sundial
#

no, it returns "done"

earnest phoenix
#

wait is the third parameter in fs.writeFile (async) the encoding or the callback?

woven sundial
#

wait I think I fixed it

#

I think fs is taking the root directory and not the current one

ionic dawn
#

well... when you add ./ its talkin about the relative route

#

its using the route where the files is executed as root

earnest phoenix
#

this is just a plain ripoff of hastebin they didn't even change the favicon

ionic dawn
#

if you dont use the ./ you have the give the full route

pure lion
#

@earnest phoenix yeag it's callback

earnest phoenix
#

@pure lion then i think the error is that he's passing the encoding as the third param and the callback as the fourth

#

lemme go read node docs

#

@woven sundial yes what dice said is correct

#

you need to pass the callback as the third parameter

#

the second paramater can be an options object containing what data to write and the encoding

#

Thonk but how does this example work on node.js:

#
fs.writeFile('message.txt', 'Hello Node.js', 'utf8', callback);
pure lion
#

Make them post to wherever

#

<a name="button_A">

#

Do that too

#

Assuming the buttons are a

#

I usually use form/submit to post to my server

#

In the form just do method="POST" action="/your/path/here"

#

In the buttons append a name="" and name them

earnest phoenix
ionic dawn
earnest phoenix
#

to prevent XSS on my site can I just convert all <,\ and > characters to their &5id4j9 blah blah form?

placid iron
#

why do people use webhooks for logging?

twilit rapids
#

If you get more than 1000 votes a month you cannot access all the vote data anymore through our API

#

Just the last 1000

earnest phoenix
#

:popcorngirl:
@ionic dawn thank you for helping, that explained it very well

placid iron
#

ah i should've explained it better

twilit rapids
#

Hm no idea

placid iron
#

Yeah, the only reason i could think of would be if the ratelimit is higher for webhooks and it doesnt count towards the bots ratelimit

#

ah ok thanks

ionic dawn
#

@ionic dawn thank you for helping, that explained it very well
@earnest phoenix Wasn't trying to

#

No reason to put the whole mention on the "", you can just check if the first mention has de proper ID lol

earnest phoenix
#

i id

#

did

ionic dawn
earnest phoenix
#

thanks

#

I have a complex question myself
My current code: https://paste.code913.repl.co/paste/jA37xCxfE-.html

Question
So right now whenever somebody requests the server to store the code, the server writes the content in ./public/paste/<random file name> with the HTML structure and the code goes in between. However, since the data is stored on the current server with the HTML structure using node.js' fs module. However, the HTML structure is the same for each paste and it takes up unnecessary space in saving it. An alternative would be to store each paste's code on an external database server like Firestore and fetch the data from it and send with the proper HTML structure to the user. So my question is, should I do it the database way or do it the current way?

#

||@quartz kindle||

honest perch
#

Atleast have syntax highlighting

#

Use a data base

#

The user logged in adds the paste, and has access to delete it

earnest phoenix
#

yeah

#

*install discord-oauth package*

ionic dawn
#

delete the .html after x time?

honest perch
#

@earnest phoenix use passport

ionic dawn
#

aren't they ment to be something temporal?

honest perch
#

Its better

earnest phoenix
#

...why?

honest perch
#

Because passport is the number 1 authentication module for nodejs

#

And is regularly updated

earnest phoenix
#

passport?

honest perch
#

Mhm

earnest phoenix
#

that sounds like the passport IRL

honest perch
#

Indeed it does

#

But its for logins

earnest phoenix
#

strategy?

queen crescent
#

im trying to use the npm package "humanize-duration". ive installed it, however i keep getting this error.

<script src="humanize-duration.js"></script>
<script>
  document.getElementById('appopened').innerText = humanizeDuration(Date.now() - settings.opened, { round: true, largest: 3 })
</script>```
earnest phoenix
#

im trying to use the npm package "humanize-duration". ive installed it, however i keep getting this error.
you can't use npm packages on browsers unless they have a client-side version

queen crescent
#

how can i use it then?

earnest phoenix
#

if the package has a client-side version use that

queen crescent
#

how do i know

#

if it does

earnest phoenix
#

they should mention it somewhere

queen crescent
earnest phoenix
#

can anyone help me with the help.js command as it doesnt seem to respond

#

lmao

#

hi need help

#
  if (message.author.bot) return;
  if (message.content.toLowerCase().includes("+avatar")) {
    const { guild, channel } = message
    const user = message.mentions.users.first() || message.member.user
    const member = guild.members.cache.get(user.id)

    let embed = new discord.MessageEmbed()
    .setAuthor(`${message.author.username}`, message.author.displayAvatarURL)
    .setTitle(`${message.author.username} Requested ${user.username}'s Avatar.`)
    .setImage(user.displayAvatarURL)
    message.channel.send(embed)
  }
})
#

i dont get avatar of the person

#
client.on('message', message => {
  if (message.author.bot) return;
  if (message.content.toLowerCase().includes("+avatar")) {
    const { guild, channel } = message
    const user = message.mentions.users.first() || message.member.user
    const member = guild.members.cache.get(user.id)

    let embed = new discord.MessageEmbed()
    .setAuthor(`${message.author.username}`, message.author.displayAvatarURL)
    .setTitle(`${message.author.username} Requested ${user.username}'s Avatar.`)
    .setImage(user.displayAvatarURL)
    message.channel.send(embed)
  }
})```
#

there u r

#

let me look

#

one sec

#

why are you just sending the whole piece of code again

#

so its in the javascript text

#

yes

#

need help

#

it just shows user

#

pls tell what i shoud try doing

#

??

honest perch
earnest phoenix
#
client.on('message', message => {
  if (message.author.bot) return;
  if (message.content.toLowerCase().includes("+avatar")) {
    const { guild, channel } = message
    const user = message.mentions.users.first() || message.member.user
    const member = guild.members.cache.get(user.id)

    let embed = new discord.MessageEmbed()
    .setAuthor(`${message.author.username}`, message.author.displayAvatarURL({ format: 'png', dynamic: true, size: 1024 }))
    .setTitle(`${message.author.username} Requested ${user.username}'s Avatar.`)
    .setImage(user.displayAvatarURL)
    message.channel.send(embed)
  }
})```
#

that should work

#

@earnest phoenix https://highlightjs.org/
@honest perch I'm already highlighting the stuff you have JavaScript off or what?

honest perch
#

Which highlighter are you using

#

And yeah I have js off

earnest phoenix
#

highlightjs

honest perch
#

Ah nice nice

earnest phoenix
#

and the highlighting is done in the client's browser

#

cuz yes

#

saves little bit of storage

#

@earnest phoenix did u see what i put

#

umm yes

#

checking

#

ight

#

@earnest phoenix

#

no

#

it work?

#

aint working

#

hm

#

let me think

#

yes

#

wait

#

it worked

#

with image

#

thanks

#

send a pic

whole knot
#

Hello, is anyone here familiar with music bots? I built in a vote skip if x members are in a voice channel and want to skip a song. The role "DJ" is a special role which has the possibility to bypass voteskip and skip a song directly.
I'm a bit confused right now and don't know how to built that in, can anyone help me? So far I have the following:

vale garden
#

@vale garden what's the purpose of the do{} in your code
@hollow sedge im late af lmao but the do {} adds each pokemon in the user's inv to the embed desc; im making a pokecord clone

placid iron
#

Im assuming the rate limits are per access token?

#

So if i have a server with multiple people accessing data (with different access tokens) it would be fine

wicked pivot
#

hi, i can't shrink my json file what to do?

const extra = require('...')```
ionic dawn
#
const extra = require ('data/extra.json')
#

that dsnt work?

still merlin
#

try
const extra = require('./file.filetype')

wicked pivot
ionic dawn
#

isnt the same ./ to direct use a folder?

still merlin
#

I've used it for regular json files

wicked pivot
#

the problem is that I can't do it

still merlin
#

@wicked pivot try adding a fullstop

#

./data

#

Wait, the module doesn't exist 🤔

wicked pivot
#

same error

still merlin
#

'module_not_found'

ionic dawn
#

i would like to know the full route

wicked pivot
#

how to explain wait

ionic dawn
wicked pivot
#

./assets/commands/mod/ my command
./assets/data/ my json

#

This is understandable ?

still merlin
#

what file are you trying to require it in?

wicked pivot
#

"extra.json"

still merlin
#

try ../

#

Wait, no

wicked pivot
ionic dawn
#

../ will goback in the directory

#

wheres your index.js

wicked pivot
ionic dawn
#

./assets/data/extra.json

#

that pops an error?

wicked pivot
#

yes

ionic dawn
wicked pivot
#

wait in the commands or the main file?

still merlin
#

try removing the . but not the /

#

/assets/data/extra.json

ionic dawn
#

if you remove the . it will use it as a full route

#

and will go to the root

wicked pivot
#

in the "main.js" file (the main file) it works

ionic dawn
#

so?

#

oh you want form the command?

#

from*

wicked pivot
#

I want to require the json in my command

ionic dawn
#

oh thats easy: ../data/extra.json

#

that should be good

#

you leave the command dir and go into the data

wicked pivot
ionic dawn
umbral zealot
#

Up 2 folders not one.

#

Data is not in commands.

ionic dawn
#

../ = move back

umbral zealot
#

../../data

#

From the commands subfolder, up to folders, in the data folder. That's where your json file is.

opaque seal
#

When I use sharding, does discord.js create a separate thread for the shard number 0 too?

wicked pivot
#

ah! it seems to work wait

umbral zealot
#

Not that you should use json as a database, that's very dangerous and not very function in the long run.

wicked pivot
#

it works with "../../data/extra.json" thank you

umbral zealot
#

Consider not using json as a database.

#

You'll lose your entire data one day for sure.

wicked pivot
#

it's not something super important don't worry

umbral zealot
#

Still.

opaque seal
#

When I use sharding, does discord.js create a separate thread for the shard number 0 too?
if anyone know ping me thanks

ionic dawn
#
Route: /files
cd ..
Route: /
#

still thinking why ../../

#

if its assets/{commands - data}

umbral zealot
#

because require() is relative to the file it was called from.

#

They'll figure out soon enough why require() isn't valid in this case 😛

delicate shore
#

My website is - https://sheep.pgamerx.com
If you are on mobile open it and it'll just show white screen
But if you do show desktop version it works fine

#

Can anyone help me figure the problem ?

ionic dawn
#

you have a css that acts on screen width?

pale vessel
delicate shore
#

you have a css that acts on screen width?
@ionic dawn
No I don't think so

ionic dawn
#

Lemme check on my iphone

#

Can you paste the html?

pale vessel
#

it's a website builder lol

earnest phoenix
#

need help

pale vessel
#

with?

earnest phoenix
#
bot.on('ready', () =>{
    console.log('This bot is online');
    bot.user.setActivity('Total Guilds'`${bot.guilds.cache.size.toLocaleString()} `,'|Total Users'`${bot.guilds.cache.reduce((a, b) => a + b.memberCount, 0).toLocaleString()}` ({
     type: `WATCHING`
                         })
    )})```
#

I want to say how many guilds my bot is in and total users

#

of all guilds added up

pale vessel
#

you just did...

earnest phoenix
#

but

#

${bot.guilds.cache.size.toLocaleString()}

#

is coming up with errors

#

and the total guilds and total users

#

say they arent functions

pale vessel
#

keep it under one string

#

why are you adding commas

#

`Total Guilds ${code} | Total Users ${code}`

#

make it under one string

earnest phoenix
#

so this

pale vessel
#

look

#

you have ``

umbral zealot
#

you can't just... throw strings together like this

earnest phoenix
#

mhm

umbral zealot
#

perhaps you should learn javascript before trying to make a bot? This looks like random button mashing, not programming.

delicate shore
#

Can you paste the html?
@ionic dawn
Html of the page ?

#

Whole ?

#

Ik

earnest phoenix
#

what im saying is

ionic dawn
#

The metas

earnest phoenix
ionic dawn
#

Whatevers inside <head>

delicate shore
#

Whatevers inside <head>
@ionic dawn
I have separate files

#

For style

#

That's why you should never use website builder

#

It makes everything tough

#

I'm regrettins using it

earnest phoenix
#

@earnest phoenix trying to make in the status total guilds and total users

delicate shore
umbral zealot
#

learn javascript also
bot.guilds.cache.array().length
bot.users.cache.array().length
What? Why would you do that. discord.js has a .size property on colections it's perfectly valid

pale vessel
#

you don't need to turn it to an array

#

learn javascript right back at you jk

umbral zealot
#

Yeah but that's doing an entire conversion operation for absolutely no reason.

#

wasted CPU cycles.

pale vessel
#

map itself has the property size

ionic dawn
#

Why dont you build your website your own

#

Css and html isnt that hard

earnest phoenix
umbral zealot
ionic dawn
#

And flexbox + CSS Grid makes it easier

umbral zealot
#

Because that shoudl work fine

delicate shore
#

Yes but website builders make work easier

#

And I needed it urgently

#

So yeah

pale vessel
#

it's not that bad

umbral zealot
#

The problem is that the entire code you have is wrong, @earnest phoenix . It's just random bits thrown together. You're missing concatenation or commas or something but it's definitely not valid syntax you have there. It's a wonder it even runs

pale vessel
#

if you use fn`string` it's going to execute the function with string being the first argument inside an array

earnest phoenix
pale vessel
#

bismillah

delicate shore
#

But @ionic dawn did you find the error tho?

earnest phoenix
#

so what do i do?

delicate shore
#

How can I see which

umbral zealot
#

Learn javascript, would be the best thing to do right now

#

What's id and why are you dividing it by 4194304 ?

#

And why are you dividing an ID by this number? what... purpose does that serve?

pale vessel
#

why not just use the created timestamp?

umbral zealot
#

Yeah that would make a lot more sense

#

I mean, that still doesn't answer what the heck 4194304 is and why you're dividing a snowflake by it?

#

the ID doesn't contain the creation date

pale vessel
#

it's the snowflake server epoch

#

it does

#

it's a snowflake

umbral zealot
#

yeah but not divided by 4194304 😂

#

Not that javascript can handle this size of integer without using BigInt in the first place.

pale vessel
#

@low orbit try Date.now() - ((id/ 4194304) + 1420070400000)

#

add parentheses next time to avoid any errors

earnest phoenix
#

!report

#

report

#

@low orbit

#

I cant linke report server

#

Come privet

umbral zealot
dire obsidian
#

Guys

#

Anyone here with css knowledge?

pale vessel
#

yeah, i play some counter strike

dire obsidian
#

Okso

#

You know how change a <progress> bar colour?

dire obsidian
#

Thanks

#

Yeah i hate browsers compatibility

#

Alsocsspain

pale vessel
dire obsidian
#

And im just making a online audio player

#

Probably with the yt api to search for the audio, but i need a "volume var"

#

Also dark green and purple/white dont look pretty good

#

Thanks flazepe that is now flaze but with anime pfp

pale vessel
#

yeet

#

do not worry, i am still flazepe xd

delicate shore
#

I used a website builder as I was feeling lazy

#

How can I fix this issue

#

Any way I can over write existing CSS of page width

#

Like website builder made CSS in different folders

#

Is there any way I can do something in html file that it over writes the one in folders

vernal rivet
#

Probably js

midnight brook
#

How do I get the link of a rich presence asset?

#

I have the application ID and the image id

dark grove
#

Some help please? Trying to get my bot to delete its message but it just.. won't. Code:

                    .then(reaction => reaction.message.react('735903836727935098'))
                    .then(reaction => reaction.message.react('750759552542310410'))
                    .then(reaction => reaction.message.delete(5000))
                    .then(msg => console.log('Message Deleted!'))
                    .catch(err => console.error);```
#

everything works fine but it doesn't get deleted which is annoying

indigo flax
#

whos good with mongodb

pale vessel
#

idk man

#

just ask

midnight brook
#

def not me