#development

1 messages ยท Page 1034 of 1

opal plank
#

pack as in package?

strange trout
#

Making and publishing a package is not as hard as it seems

pure lion
#

Yes package

opal plank
#

an npm package?

pure lion
#

Say I just wanted to make a simple calculator package

#

Just to start off

opal plank
#

inside d.js? you could make a exported function

pure lion
#

No, in general

quartz kindle
#

if you want to write a package for another package, you have two options:

  1. require the original package in your package, add/remove/inject stuff, export the modified version
  2. create a function that does ^ and export it, and ask people so call the function and give it the original package, and have the function return the modified one
opal plank
#

constructor and classes is what i'd go for

coral stirrup
#

[socket.io]i want to send some data from my client only to my server, the other clients should not receive it until the server passes it to them. i found nothing on google, how would i handle this

opal plank
#

extend some classes from d.js and add on it

pure lion
#

What is the constructor constructor

#

Just new constructor?

quartz kindle
#

where? what context?

opal plank
pure lion
#

I'm trying to think of a context

opal plank
#

lets say you want to add calculate() under the message

quartz kindle
#

@coral stirrup use some sort of authentication

strange trout
#

For example

Structures.extend('Message', (Message) => {
    class RiceMessage extends Message {
        constructor(client, data, guild) {
            super(client, data, guild);
        }

        async ask(content, options) {
            if (typeof content !== 'string') {
                options = content;
                content = null;
            }
            const message = await this.channel.warn(content, options);

            return this.channel.permissionsFor(message.guild.me).has('MANAGE_MESSAGES')
                ? Util.awaitReaction(this, message)
                : Util.awaitMessage(this);
        }
    }

    return RiceMessage;
});

This would allow me to do message.ask('question')

pure lion
#

calculate.add(1, 7)

#

Say I wanted to do that

quartz kindle
#

the constructor block there is optional

opal plank
#

you'd need to learnt he things i sent above

quartz kindle
#

you can omit it

pure lion
#

Okay

opal plank
#

class extensions and constructors

pure lion
#

Alright I'll sleep on this and then decide

quartz kindle
#

use classes if you need to keep some sort of "state"

#

for example if you want to create a number, then add/remove stuff from this number, but always keep the number updated somewhere

#

otherwise if you just want to do some operation then forget the number, use functions

opal plank
#

isnt that related to how stateless bots work

quartz kindle
#

not exactly, not in this context at least

opal plank
#

i see

glossy elk
#
const events = fs.readdirSync("/home/container/src/events");
    events.forEach(event => {
    chokidar.watch(`/home/container/src/events/${event}`, {
        awaitWriteFinish: true
    }).on("change", (file) => {
        const commandName = basename(file, ".js")
        delete require.cache[require.resolve(`./events/${event}/${commandName}.js`)];
        client.events.delete(`/home/container/src/events/${event}/${commandName}.js`);
        const props = require(`/home/container/src/events/${event}/${commandName}.js`);
        const cmd = new props();
        client.events.set(commandName, cmd);
    
        client.on(commandName, cmd.run.bind(cmd, client));
        console.log(`${commandName} from ${event} reloaded.`)     

        });
    });``` this sets the event as much times as i edited it how do i make it only one time
quartz kindle
#

bots could be considered "stateless" if they are able to operate without caching

glossy elk
#

here is the npm package

opal plank
#

hmmm i see

quartz kindle
#

but inside the discord libraries, each individual object still needs to store some kind of state, so its never fully stateless

#

especially the websocket

opal plank
#

i wonder how slow it'd make the bot if it needed to request everytime a command is fired

#

i cant even picture how you'd do that though

quartz kindle
#

the problem wont be performance, it will be rate limits xd

opal plank
#

hmm that too

#

could use different instances to avoid that

quartz kindle
#

but most typical operations can be done without a request

opal plank
#

have a main file to distribute the tasks around to other files

#

hmmm though that'd need caching too

quartz kindle
#

for example the message event includes user and member information, so if you have no caches, you'd only need to request something, if you wanted to get channel or guild data

opal plank
#

yeah i cant picture a cache'less bot

#

would be using that cached data only while the data is being proccessed fair?

quartz kindle
#

im aiming to make all my bots pretty much cacheless

opal plank
#

that'd be fun to try actually

quartz kindle
#

djs-light is fully operational even with guild cache disabled for example

opal plank
#

i'd be interested in trying that later

quartz kindle
#

the only problem is that you will have no way of knowing how many guilds your bot is on

#

unless you have an integer stored to count it

#

or something

opal plank
#

could do a simple db for stuff saved on disk

quartz kindle
#

ye

opal plank
#

instead of running on ram

#

you'd be exchanging extra processing and disk storage in favor of ram

quartz kindle
#

could be pretty easy to just store numbers and statistics as integers, and not cache anything else

opal plank
#

though

#

i wonder

quartz kindle
#

you could then use guildCreate/Delete and channelCreate/Delete for example, to do guilds++/-- and channels++/-- lmao

opal plank
#

hmmm taht too

#

but thats not what im wondering

#

i forgot the term

#

you can use disk as ram

quartz kindle
#

swap?

opal plank
#

i think so

#

im wondering what'd be best, increase ram by using disk as it, or storing the cached data in a db while using disk

#

whichever uses less footprint

quartz kindle
#

swapping ram will most likely be bad for the entire process's performance

opal plank
#

theres that too

quartz kindle
#

while offloading data to a db will keep the process itself fast

#

i have an idea for a discord caching system

opal plank
#

'ive never tried swapping so im unsure about how it works

quartz kindle
#

but i dont really want to make yet another discord lib lol

opal plank
#

i still want to try making a lib, though its a bit far ahead from what i can do rn

quartz kindle
#

its not hard, at least at first

opal plank
#

lemme rephrase it.
A decent lib

#

lmao

quartz kindle
#

it gets annoying once you start dealing with uploading files and connecting to voice

opal plank
#

voice support might be a nono in my case, its poorly documented

quartz kindle
#

yeah i didnt get to that point either

#

i started making one and then shelved it

opal plank
#

i tried once mapping the video bit of the api, but didnt go too well

earnest phoenix
#

sorry to jump in but is their a way to send a channel link (example like #announcements ) in a embed with discord.js?

opal plank
#

kinda wanted to see how it works and if its possible for bots to connect to that endpoint

#

<# >

#

thats the format for channels

earnest phoenix
#

ok thanks

opal plank
#

<#IDHERE>

earnest phoenix
#

thanks

opal plank
#

np

earnest phoenix
#

i might just make a bot and put the src on github

#

but use a yaml file for config

#

to mess these people up

sudden geyser
#

why though

earnest phoenix
#

but why not

chilly bison
#

just use env

earnest phoenix
#

i use env

#

did u not read what i sent

opal plank
#

i despise environmental variables, a json for configs becomes a necessity after a short period

earnest phoenix
#

i also use json

#

but not for my token

opal plank
#

you usually shouldnt

#

why would you run multiple tokens on the same script?

round owl
#

To keep my accounts open

opal plank
#

why do you need multiple instances of the bot?

round owl
#

not for bots but for my own account

opal plank
#

d.js isnt for normal accounts

#

selfbotting isnt allowed

#

i knew this was smelling like raid bots/selfbots

chilly bison
#

@round owl js let Clients = []; let tokens = ["<token 1>", "<token 2>"]; for(var i = 0; i < tokens.length; i++){ let client = new Discord.Client(); client.login(tokens[i]); Clients.push(client); }

opal plank
#

@chilly bison not for bots but for my own account

#

he's running normal accounts

#

not bot accounts

#

selfbotting

quartz kindle
#

using your own account in bots might get you banned

round owl
#

Thank you @chilly bison ๐Ÿ™‚

opal plank
#

dont help selfbotting

#

@chilly bison why u think i didnt awnser right away?

chilly bison
#

@opal plank hey its ok if its bot accounts

#

the above code doesn't work with self-bots

opal plank
#

he said not for bots but for my own account

chilly bison
#

discord.js the login thing

#

doesn't work for user tokens

opal plank
#

you'd be surprised how easy d.js makes it so selfbot

chilly bison
#

?

#

no

#

you gotta install a npm thing

#

discord.js-selfbots or something

opal plank
#

both bots and users connect to the same gateway, the only difference is the endpoints each can touch

strange trout
#

You login the same way lol

amber fractal
#

Or use d.js v11...

#

Literally v11 works with self bots

#

Has a lot of now deprecated features that selfbots used

opal plank
#

he was asking for multiple instances logged into one script. It clearly smelled fishy, why would you help that?

#

it smells stronger of raid bots than a dead fish

amber fractal
#

Whats wrong with running multiple bots with the same code

opal plank
#

nromally you'd have instances running on different files or using smething like IPC to talk to eachother

amber fractal
#

Yes, but why make duplicates of the same code

#

Takes more space for no reason

strange trout
#

Steven, he said it wasn't for bots

opal plank
#

not for bots but for my own account

strange trout
#

It was for user accounts

opal plank
#

i specifically asked why beforehand to check if it was sketchy

#

if you give a reason for it, i'll help

#

but just handing out code for someoen to possible break tos?

#

no thanks

#

endorsing that is a big no no

amber fractal
#

Discord saint here

#

We werent endorsing it either

#

You can have legit reasons to run the same code for multiple bots

opal plank
#

yes, indeed

#

and i asked what he needed it for, there might be better options

earnest phoenix
#

hey, is there anyway I can mention roles in an embedded message in discord.py? cos i tried <@&roleid> and it didnt work

sudden geyser
#

Are you sure the role ID is valid and the role is in the same server you displayed in the embed in

#

You should be able to

earnest phoenix
#

@earnest phoenix you can't mention anything in an embed, no mention will work in an embed

#

facepalm oh wait you mean like actually mentioning it so it mentions the people that has the role or normal mention as it shows the role

#

?

stark terrace
#

Question for devs of larger bots (10k+ servers): any of you currently using djs and plan on moving away from it to a different lib? Or previously used to use djs but now using a different lib (ex. Eris)? I've been asking around getting opinions for the next major version of my bot

lyric mountain
#

No sane dev uses d.js past 500 servers

stark terrace
#

Okay that's what I've been hearing

#

And I know exactly why cause I've been having similar issues scaling

#

(memory management)

strange trout
#

I personally know a couple devs using discord.js both have 25k+ servers

stark terrace
#

I've been able to handle memory better though in some ways

strange trout
#

I'm support for @humble echo which uses discord.js v12 on over 41,000 servers

solemn latch
#

seen bots with over 2.5million users on djs

lyric mountain
#

User count is somewhat irrelevant

#

Since cache keeps a fraction of the total stored

strange trout
#

iara (the mod) has a bot in over 33k servers aswell

trim merlin
#

What's wrong with djs in lots of servers?

strange trout
#

discord.js eats up memory

trim merlin
stark terrace
#

memory is the main thing i've been hearing people left djs for after scaling

lyric mountain
#

I guess for that they basically disable d.js caching and implement their own cache

stark terrace
#

yeah

#

ik there is the discord.js-light lib which disables djs native heavy caching

strange trout
#

A lot of bigger bots modify their library to fit their needs

stark terrace
#

true

lyric mountain
#

"how much stuff does d.js cache?"
"yes"

stark terrace
#

i've been exploring different options, so i'm trying to get the best idea on how i should go forward with things

sick cloud
#

say i have a password string
what sort of regex would i need to check it has at least 1 number, at least 1 lower case letter and at least 1 upper case letter

stark terrace
#

as i've been planning for the next major version of my bot

#

so i'm trying to get the best advice from the best sources ya know

sick cloud
#

also - i used djs on my bot and it was on 40k, and it chewed up under 8gb, moved to eris, now 2gb

earnest phoenix
#

mudae is a trashy ass bot

stark terrace
#

mine is between 8-10GB

strange trout
#

Irrelevant @earnest phoenix

lyric mountain
#

say i have a password string
For uppercase: [A-Z]
For number: [0-9]
For lowercase: [a-z]

#

@sick cloud

#

Idk how to mix them tho

earnest phoenix
#

it isn't - developers were stupid and modified the lib i guess? they kept on ignoring ratelimits causing the bot to get api banned on several occasions

sick cloud
#

string.match(/[A-Z]/g)?

earnest phoenix
#

which just proves that not all large bots are necessarily good bots

lyric mountain
#

That'd check only for single-character uppercase letter

strange trout
#

There's tons of password regex on the internet

lyric mountain
#

So basically any word with at least one uppercase character would match

sick cloud
#

that's ok though

#

i can check sep

stark terrace
#

how is network bandwidth as well since you moved to eris? @sick cloud

lyric mountain
#

Now you just need to add the other 2 checks

sick cloud
#

@stark terrace too much because that's all my bot does, uses external apis and such. but its a bit better

#

also

    if (!password.match(/[A-Z]/g).length) return res.json({ success: false, error: `Password must have at least 1 uppercase character` });
    if (!password.match(/[a-z]/g).length) return res.json({ success: false, error: `Password must have at least 1 lowercase character` });
    if (!password.match(/[0-9]/g).length) return res.json({ success: false, error: `Password must have at least 1 numerical character` });

not the best but should work right

stark terrace
#

gotcha

#

i feel it would be the same for me

earnest phoenix
#

you can just

#

or the regex

#

you don't have to match it three times

#

|

mellow anchor
#

๐Ÿ˜

sick cloud
#

so

#

/[A-Z]|[a-z]|[0-9]/g

earnest phoenix
#

i think they have to be encapsulated with ()

#

test it on regexr

sick cloud
#

so put each [] group in a ()

earnest phoenix
#

yeah ig

#

oh nm you don't have to

#

the character set acts like an encapsulation because there's no extra regex

sick cloud
#

should only match the last one because it has all 3

lyric mountain
#

| stands for OR, doesn't it?

#

You gotta use AND

earnest phoenix
#

oh you want all of them to match

#

my bad

haughty night
#

&&

lyric mountain
#

& Ig

earnest phoenix
#

&

sick cloud
#

yeah i only want to let the password through if it has all 3

#

& doesnt work

earnest phoenix
#

wait

lyric mountain
#

Hm

#

Try putting a * after each group

#

Idk

sick cloud
#

no difference

lyric mountain
#

Try with ?

sick cloud
#

& is actual text

lyric mountain
#

Lul

stark terrace
#

thanks for the opinions y'all

sick cloud
#

oh i got it

lyric mountain
#

Look at the cheatsheet at the side

stark terrace
#

helps with my "research" for the next major version of my bot

sick cloud
lyric mountain
#

Oh

#

Nice

sick cloud
#

or not

lyric mountain
#

You could use ? After the asterisk I guess, it'd match the least amount of characters as possible

sick cloud
#

also i prefer to code things myself and learn if anyone considers telling me to just get one online

#

ok

#

nope

earnest phoenix
#

cant you just

#

[a-z0-9-.]

lyric mountain
#

That'd match all

sick cloud
#

matches them all

lyric mountain
#

Like, any character

sudden geyser
#

I don't think it would

earnest phoenix
#

oh

lyric mountain
#

Oh, just found something

earnest phoenix
#

you can use the conditional

lyric mountain
#

Try ^.*[A-Z].*[0-9].*[a-z].*$

restive pebble
#

is there any other way to change color in .md files rather than using html

earnest phoenix
#

no

restive pebble
#

thought so

lyric mountain
restive pebble
#

thx

lyric mountain
#

@sick cloud

#

Try that reg

sick cloud
#

ok

#

it does work

lyric mountain
#

Nice

earnest phoenix
#

why dont work?

#
 else if(command === 'testawait'){
      message.channel.send('testing')
      let filter = m => m.author.id === message.author.id;
      try{
      let msg = await message.channel.awaitMessages(filter ,{max: 1, time: 10000, errors:['time']})
      }
      catch(e) {message.channel.send(`Error ${e}`)}
      message.channel.send(`test: ${msg.first().content}`)
    }
#

v12

#

nvm

spare mirage
#

How can I make my bot play a mp3 file in a voice channel

summer torrent
#

@earnest phoenix rename e to e.message to see actual error

lyric mountain
#

Lavalink (or lavaplayer if you're using java) @spare mirage

#

There might be other audio libs out there

glossy elk
#

dum snipe

#

huh

#

@iron shuttle

#

weird

lyric mountain
glossy elk
#

oh

#

OH

#

fuck

#

i thought this was testing

distant bramble
#

if i want to add changing status

#

what is the best interval to put

#

10 secs

#

or ?

spare mirage
#

what do you mean?

distant bramble
#

like

#

status of the bot

spare mirage
#

yes

distant bramble
#

like playing with soething

spare mirage
#

just use setPrecense

distant bramble
#

it will change to some thing like playing catch

#

i know

#

i am asking the interval

#

to set it

spare mirage
#

What!?!?!?

distant bramble
#

i mean if iset it low it will considered api abuse

#

like it will change every 10 secs from playing something to >> playing minecraft

zenith terrace
#

Make them change around 10 seconds each

distant bramble
#

ok

#

thanks

opal plank
#

bad idea to do that btw

#

its not recommended to use the api for constantly changing status @distant bramble

#

though if you are going to, set it to at least 2 minutes or something

#

the general api rule is:
dont do stuff every x

distant bramble
#

ok

#

thanks

opal plank
#
@Danny automating the API in that way /is/ abuse. Automatically doing "X" every N is generally not a good idea. Where X could be posting a message, changing someone's nickname, renaming a role, changing a channel topic, etc... 

Generally bots should only react to user actions... 

Although, for very large N we generally don't care. But for small N, we do care. Think rainbow bots, etc....```
spare mirage
#

how do I make a custom prefix command?

#

Do I need a database?

marble geode
#

y

#

you need a database

#

i recommended mySQL

spare mirage
#

oki

opal plank
#

might be better to keep the prefixes on memory instead

solemn latch
#

reboots?

#

๐Ÿค”

marble geode
#

@opal plank you have instagram?? i need for test ig command ๐Ÿ˜„

opal plank
#

i do but i'd rather not share it

#

i only got one personal account

marble geode
#

oh ok

spare mirage
#

just use some famus duds instagram

marble geode
#

i not use instagram๐Ÿ˜„

spare mirage
#

nvm

opal plank
#

var

lyric mountain
#

Lol using a third party lib for levelling

earnest phoenix
#

why make it yourself when there's a npm package that's a literal dumpster fire to do it for you

opal plank
#

ikr, why code a bot when theres github and stackoverflow to copy code from

#

though, on a real note, you should probably use a database @spare mirage , most of the stuff i see here is simply replacing the database calls for methods

spare mirage
#

alright, I guess

opal plank
spare mirage
#

scared Justii noises

opal plank
#

this many lines

#

if you get stuck you can help

spare mirage
#

whats that command?

opal plank
#

i just dont endorse using pre-made code that its simple enough to be done

#

a is my prefix for admin commands

#

currency command

spare mirage
#

the blurred command :P

opal plank
#

acheck

spare mirage
#

ok

strange trout
#

Leveling isn't super hard to do

spare mirage
#

Can u give me a rough explanation of how it works?

lyric mountain
#

I use raw xp for calculating level

strange trout
#

Same

lyric mountain
#

level = Math.sqrt(xp / 100)

#

That's my formula

opal plank
#

this should give a rough idea

lyric mountain
#

Or xp = level ^ 2 * 100 for required xp calculation per level

opal plank
#

those are basic functions you'd want to have it handled, which is all done in that file, its almost the same as that lib you showed me

spare mirage
#

ahh I see

lyric mountain
#

Then I give 15 xp per message to users

#

The rest is up to you what will you use the levels for

opal plank
#

that should give you at least a rough idea on what you'll need

strange trout
#
/**
 * * Get XP required for a level.
 *
 * @param {number} level
 * @returns {number} xp required for level
 */
xpReq(level) {
    return 6 * level ** 2 + 80 * level + 100;
}

this is mine

opal plank
#

i purposefully hid the code, but you can see a bit how the structure is

lyric mountain
#

Note that there isn't a "better formula"

strange trout
#

Slightly based off MEE6's xp formula

lyric mountain
#

It really depends on how hard you want to be levelling

opal plank
#

indeed

earnest phoenix
#

it's hard to design a good system

lyric mountain
#

In my case, from 1 to 10 is quite fast, but 11 and above it starts to get a bit vertical

opal plank
#

the strcuture i showed is the bare bones behind it, the thing you'd want to get is the adding of the exp

earnest phoenix
#

you need to count in exponential growth

lyric mountain
#

Yep, that's my case

opal plank
#

i think i added a cap on mine, but thats cuz im storing it in int, not bigint

#

i dont plan on having exp/currency going above 8 digits long

#

doing math in bigint is annoying af

weary ridge
#

umm

earnest phoenix
#

you can mix exponential growth and add a cap where it starts linearly and then goes exponentionally again

#

you can also make it parabolical but that's not a good idea

sudden geyser
#

quadratic

lyric mountain
#

you can also make it parabolical but that's not a good idea
@earnest phoenix reaching vertical wall be like:

Level 5: 500xp
Level 6: 45764947xp

spare mirage
#

thats just mee6 level 9 to 10 lmao

restive pebble
#

hmm

ancient falcon
#

You should hard code it

#

Imo

#

Well to some extent

lyric mountain
#

Make it prime numbers * 100

restive pebble
#

bruh

#

hardcode imagine

lyric mountain
#

Insane xp-gaps during levelling

marble geode
#

someone gimme link to discord.js docs

#

@lyric mountain

torn ravine
#

is this good enough for my bot?

trim saddle
#

disabling cache helps

torn ravine
#

ah

opal plank
#

1.4gb? wtf

lusty quest
#

last time i saw this much RAM usage was when i had Enmap running

earnest phoenix
#

how come onclick only works once then i have to reload the page

unique shore
#

@earnest phoenix what is <% that for

#

if I just do

<button type="button" onclick="pressTest();">Click Me!</button>

it works multiple times

#

I'm just doing console.log('pressed')

earnest phoenix
#

ahh ok

#

@unique shore its ejs

#

not working

hazy sparrow
#
const { MessageEmbed } = require('discord.js')


module.exports = {
    name: 'userinfo',
    description: "This is to quickly get your **username** and ID without having to have dev mode , checking profile,getting the id",
    
    execute(message){
        const taggedUser = message.mentions.users.first();
        const embed = new MessageEmbed()
        
        .setTitle('User Information')
        .addField('User name:', taggedUser.username)
        .addField('Player ID', taggedUser.id)
        .setThumbnail(taggedUser.displayAvatarURL())
        .setColor(0x0000ff)
       
        
        
       message.channel.send(embed)

          
      if (!taggedUser)
      setTitle('User Information')
        .addField('User name:', message.author.username)
        .addField('Player ID', message.author.id)
        .setThumbnail(message.author.displayAvatarURL())
        .setColor(0x0000ff)



    }}
earnest phoenix
#

taggedUser.id.username

#

ยฏ_(ใƒ„)_/ยฏ

hazy sparrow
#

ok ty

pale vessel
#

did you tag a user?

#

bow pro, no

summer frigate
#

if(!tagUser){
const embed = new discord.MessageEmbed()
//Your Embed
message.channel.send(embed)
}

earnest phoenix
#
<button type="button" onclick="<%pressTest();%>">Click Me!</button>
#

only works once

#

then i gotta reload page

summer frigate
#

@earnest phoenix taggedUser.id.username isnโ€™t a thing

earnest phoenix
#

why else do you think i shrugged

hazy sparrow
#

.

summer frigate
#

if(!taggedUser){
const embed = new discord.MessageEmbed()
//Your Embed
message.channel.send(embed)
}

@hazy sparrow

#

Oh wait

pale vessel
#

please give him context

summer frigate
#

Itโ€™s taggedUser

unique shore
#

I still don't understand why you're using <% or where you're using this

pale vessel
#

that's ejs

unique shore
#

ah

#

right

#

sorry me dumb and tired

#

well I've never used ejs so I have no idea why this simple thing wouldn't work, but can you do an event listener instead?

torn ravine
#

erela.js?

brisk anvil
#

Botum onaylanana kadar aรงฤฑk olmasฤฑ mฤฑ lazฤฑm

hazy sparrow
#

when i mentio someone it works

#

when i dont

#

it says this

earnest phoenix
#

Because no one is mentioned

#

You said it x)

#

First, message with mentioned user, second, if not mentioned, user itself

#

A big problem x)

hazy sparrow
#

how?

earnest phoenix
#

It's your code x)

hazy sparrow
#

i want it to display the details of the author if no user is mentioned

earnest phoenix
#

Put those two blocks in different conditions. The first if someone is mentioned and the second if not

hazy sparrow
#

ok

earnest phoenix
#

๐Ÿ˜

hazy sparrow
#

you mean a else if stament outside the execute(message){}

#

@earnest phoenix

earnest phoenix
#

Not outside, inside

hazy sparrow
#

ok

earnest phoenix
#

yo !

hazy sparrow
#

so a if statment or else if

earnest phoenix
#

If taggedUser
Information about tagged user
else
Information about author himself

hazy sparrow
#

oh

#

got it

earnest phoenix
#

X)

#

@earnest phoenix yo ๐Ÿ˜

spare mirage
#

yo

earnest phoenix
#

Yo

hazy sparrow
#

so would this work

    execute(message){
        const taggedUser = message.mentions.users.first();
        const embed = new MessageEmbed()
        
        if (taggedUser){

        setTitle('User Information')
        .addField('User name:', taggedUser.username)
        .addField('Player ID', taggedUser.id)
        .setThumbnail(taggedUser.displayAvatarURL())
        .setColor(0x0000ff)
       
        
        
       message.channel.send(embed)
       
        }     
        if (!taggedUser)
        setTitle('User Information')
        .addField('User name:', message.author.username)
        .addField('Player ID', message.author.id)
        .setThumbnail(message.author.displayAvatarURL())
        .setColor(0x0000ff)
      


    }}
#

@earnest phoenix

earnest phoenix
#

Yeap

hazy sparrow
#

ok

#

tysm

earnest phoenix
#

Tysm??

hazy sparrow
#

thank you so much

median star
#

same error

#

@bot.command()
async def problem(ctx):
print('hi')
await ctx.send('are you sure you want a staff to join and help, you have 30 seconds to react. REACT WITH ๐Ÿ‘')
reaction, user = await bot.wait_for("reaction_add", timeout=

earnest phoenix
#

๐Ÿ˜

#

@median star did the message 'hi' has been print?

median star
#

nope

#

not at ALLl

#

and im still getting this

#
  File "main.py", line 52
    async def problem(ctx):
          ^
SyntaxError: invalid syntax
๎บง 





earnest phoenix
#

...

#

Always debugging and watch logs!!! X)

hazy sparrow
median star
#

;-;

#

logs

#

are

#

SHOWING THATtatata

earnest phoenix
#

@hazy sparrow see what you've done with your code

unique shore
#

it's .setTitle

hazy sparrow
#

oh

unique shore
#

I assume it's an embed

hazy sparrow
#

yea

#

these all appear when i put the dot

earnest phoenix
#

@median star yeah ๐Ÿ˜… but you have the error now, I think, it's not the code you're showing is the problem, but the upper code

unique shore
#

make sure you're putting the dot in the right place

#

are you using discord js?

median star
#

???

#

oh

#

oh

hazy sparrow
#

yea

#

d.js

earnest phoenix
#

@hazy sparrow you want to call functions from nothing...

median star
#

I FEEL SO FUMB

#

DUMB

unique shore
#

check that

#

embeds

hazy sparrow
#

i read the whole thing

unique shore
#

well if you copy/paste that embed it should absolutely work

hazy sparrow
#

wait

unique shore
#

the code example

hazy sparrow
#
const { MessageEmbed } = require('discord.js')


module.exports = {
    name: 'userinfo',
    description: "This is to quickly get your **username** and ID without having to have dev mode , checking profile,getting the id",
      

    execute(message){
        const taggedUser = message.mentions.users.first();
        const embed = new MessageEmbed()
        
        if (taggedUser){

        .setTitle('User Information')
        .addField('User name:', taggedUser.username)
        .addField('Player ID', taggedUser.id)
        .setThumbnail(taggedUser.displayAvatarURL())
        .setColor(0x0000ff)
       
        
        
       message.channel.send(embed)
       
        }     
        if (!taggedUser)
        .setTitle('User Information')
        .addField('User name:', message.author.username)
        .addField('Player ID', message.author.id)
        .setThumbnail(message.author.displayAvatarURL())
        .setColor(0x0000ff)
      


    }}

earnest phoenix
#

@median star I can't without more information... And I think you need to review the entire syntax around the line 52,it will give you the problem you searching for

hazy sparrow
#

this is my whole userinfo code

unique shore
#

nope, you need to add the "embed"

earnest phoenix
#

@hazy sparrow you need to call functions from the right point...

unique shore
#

embed.setTitle()

hazy sparrow
#

oh i see

earnest phoenix
#

Exactly!!!

#

๐Ÿ˜ญ๐Ÿ˜ญ

unique shore
#
const exampleEmbed = new Discord.MessageEmbed().setTitle('Some title');

if (message.author.bot) {
    exampleEmbed.setColor('#7289da');
}
#

like so ๐Ÿ™‚

#

and just add stuff to it

mild flower
#

How can I make the bot ignore pinned messages when bulk deleting?

unique shore
#

hmm discordjs?

mild flower
#

yes

hazy sparrow
#

but now the bot wont do anything when i dont mention anyone

unique shore
#

there probably is a "pinned" value, would have to check the docs

hazy sparrow
#

not even a console error

mild flower
#

i cant find it in the docs

earnest phoenix
#

@hazy sparrow what's your code now?

hazy sparrow
#

wait

#
const { MessageEmbed } = require('discord.js')


module.exports = {
    name: 'userinfo',
    description: "This is to quickly get your **username** and ID without having to have dev mode , checking profile,getting the id",
      

    execute(message){
        const taggedUser = message.mentions.users.first();
        const embed = new MessageEmbed()
        
        if (taggedUser){

        embed.setTitle('User Information')
        .addField('User name:', taggedUser.username)
        .addField('Player ID', taggedUser.id)
        .setThumbnail(taggedUser.displayAvatarURL())
        .setColor(0x0000ff)
       
        
        
       message.channel.send(embed)
       
        }     
        if (!taggedUser)
        embed.setTitle('User Information')
        .addField('User name:', message.author.username)
        .addField('Player ID', message.author.id)
        .setThumbnail(message.author.displayAvatarURL())
        .setColor(0x0000ff)
      


    }}

earnest phoenix
#

You didn't send the embed

hazy sparrow
#

ohhh

#

im so dumb

earnest phoenix
#

X)

unique shore
#

lol, you miss stuff sometimes, it happens

#

just gotta check twice

#

or three times ๐Ÿ˜›

earnest phoenix
#

๐Ÿ‘

hazy sparrow
#

thank you guys

earnest phoenix
#

No problems ๐Ÿ‘

unique shore
#

@mild flower try console logging a message and see if there's a "pin" option

#

or something like that

mild flower
#

hmm

hazy sparrow
#

another problem

#

it replys 2 times

earnest phoenix
#

You have launched it 2 times maybe ๐Ÿค”

unique shore
#

2 instances running

#

prolly

hazy sparrow
#

how do i fix it?

earnest phoenix
#

Prolly?

median star
#

it works

unique shore
#

"probably"

#

kill the task and restart it

#

@median star how?

median star
#

yea

unique shore
#

what did you change?

hazy sparrow
#

still 2 times

#

still 2 times*

unique shore
#

like you Pog

hazy sparrow
#

what

earnest phoenix
#

๐Ÿ˜‚

unique shore
#

@mild flower if you don't find a pin option in the messages then just fetch all the pinned messages in that channel channel.messages.fetchPinned();, and then check that the message you're deleting is not a pinned message

mild flower
#

eh

unique shore
#

you're not running it locally and on a server or something like that?

#

no extra node tabs open?

pure lion
#

@hazy sparrow close vsc

hazy sparrow
#

ok?

earnest phoenix
#

X)

pure lion
#

Then open it again

#

X)

hazy sparrow
#

still not working

#

@pure lion

pure lion
#

h

earnest phoenix
#

You have launched your bot whit cmd too @hazy sparrow?

hazy sparrow
#

wut?

pure lion
#

Check task manager

hazy sparrow
#

nope

#

not working

lusty quest
#

node?

earnest phoenix
#

Maybe

unique shore
#

always sending twice? that's weird

pure lion
#

Do you have an eval command?

unique shore
#

are your if statements working properly?

pure lion
#

eval client.destroy()

unique shore
#

destroy monkaMega

pure lion
#

Then see if that's the error

earnest phoenix
#

Destroy ๐Ÿ˜‚

#

Interesting ๐Ÿ˜‚

pure lion
#

Why is that funny

hazy sparrow
#

this is the whole code

const { MessageEmbed } = require('discord.js')


module.exports = {
    name: 'userinfo',
    description: "This is to quickly get your **username** and ID without having to have dev mode , checking profile,getting the id",
      

    execute(message){
        const taggedUser = message.mentions.users.first();
        const embed = new MessageEmbed()
        
        if (taggedUser){

        embed.setTitle('User Information')
        .addField('User name:', taggedUser.username)
        .addField('Player ID', taggedUser.id)
        .setThumbnail(taggedUser.displayAvatarURL())
        .setColor(0x0000ff)
       
        
        
       message.channel.send(embed)
       
        }     
        if (!taggedUser)
        embed.setTitle('User Information')
        .addField('User name:', message.author.username)
        .addField('Player ID', message.author.id)
        .setThumbnail(message.author.displayAvatarURL())
        .setColor(0x0000ff)
      
        message.channel.send(embed)

    }}

pure lion
#

Okay

#

Message embeds are a long string of methods

hazy sparrow
#

ok?

pure lion
#

.setTitle().addField() etc

#

You don't need to do embed.<property>

hazy sparrow
#

so just .setTitle?

unique shore
#

no,you definitely need that, I don't understand what shitdev is trying to say

hazy sparrow
#

same

#

so what do i do

unique shore
#

all commands run twice? like, even a !ping?

hazy sparrow
#

no

#

only this

unique shore
#

ah I see the issue

hazy sparrow
#

and only if i mention someone

#

else it works fine

unique shore
#

the second if doesn't have brackets

hazy sparrow
#

it does?

#

if (!taggedUser)

#

oh you mean

#

the {}

unique shore
#

yeah

earnest phoenix
#

I haven't see that ๐Ÿ˜ญ๐Ÿ˜ญ

hazy sparrow
#

it finally works

earnest phoenix
#

The brackets are extremely important when you do else if statement

unique shore
#

haha there you go

hazy sparrow
#

ty erick

unique shore
#

np

hazy sparrow
#

another question

#

got do i get the roles of a user

#

like dyno does

earnest phoenix
#

So not user

hazy sparrow
#

guildmember

earnest phoenix
#

You need to get it as member

#

Or guild member x)

hazy sparrow
#

how?

earnest phoenix
#

And there is fonction that I don't remember

hazy sparrow
#

;-;

earnest phoenix
#

But see the doc

#

It's written o' it

hazy sparrow
#

which docs

earnest phoenix
#

On Google ๐Ÿ˜

unique shore
#

member.roles.cache

hazy sparrow
#

ty

surreal notch
#

from 50 mins this is coming

#

my bot is not loading

#

ยฏ_(ใƒ„)_/ยฏ

restive pebble
#

Glitch is gay

surreal notch
#

ik

restive pebble
#

Yes

#

So

surreal notch
#

but it is easy\

restive pebble
#

Make another project

surreal notch
#

i did 4 project

restive pebble
#

Or stay on faith

#

Yes just pray

surreal notch
#

can i host on vsc?

#

for testing only

restive pebble
#

It is just a code editor

surreal notch
restive pebble
#

U can host on ur pc

surreal notch
#

how

restive pebble
#

Using node

surreal notch
#

i have node

#

but i dont know how

restive pebble
#

Open project in vsc

#

Make a terminal and start

surreal notch
#

ok

#

w8

unique shore
#

your main file, the name of it?

#

node mainfile.js

restive pebble
#

Bruh

unique shore
#

there, you started a server

#

node app.js

#

node whateverit'scalled.js

#

and the bot loads

surreal notch
#

how to start in terminal

restive pebble
#

How do u start terminal?

surreal notch
#

i have made a project server.js and pasted file there

restive pebble
#

node server.js lol

#

Lol

surreal notch
restive pebble
#

Yes type

#

Lol

surreal notch
#

ยฏ_(ใƒ„)_/ยฏ

#

what to type

restive pebble
#

node server.js lol
@restive pebble

surreal notch
#

ok

#

lol

restive pebble
#

Remove lol

surreal notch
#

lol

restive pebble
#

Lol

unique shore
restive pebble
#

Where

unique shore
#

in the terminal

restive pebble
#

Is it js or py?

opal plank
#

running py on node

surreal notch
#

js

#

lol

opal plank
#

big yikes

surreal notch
restive pebble
#

Ok

unique shore
#

uh, ok

restive pebble
#

u can run py on glitch tho

opal plank
#

node server.js

#

@surreal notch

surreal notch
restive pebble
#

Hmmm

opal plank
#

thats it

surreal notch
#

now

#

bot not started lel

restive pebble
#

But it is closed

opal plank
#

you put stuff inside server.js?

#

on ready event

restive pebble
#

It means it's not listening

#

To events

surreal notch
#

i did

opal plank
#

any type of console?

lusty quest
#

he uses py if i see it correctly

opal plank
#

show code on ready event

surreal notch
#

client.on("ready", () => {

#

console.log("Bot was logged in"); /

opal plank
#

yeah, thats just listener

#

whats the file name again?

lusty quest
restive pebble
#

show code bruh

opal plank
#

server.js?

surreal notch
#

yes

opal plank
#

put code here

#

just before ready

surreal notch
opal plank
#

no need for anything afterwards

surreal notch
#

ok

#

ik

#

@opal plank

opal plank
#

wheres the login?

restive pebble
#

U are not logging

surreal notch
#

it is there

opal plank
#

client.login(token)

restive pebble
#

At last

surreal notch
#

but i didn't shared

#

ยฏ_(ใƒ„)_/ยฏ

opal plank
#

bottom?

restive pebble
#

Yeah ik

unique shore
#

yeah why would he share the login lol

opal plank
#

just remove the token part

surreal notch
opal plank
#

but keep it there so i have an idea

earnest phoenix
#

Code:

});

bot.on("message", message => {
  conx(bot, message);
  if (message.content.startsWith(bot.prefix)) {
    let args = message.content
      .substring(bot.prefix.length)
      .trim()
      .split(/ +/g);
    let black = new (require("megadb")).crearDB("blacklist")
    if(black.has(message.author.id) && message.content.startsWith(bot.prefix)) return message.channel.send("You are blacklisted.")
    let cmd = bot.commands.get(args[0].toLowerCase());
    if (cmd) cmd.run(bot, message, args);
  }
});```
**Errror:** "conx" is not defined.

Can someone fix this?
opal plank
#

aight perfect

surreal notch
unique shore
#

define conx

opal plank
#

@earnest phoenix conx is not defined

restive pebble
#

Lol

earnest phoenix
#

uhm

opal plank
#

actually

#

thats py

earnest phoenix
#

Obviously.

opal plank
#

not my area

earnest phoenix
#

I mean

#

iike

#

How do I fix it?

opal plank
#

actually

#

wtf

surreal notch
#

@opal plank now

opal plank
#

conx

#

wtf

earnest phoenix
#

How do I define it?

opal plank
#

isnt that py?

#

@surreal notch holdon

restive pebble
#

Is a function?

surreal notch
#

ok

opal plank
#

nothing is being logged

#

add console.log('Im online!');

restive pebble
#

U are not logging
@restive pebble

surreal notch
#

client.on("ready", () => {
console.log("Bot was logged in");

opal plank
#

he didnt share that bit

surreal notch
#

it is already there

restive pebble
#

Ok

opal plank
#

thats not in the code you sent me though

#
client.on("ready", () => {
client.user.setActivity(`#help`, {type: "PLAYING"}); 
});```
#

this is what you sent me

surreal notch
#

ok

#

so now

opal plank
#

thats why i said, post the whole thing without the token

#

keep the client.loging()

surreal notch
#

OkK

opal plank
#

just remove the token from it

surreal notch
#

everything is correct

opal plank
#

if everything was correct it be working

restive pebble
#

U cloned from glitch?

surreal notch
#
const client = new Discord.Client();
const prefix = "#"

client.on("ready", () => {
client.user.setActivity(`s!help | s!nitro`, {type: "PLAYING"}); 
});

const embed = new Discord.MessageEmbed()

client.on("message", message => {
  if (message.content.startsWith(`${prefix}updates minecraft`)) {
    const help = new Discord.MessageEmbed()
      .setFooter(
        `command by ${message.author.username}`,
        message.author.avatarURL
      )
      .setFooter("MineCraft Updates Java")
      .setTimestamp()

      
      .setColor("#FF4500")
      .setAuthor("Help Commands")
      .setDescription(
        "1.16, the first release of the Nether Update, is a major update to Java Edition announced at MINECON Live 2019[1] and released on June 23, 2020.[2] This update overhauls the Nether by adding four new biomes, four new mobs (the piglin, hoglin, zoglin, and strider), and a multitude of new blocks, including many variants of blackstone as well as the respawn anchor used to set the player's spawnpoint in the Nether. It also adds a new netherite tier of equipment, obtained through ancient debris found rarely throughout the Nether."
);
    message.channel.send(embed);
  }
});


client.on("error", err => console.log(err));
client.on("ready", () => {
  console.log("Bot was logged in"); // Output a message to the logs.
client.login("u think i m nub lol")
});
opal plank
#

oof

surreal notch
opal plank
#

client.on("ready", () => {
client.user.setActivity(s!help | s!nitro, {type: "PLAYING"});
});

#

client.on("ready", () => {
console.log("Bot was logged in"); // Output a message to the logs.

#

twice

#

you have listeners on the same event twice

surreal notch
#

client.user.setActivity(s!help | s!nitro, {type: "PLAYING"}); is for status

opal plank
#

merge them into one

surreal notch
#

ok

#

done

#
client.user.setActivity(`s!help | s!nitro`, {type: "PLAYING"}); 
console.log("Bot was logged in");
});```
restive pebble
#

Run lol

opal plank
#

yes, now try it

#

node server.js

surreal notch
#

nope

#

not worked

restive pebble
#

Yes it still dosent matter

surreal notch
restive pebble
#

I have like 4 ready events

surreal notch
#

yea

restive pebble
#

Still it runs

surreal notch
#

but then also

restive pebble
#

Hmmm

surreal notch
#

it is not running

opal plank
#

why add 4 different listeners?

#

holdon

restive pebble
#

Once I used glitch

#

It corrupts ur file

surreal notch
#

Ookkk

restive pebble
#

Don't directly clone

surreal notch
#

now tell me why my bot is not running

#

then

restive pebble
#

Did u changed the library?

opal plank
#
const Discord = require("discord.js");
const client = new Discord.Client();
client.on("ready", () => {
  console.log("Bot was logged in"); // Output a message to the logs.
client.login("u think i m nub lol")
});```
run this
#

i wanna check something

earnest phoenix
#

Can someone write me a command to tell how many servers my bot is in

opal plank
#

no

#

no spoonfeeding

restive pebble
#

Inisde ready

#

Event

opal plank
#

oh, right

restive pebble
#

Yea

opal plank
#
const Discord = require("discord.js");
const client = new Discord.Client();
client.on("ready", () => {
  console.log("Bot was logged in"); // Output a message to the logs.
});
client.login("u think i m nub lol")```
run this
restive pebble
#

No spoonfeeding dude

surreal notch
#

me?

restive pebble
#

None will write cmds for u

#

No that one

opal plank
#

the other guy

restive pebble
#

Yes

opal plank
#

yeah pretty sure its no a dir issue

#

i didnt see the login being inside the event

restive pebble
#

I think he changed the library

opal plank
#

Ultron, move the client.login outside of the event

earnest phoenix
#

My music bot keep giving me leaving the voice channel and this is in the console

Error [VOICE_CONNECTION_TIMEOUT]: Connection not established within 15 seconds.

surreal notch
#

it is outside

opal plank
#

its inside

restive pebble
#

Restart

#

The bot

#

If still dosent work

#

Ur ram is not enough then

unique shore
#

Can someone write me a command to tell how many servers my bot is in
the link to add the bot to a channel tells you that? or are you trying to flex and put that on a website or something?

opal plank
#

the code you gave me is inside the ready event

restive pebble
#

Hmmmm

opal plank
restive pebble
#

Mhm

opal plank
#

client login is inside the event emitter that only happens when you login

#

see the issue?

surreal notch
#
const client = new Discord.Client();

const prefix = "#"

client.on("ready", () => {
client.user.setActivity(`s!help | s!nitro`, {type: "PLAYING"}); 
console.log("Bot was logged in");

});

const embed = new Discord.MessageEmbed()

client.on("message", message => {
  if (message.content.startsWith(`${prefix}updates minecraft`)) {
    const help = new Discord.MessageEmbed()
      .setFooter(
        `command by ${message.author.username}`,
        message.author.avatarURL
      )
      .setFooter("MineCraft Updates Java")
      .setTimestamp()

      
      .setColor("#FF4500")
      .setAuthor("Help Commands")
      .setDescription(
        "1.16, the first release of the Nether Update, is a major update to Java Edition announced at MINECON Live 2019[1] and released on June 23, 2020.[2] This update overhauls the Nether by adding four new biomes, four new mobs (the piglin, hoglin, zoglin, and strider), and a multitude of new blocks, including many variants of blackstone as well as the respawn anchor used to set the player's spawnpoint in the Nether. It also adds a new netherite tier of equipment, obtained through ancient debris found rarely throughout the Nether."
);
    message.channel.send(embed);
  }
});


client.on("error", err => console.log(err));

client.login("lel")
;
#

this is new

#

one

opal plank
#

that should be fine now

#

though i prefer to put the login before the ready event to chain it

#

but thats just visual

earnest phoenix
#

Ur ram is not enough then
@restive pebble rip i guess i donโ€™t have enough ram

restive pebble
#

Yes

surreal notch
#

I have 8gb

#

ยฏ_(ใƒ„)_/ยฏ

restive pebble
#

How much ram tho

unique shore
#

you need ram for voice channel? what?

#

am lost

restive pebble
#

Bruh

surreal notch
#

||confusion goes around||

restive pebble
#

To play

#

A music

split hazel
#

you technically need available memory for every operation you do

unique shore
#

well of course

#

I didn't word it properly

#

takes a lot of ram?

restive pebble
#

If u don't have enough ram left

#

If bot is running in many servers

#

It might be the issue of ram

unique shore
#

right, makes sense

surreal notch
#

||why my bot is not on9||

opal plank
#

**i told you **

surreal notch
#

||what||

opal plank
#

read above

restive pebble
#

Stop sending like that

split hazel
#

I'm not certain if that's how music bots work since never made one properly myself, but I believe the music buffer remains in memory until the dispatch is over

restive pebble
#

That spoiler tag

surreal notch
#

ok

earnest phoenix
#

My bot is running on 250 guilds and hosting on repl.it cause I have no money

#

So thatโ€™s why

restive pebble
#

Yea

unique shore
#

dang

restive pebble
#

Yes

unique shore
#

yeah ok makes sense

restive pebble
#

It completely ram issue

unique shore
#

ask for donations lul

restive pebble
#

I gave two options tho

#

Restart

unique shore
#

how much ram would you need for that?

restive pebble
#

For?

unique shore
#

250 guilds music bot

surreal notch
#

@opal plank done

#

still

restive pebble
#

Hmmmm

opal plank
#

tryitansee

surreal notch
#

not

restive pebble
#

4 to 6

#

Ig

surreal notch
#

i did

restive pebble
#

Is enough

opal plank
#

send new code

unique shore
#

yeah ok a decen amount

restive pebble
#

Except the music code

astral yoke
#

im trying to use a new host so i used my packages and im getting this error how would i fix this Error: The module '/home/container/node_modules/rex.db/node_modules/better-sqlite3/build/Release/better_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 72. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`).

split hazel
#

With enough effort your bot doesn't have to use much memory

restive pebble
#

Yes

#

Dude

#

Rebuild

astral yoke
#

yes

#

dude

restive pebble
#

node-gyp rebuild

astral yoke
#

that dosent work with my host

surreal notch
#
const client = new Discord.Client();
const prefix = "#"

client.login("nub")
client.on("ready", () => {
client.user.setActivity(`s!help | s!nitro`, {type: "PLAYING"}); 

});
console.log("Bot was logged in");
astral yoke
#

yes

#

dude

#

that dosent work for my host

#

dude

unique shore
#

okok chill

restive pebble
#

Bruh

#

Then switch back to previous version

#

Of node

astral yoke
#

i never switched

restive pebble
#

U are in 12

opal plank
#
const Discord = require('discord.js');
const client = new Discord.Client();

client.login('nub');
client.on('ready', () => {
  client.user.setActivity(`s!help | s!nitro`, { type: 'PLAYING' });
  console.log('Bot was logged in');
});```
#

this

split hazel
#

then it must've been upgraded against your will

restive pebble
#

And it was compiled for 10

opal plank
#

run that and make sure to save

#

@surreal notch

unique shore
#

forced upgrades ๐Ÿ˜ฎ

surreal notch
#

I did

astral yoke
#

so how do i switch back what can i do in my package json zoomeyes

restive pebble
#

engines

split hazel
#

Do you have access to the console?

astral yoke
#

yeah i do but i cant like run in it

#

its a bug rn

split hazel
#

You don't have to necessarily downgrade too if you can rebuild

unique shore
#

oh

restive pebble
#

"engines":{
"node":"10.x"}

astral yoke
#

okay wait so if i have something like this in package.json what would i need to have it as cause i used to have this in it

    "node": "^10.20.1"
  },```
unique shore
#

you'll need to be able to use the console so, wait till the bug is fixed?

restive pebble
#

did u downgrade?

astral yoke
#

i mean npm rebuild and shit wouldnt work i tried that on glitch before moving to a better place

restive pebble
#

Glitch is gay

astral yoke
#

it was erroring like that with "engines": { "node": "^10.20.1" }, on it so i just took it off and got the same error

#

exactly

restive pebble
#

Use 12.x

astral yoke
#

so just put 12.x?

restive pebble
#

Yeah

astral yoke
#

"engines": {
"node": "^12.x"
},

restive pebble
#

It automatically uses latest

#

Yes

#

If ur node modules were compiled in v12 then only it would work

#

npm unistall

#

And install again

pure lion
#

Or just npm install

restive pebble
#

bruh

#

It will only update

earnest phoenix
#

Glitch is gay
@restive pebble what do you mean?

pure lion
#

I'm too lazy to scroll up but okay fine

restive pebble
#

Glitch is bad host

pure lion
#

^^^^^^

earnest phoenix
#

๐Ÿ‘€

pure lion
#

Btw boeing what do I need to play SoundCloud

restive pebble
#

Play from yt dude

pure lion
#

nO

restive pebble
#

Search for some packages

pure lion
#

oack