#development

1 messages Β· Page 1304 of 1

opal plank
#

py i assume

drifting wedge
#

im the pie guy

solemn leaf
#

@earnest phoenix Can't I do b:hover because b is a button?

clever thunder
#

node aint working

solemn latch
#

rip node

opal plank
#

i guess that?

clever thunder
#

windows says it might harm my comp

drifting wedge
#

wow this is like google

#

grea

#

t

opal plank
#

imagine not doing your research beforehand

drifting wedge
#

why google when you have ppl

opal plank
drifting wedge
#

imagine not doing your research beforehand
@opal plank i did tho

#

i just use firefox so thats why

#

lol

opal plank
#

i legit just looked for setTimeout on py

#

thats it

solemn latch
#

firefox has google πŸ€”

drifting wedge
#

its a jokeeeeeeeeee

solemn latch
#

bing is where its at tho

#

got free gift cards for using bing

drifting wedge
#

that firefox is bad... ok imma leave

clever thunder
#

@clever thunder make sure you're on the right site, and then just tell windows to bug off
@earnest phoenix here ill show a pic

solemn latch
#

yeahhh

drifting wedge
#

got free gift cards for using bing
@solemn latch how do i open google bing?

solemn latch
#

goog.bing

drifting wedge
#

any1 else saw it?

#

its like a r/talesfromtechsupport vid

opal plank
#

im losing braincells ngl

solemn leaf
#

Okay I tried

solemn latch
#

i belive in you erwin

terse quest
#

hello

solemn leaf
#
        b img:hover {
            display: none;
            background-image: url("https://images-ext-2.discordapp.net/external/zkNg1ZMJYuVxB9O56tKKCw6ZWJaz6kWHinJHpT3c_m8/%3Fv%3D1/https/cdn.discordapp.com/emojis/731893936217653301.png");
        }
clever thunder
terse quest
#

im waiting for my bot to get accepted

solemn latch
#

click more info

opal plank
clever thunder
#

i chose the LTS

solemn latch
#

LTS just means long term support

#

generally more stable

solemn leaf
#

so I should display: none !important;

#

my brain is expanding

#

you didnt see that

clever thunder
#

ysy its working now

shrewd glen
#

i dont really have anything

#

i could do a foxy update

clever thunder
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaand fuck

shrewd glen
#

what?

clever thunder
#

its not loading

shrewd glen
#

no i thing i already did a foxy update

#

ya i did

clever thunder
#

uh ok

opal plank
shrewd glen
#

uh

solemn leaf
#

i keep tryin

clever thunder
#

What could possibly go wrong Erwin /s
@earnest phoenix huh what could go wrong..

shrewd glen
#

so do you have to have your bot verified to get the bot dev role?

solemn leaf
#

I hover my mouse over the image

#

and it doesn't change

#

wheat else youw anrt

clever thunder
#

im so fucking stupid

#

.env extensions

solemn leaf
#
<p id="createdby">Created By:
                            
                            
                            
                            
                            <b><a href="/user/485987127809671168">
                                    <img src="https://images.discordapp.net/avatars/485987127809671168/a_bdea871bbe8c1d9ecba39be1d665206a.png">
                                    <span>
                                        γ€β†œπ’œπ“€π’Ύβ†γ€‘<i>#
                                            9470</i></span>
                                    
                                    
                                    
                                </a></b>
                            
                            
                            
                            
                            

                        </p>
clever thunder
#

so all i need rn is node huh

#

well ima go for now

solemn latch
#

@earnest phoenix are you googling all the answer still for him?

#

πŸ€·β€β™‚οΈ but he can do this easily himself

shrewd glen
#

honestly i hate seeing "made with bot ghost" in my bots status

solemn leaf
#

so you want me to

#
background-size: auto; 
width:0px; 
height: 0px;
shrewd glen
#

its annoying

opal plank
#

i cannot fucking believe this

shrewd glen
#

and i need botghost premuim to change the status hacking the site doesnt work

#

so im stuck with the status

solemn latch
#

did ya get it @opal plank

opal plank
#

worked first time

solemn latch
#

AY

opal plank
#

that complicated mess actually worked first time

solemn latch
#

best feeling

opal plank
#

bruh

#

legit

solemn leaf
#

2 problems

opal plank
#

and promises are beign re-emitted too

solemn leaf
opal plank
#

lets try multiple channels

solemn leaf
#

@earnest phoenix IT WORK

opal plank
#

OMG YES

#

lets try a very non existent channel

#

hmmm, thats borked

solemn latch
#

so close

opal plank
#

i guess it didnt work flawlessly first time

#

sad dev noises

shrewd glen
#

k

solemn leaf
#

@earnest phoenix How can I make the button the whole hover?

#

would it be

#

b:hover > img {

opal plank
#

ah, i forgot to await it

#

lets see if it wurks now

shrewd glen
#

k

solemn leaf
#

so I was right?

opal plank
#

@earnest phoenix i do

#

i code in typescript mainly

solemn leaf
#

b:hover, img {}

opal plank
#

its pretty dope init?

#

its not that

#

i made a promise

#

but didnt wait for its conclusion

#

it wasnt even showing it

faint prism
#

@pure lionIf you need any help conceptualizing LMC. Let me know. I also have the next document that moves away from the LMC terminology and replaces it with registers. PC, IR, MAR and MDR, Accumulator (General-purpose register)

opal plank
#

dont you hate when you coded your shit correctly but named the variable incorrectly?

solemn leaf
opal plank
solemn leaf
#

My mouse isn't on the button

faint prism
#

dont you hate when you coded your shit correctly but named the variable incorrectly?
@opal plank JS problems mmLol

opal plank
#

it would

#

cuz im using it and it did lol

#

its an event with any implicity

#

its IPC

#

not when you dealing with IPC events

#

you can emit anything

solemn leaf
#

Zane

opal plank
#

indeed

#

there are too many events for me to handle

solemn leaf
#

yeah but why

#

is it always showing

earnest phoenix
#

guys im trying to make a music bot and when it joins the voice call theres no sound what so ever, im coding it in js, does anyone know whats up?

#

!

#

by deleting the cache for the path of the command

clever thunder
#

// assuming role.id is an actual ID of a valid role: if(message.member.roles.has(role.id)) { console.log(Yay, the author of the message has the role!); } else { console.log(Nope, noppers, nadda.); } this work?

earnest phoenix
#

try and see

clever thunder
#

oki

#

well

#

wrong type i wanted

opal plank
#

okay i borked something up good time

clever thunder
#

let role = message.guild.roles.find(r => r.name === "Team Mystic");

// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();

// or the person who made the command: let member = message.member;

// Add the role!
member.addRole(role).catch(console.error);

// Remove a role!
member.removeRole(role).catch(console.error);

solemn latch
#

your fix borked?

clever thunder
#

will that work

opal plank
#

i put a fallback but still

clever thunder
#

?

#

how does color change

#

`let role = message.guild.roles.find(r => r.name === "Team Mystic");

// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();

// or the person who made the command: let member = message.member;

// Add the role!
member.addRole(role).catch(console.error);

// Remove a role!
member.removeRole(role).catch(console.error);`

#

o

opal plank
#

perfect

clever thunder
#

// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();

// or the person who made the command: let member = message.member;

// Add the role!
member.addRole(role).catch(console.error);

// Remove a role!
member.removeRole(role).catch(console.error);```
opal plank
#

promisified IPC , i guess thats an achievement for today

clever thunder
#

``let role = message.guild.roles.find(r => r.name === "Team Mystic");

// Let's pretend you mentioned the user you want to add a role to (!addrole @user Role Name):
let member = message.mentions.members.first();

// or the person who made the command: let member = message.member;

// Add the role!
member.addRole(role).catch(console.error);

// Remove a role!
member.removeRole(role).catch(console.error);``

#

like this

#

o

opal plank
#

```js
code here
```

#

type exactly that ^^

solemn latch
#

\

opal plank
#

magik

clever thunder
#

is red error or

opal plank
#

backspace

solemn leaf
#

Im messing with it

#

and

#

um I called the devil

#

not nice

#

it shouldn't be doing that

clever thunder
#

wait

#

module.exports.run = async (bot, messageEmbed, args, giverole) => {
  messageEmbed.channel.send("gives you g%17@4 powers for 5 minutes");
  
}
module.exports.help = {
  name: 'gt',
  description: "Replies to you",
  usage: "ping",
  type: "about",
  commandAliases: []
}
#

i added 3 `

solemn latch
#

if you put
js after the first ```
it will color stuff

solemn leaf
#

Im going to make my brain flat

clever thunder
#

yea this wont work

solemn latch
#

the trick is to edit stuff in page to make it faster

opal plank
#

that looks absolutely fine

solemn leaf
#

no its not

opal plank
#

its not a bug, its a surprise feature

solemn latch
#

just like all those "easter eggs" someone made on their website

opal plank
#

sprinkle !important everywhere and you'll get a ton of easter eggs

solemn leaf
#

I dont

opal plank
#

just css peeps will understand that joke

solemn leaf
#

bad spotify

#

why spotify

earnest phoenix
#

!important and pray it works

solemn leaf
#

this isn;t helpibng

#

it kinda worked better

#

idk

#

wanna see>?

#

erm

#

never

#

mind lots of stuff on thew ebsite is called b

#

and um

#

I think I know why its broken now

#

all the images are now broken

#

wot

solemn latch
#

they are not C images, obs

earnest phoenix
#

did anyone understand some from the gateway intents?

opal plank
#

he's brezilian btw

#

i legit cannot wait to put this new toy onto practice

#

ngl

earnest phoenix
#
const { Manager } = require('erela.js');
const Spotify = require('erela.js-spotify');
const nodes = [{ host: process.env.LL_HOST, port: process.env.LL_PORT, password: process.env.LL_PASSWORD }];

const clientID = process.env.CLIENTID;
const clientSecret = process.env.CLIENTSECRET;

client.man = new Manager({
    nodes: nodes,
    plugins: [new Spotify({ clientID, clientSecret})]
});
#

TypeError: Manager is not a constructor

#

it is

#

const { Manager } = require('erela.js');

#

why isnt it a valid definition

#

weird stuff

opal plank
#

ctrl click on 'erela.js'

#

let me see what it exports

#

@earnest phoenix ctrl click Manager

#

and send me a sc

#

@earnest phoenix the goal of my script is to cluster Twitch

solemn leaf
#

b

opal plank
#

so im basically sharding it internally

solemn leaf
#

is the same as .btn

opal plank
#

spawning and assigning X amount of channels for every process, if it exceeds limit, it'll spawn more dynamically

#

each slave is spawned with minimal stuff, just a basic connection with the api and a handler for the IPC pipe to respond to commands

#

IRC is fine for this

#

kurbenetes does something similar iirc

#

but i decided to throw myself in the fire and do it myself without assitance of other tools

solemn latch
#

damn i lost my kurbenetes.

opal plank
solemn latch
#

why do devs name their stuff so terribly

#

" kurbenetes"
extremely popular, poorly named.
I dont even know how to say it thonkku

#

curb-ene-tes?

opal plank
#

dunno what it is but definetly going to be working on my own thing, as it is its not modular but i could make it modular

#

2 big milestones achieved recently. Making my own sharding and my own cache

#

damn right lmao

#

meanwhile d.js devs : today i made ping command i copied from stackoverflow big flex

solemn latch
#

hes been doing so much work that I dont even have to do anything. doing the work of two

#

true

opal plank
#

time for a break, my braincells at their limit

solemn leaf
#

Man erwin mean

opal plank
#

why am i mean?

spare fern
#

Yo just got my bot verified today

solemn latch
#

ay

#

gz

opal plank
#

good shit

solemn leaf
#

bullying djs devs

spare fern
#

Thank you πŸ™‚

#

However the custom status disappeared

opal plank
#

i use djs myself, just taking a piss at vampires that lurk here

solemn leaf
#

always watching

#

always

spare fern
#

Your bot?

#

However the custom status disappeared
@spare fern would anyone know what may have happened?

solemn leaf
#

wdym

opal plank
#

speaking of ads, one sec

spare fern
#

So as soon as it got verified the custom status just disappeared

opal plank
#

i forgot to restart the app

solemn leaf
#

Restart the bot

spare fern
#

The status was β€œplaying $help”

#

Ohh

opal plank
#

imagine not having an eval to simply change it on the go

#

rich presence is only for users

#

bots are limited to STREAMING, WATCHING, PLAYING, LISTENING

solemn leaf
#

How do I make rich presences

opal plank
#

you dont

solemn latch
solemn leaf
#

like vsc

#

what I have on my profile

opal plank
#

check them all

spare fern
#

Restart the bot
@solemn leaf when u don’t know how lmfao

solemn leaf
#

what you using

opal plank
#

wait what?

solemn leaf
#

here

solemn latch
#

I think these are too harsh πŸ€”

opal plank
#

i think those are spot on

solemn latch
#

"Does he ask the same, tired questions others ask (at a rate of once or more per minute)?"

solemn leaf
#

eval process.destroy()

spare fern
#

It is joke btw hehe

solemn latch
#

within 5 minutes ;p

#

1 minute is a bit fast

opal plank
#

i agree with most of those, i just get bitchy about it when im not in the mood to help them knowingly they are leeching

solemn leaf
#

WTF

#

IS SPOTIFY PLAYING MINECRAFT SONGS

opal plank
#

fuck i wanna go back to code but i need a break, theres one last step to actually finish my cluster

#

which is integrate the queue system with the dispatcher[

#

thats it

solemn leaf
#

to have that show when I hover over the tag

opal plank
#

dont think so

#

not safely at least

solemn leaf
#

whats the not safe way

opal plank
#

you'd need an actual bot/user hooked to get that

solemn leaf
opal plank
#

so you'd need either an api or your token there

solemn latch
#

with an iframe it could be done with js right?

solemn leaf
#

you can iframe with html and css?

opal plank
#

the problem isnt DISPLAYING, its FETCHING that data

solemn leaf
#

Oh

solemn latch
#

which is why i mention an iframe

#

host the data on a webserver

solemn leaf
#

I was just gonna make it say im listening to owo you're so warm forever

opal plank
#

you need to be with that user to see their presence, in a shared server, you cant get presence via API directly

#

so you need either a bot or a userbot

solemn leaf
#

cant I just use my bot

#

cough cough

#

then host it on my ip

opal plank
#

you'd need to recreate the presence

#

yes, put your ip on a public server

earnest phoenix
#

you'd effectively be exposing your ip to everyone then lol

opal plank
#

what can go wrong?

solemn leaf
#

I mean

opal plank
#

get a domain

solemn leaf
#

people cant do shit with my ip

#

or its jail

opal plank
#

they can

#

they can

#

they will

earnest phoenix
#

yes they can and it's not illegal

solemn leaf
#

nothing bad

solemn latch
#

lel

solemn leaf
#

how

opal plank
#

its YOUR responsibility to keep your token secure

earnest phoenix
#

your token, your responsibility ^

#

it's a password

solemn leaf
#

wa

#

I said ip

#

im confused

opal plank
#

im legit about to make an app on mobile to auto decline phone calls ngl

earnest phoenix
#

you said token then edited it to an ip

#

lol

solemn latch
#

they all cost money

solemn leaf
#

I TYPED IP

opal plank
#

fucking robo calls every 3 minutes

solemn latch
#

those apps

opal plank
#

robot callers

solemn latch
#

i get robo calls all day every day

solemn leaf
#

how would I display it

solemn latch
#

my phones on dnd all the time

opal plank
#

calls you, if you answer, they save your number and sell em' to marketing advertisers

carmine summit
#

is there a way to try catch my whole bot???

earnest phoenix
#

also you'd need to be verified on top.gg cause you're going to need javascript for such dynamic content

you could do something like an image src to a webserver that generates the image but the browser's going to cache it, you can't break the cache without javascript

solemn leaf
#

@carmine summit you catch it with a baseball glove it works best

solemn latch
#

probably a bad idea to catch everything

opal plank
#

not quite

carmine summit
#

why tho

opal plank
#

i have multiple catches

#

some global

solemn leaf
#

Erwin and me went though this for a day

earnest phoenix
#

i have a try catch on my entry point lol

opal plank
earnest phoenix
#

just so the process stays alive if anything fatal happens

solemn leaf
#

catches are for the poor

solemn latch
#

isnt that a bad practice?

opal plank
#

not when this is for metrics

solemn leaf
#

process.on(

opal plank
#

i catch for local handler and global for metrics

earnest phoenix
#

it is bad practice when you have reoccuring exceptions and errors all the time

solemn latch
#

ha i got your token @opal plank config.token

livid lichen
#
    game: {
      name: " monstercat's songs while I mess around with " + Bot.guilds.cache.array().length + " servers.",
      type: "STREAMING",
      url: "`[`https://www.twitch.tv/monstercat`](https://www.twitch.tv/monstercat)`"
    },
  }); ``` Did not work?
opal plank
earnest phoenix
#

he's brezilian btw
@opal plank what have I to be Brazilian '-'

opal plank
#

@solemn latch i can eval my token if you want

earnest phoenix
#

the url has to be a pure twitch url

solemn latch
#

i had my bot up 27 days no errors, was pretty pog

opal plank
solemn leaf
#

sexy

solemn latch
#

restarted it this morning

earnest phoenix
#

oh

opal plank
solemn leaf
#

erwin

#

can I get 50 dollars

opal plank
#

the thing is, i know where the errors are generated from the discord branch

earnest phoenix
#

discord screwed up with all the clients

opal plank
#

not much i can do about it though

#

its an old lib using a scrapper with pupetter

#

and since im a lazy fuck, im not gonna fix some old lib

earnest phoenix
#

yikes

opal plank
#

let it error every now and then

#

fuck it

earnest phoenix
#

I can't even know the owner of the server anymore

opal plank
#

its a handled error anyway

solemn latch
#

smart oliythink

opal plank
#

the error is legit ERRCONNECT, nothing i can do about it

#

its just a timeout

solemn latch
#

oh then yeah, totally nothing wrong with that

earnest phoenix
#

discord.js sucks

opal plank
#

discord.js good

#

shit, but good

earnest phoenix
#

wanted to get out of that language

opal plank
#

its like a woman

#

its a lib, not a lang

solemn latch
#

cant live with them, cant live without them

earnest phoenix
#

that reminds me when i was packet sniffing minecraft and i had to work with zlib ahaha

carmine summit
#

idk if this is the best idea.... but...

client.on('message', message =>{
try {
//commands hereeeeeeeeeeeee
}catch(e){message.channel.send(e.message)}
})
earnest phoenix
#

all the time shit changes and the developers who flake to fix it

opal plank
#

huh?

#

there has only been 2 changes in the past 5 or 6 months dude

earnest phoenix
#

working with zlib is a nightmare like fuck why are people still using a 30 year old lib

opal plank
#

v11 to v12 if you were old, and now the intents

#

thats it

#

there were no other major changes

solemn latch
#

stably eats ram

earnest phoenix
#

@opal plank Do you know of discord gateway intents?

opal plank
#

v11 to v12 if you were old, and now the intents

earnest phoenix
#

very stable as in it swallows most of the errors and hides them internally and eats your ram sunglas

opal plank
#

the intents i said in the end of the phrase was related to that

earnest phoenix
#

if your bot is not checked it went to the bag

carmine summit
#

yeah... all the errors are from an API.. like error 400, 403..... Best to make my clients know what they're dealing with

opal plank
#

dunno what you on about Luis

solemn leaf
#

@opal plank How would I display it?

opal plank
earnest phoenix
#

const client = new Discord.Client({ ws: { intents: Discord.Intents.NON_PRIVILEGED } });

opal plank
#

8 days online and its still up

#

no changes

solemn latch
#

ha 8 dias

earnest phoenix
#

@opal plank your bot is discord.js?

opal plank
#

i hate that it pulls language from my ip, browser and and OS langs in english

#

@earnest phoenix yes

earnest phoenix
#

did you apply this?

#

const client = new Discord.Client({ ws: { intents: Discord.Intents.NON_PRIVILEGED } });

opal plank
#

like i said, 8 days ago was the last restart, so no, i havent done it

#

im waiting for my bot to disconect from the API to change it

earnest phoenix
#

intents aren't required on gateway v6

solemn latch
#

kek

earnest phoenix
#

so if you don't add your bot you will die

opal plank
#

i got a script to update it

#

dont worry,i got it handled already

earnest phoenix
#

luis no it won't lol

opal plank
#

also d.js should auto handle it

earnest phoenix
#

gateway v6 won't be deprecated for another year or so

#

You can't even pull the amount of bot users

opal plank
#

huh?

earnest phoenix
#

Usuarios = users

#

in english

opal plank
#

nope, all my users are still on

clever thunder
#

extracts node.js

opal plank
#

whatever you are facing is different than mine bud

earnest phoenix
#

it's because you haven't applied the intents yet

opal plank
#

im having no issue whatsoever with my users, must be your code

carmine summit
#

what are the cons of try catching my whole bot?

solemn latch
#

πŸ€”

carmine summit
#

what coulg go wrong?

earnest phoenix
#

well... yeah, you enabled intents so you won't get member updates unless you include the member intent

#

let users = client.users.cache.size does not work

clever thunder
#

MegaThonk this is just my favorite emoji XD

earnest phoenix
#

nobody asked

solemn latch
#

cache.size is just the users in your cache

earnest phoenix
#

let users = client.users.cache.size does not work

well... yeah, you enabled intents so you won't get member updates unless you include the member intent
@earnest phoenix

opal plank
#

^^

#

im still recieving member updates cuz i havent switched up my code

#

and im fairly certain you just need intents for 100+ servers to be required

earnest phoenix
#

how does it apply? I've read several and I didn't understand anything

opal plank
#

you put the intents you need once you construct your client

#

thats about it

#

the intents you need is up to you

clever thunder
#

omg

#

i got node working

earnest phoenix
#

myIntents.add?

#

this?

clever thunder
#

just by extracting it

opal plank
#

what?

#

no

earnest phoenix
#

wait

#

i put this

#

in my code

opal plank
earnest phoenix
#

const client = new Discord.Client({ ws: { intents: Discord.Intents.NON_PRIVILEGED } });

opal plank
#

read that

earnest phoenix
#

ok

clever thunder
#

so since i got node.js working

#

what do i do now

earnest phoenix
#

oh

clever thunder
#

i launch program?

earnest phoenix
#

so you don't need to activate it?

solemn latch
#

you need discordjs installed too

#

really, just follow the guide, thats what its for

earnest phoenix
#

OH YEAHHH

clever thunder
#

npm i discord.js

#

wat

#

it said download

#

but then it coped

solemn latch
#

hmm?

clever thunder
#

jsnpm i discord.js

solemn latch
#

yeah.

clever thunder
#

that

solemn latch
#

what about it

clever thunder
#

do i put in launch.json or

solemn latch
#

if you read the page it explains it

fiery canyon
#

hey

solemn latch
#

hello

fiery canyon
#

howdy i have a small question

opal plank
#

ask away

faint prism
#

Ask

fiery canyon
#

does anyone have an idea how to search for a variable object in mongoose

clever thunder
#

js```
const Discord = require('discord.js');
const client = new Discord.Client();

client.on('ready', () => {
console.log(Logged in as ${client.user.tag}!);
});

client.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
}
});

client.login('token');

fiery canyon
#

uh wait

#

so for example

faint prism
#

BSON time

fiery canyon
#

Player is the mongoose DB

#

im trying to find all documents in Player

#

where

#

It's a dumb schema I know

#

But any ideas?

solemn latch
#

i think his confusion is on the opening the command prompt and using the command prompt sections

#

if he didnt skip the reading, he would know it :p

clever thunder
#

i have node.js open

#

wdym

clever thunder
#

that

#

idk

fiery canyon
#

But any ideas?
@fiery canyon uh okay so let me know if anyone has an idea c:

opal plank
#

@fiery canyon i saw your message, i just dont know mongoose to be able to give help, im a postgres supremacist

fiery canyon
#

hahaha i see

#

it's true tho, i rarely find anyone who uses mongodb

opal plank
#

come join the dark side

#

we got cookies and proper databases here

fiery canyon
#

sad

faint prism
fiery canyon
#

uh yeah but that's not what i need

#

im not trying to find by someone's id

opal plank
#

wait what?

fiery canyon
#

it's slightly more complicated here

opal plank
#

the legends are true? people DO research before coming here?? its a miracle!

faint prism
#

You're getting objects where a property is true yeah?

fiery canyon
#

yeah im looking for all players where a property of an object in an array of objects is true

opal plank
#

can you not just return one querry that matches the first one and then find() the one tahts true in node?

fiery canyon
#

or false actually

clever thunder
fiery canyon
#

can you not just return one querry that matches the first one and then find() the one tahts true in node?
@opal plank i could

#

but node just process things really slowly

opal plank
#

other way around

#

node process faster than databases

#

specially on big queries

clever thunder
#
'use strict';

/**
 * A ping pong bot, whenever you send "ping", it replies "pong".
 */

// Import the discord.js module
const Discord = require('discord.js');

// Create an instance of a Discord client
const client = new Discord.Client();

/**
 * The ready event is vital, it means that only _after_ this will your bot start reacting to information
 * received from Discord
 */
client.on('ready', () => {
  console.log('I am ready!');
});

// Create an event listener for messages
client.on('message', message => {
  // If the message is "ping"
  if (message.content === 'ping') {
    // Send "pong" to the same channel
    message.channel.send('pong');
  }
});

// Log our bot in using the token from https://discord.com/developers/applications
client.login('your token here');```
opal plank
#

the only downtime is the time between transactions

#

aka the time it takes for the database to deliver you the content of what you asked

faint prism
#

collection.find({ "active": true })
Something like that?

clever thunder
#

thats ping

opal plank
#

read

#

the

#

guide

fiery canyon
#

collection.find({ "active": true })
Something like that?
@faint prism it's more than that

#

not just active:true

#

im trying to like for

opal plank
#

read a couple pages, no need to come here to confirm whatever you just read here @clever thunder

fiery canyon
#

wait

solemn latch
#

most of us here have read the guide

fiery canyon
#

something of that manner

#

yeah i did

clever thunder
#

do i download discord.js, and if so how

fiery canyon
#

but idk how to use a normal variable in a mongodb querey

opal plank
#

one more stupid msg and im blocking you shy

fiery canyon
#

that's the point here

solemn latch
#

the guide covers it

opal plank
#

reads the docs ffs

faint prism
#

Grab the entire collection and for loop it and find the query yourself outside mongodb then

fiery canyon
solemn latch
#

if you read the page i linked it covers it @clever thunder

fiery canyon
#

Grab the entire collection and for loop it and find the query yourself outside mongodb then
@faint prism that's the current way it is

#

but it just lags the bot so much

faint prism
#

Yeah I'm sure it's blocking too

clever thunder
#

WHAT LINK

solemn latch
#

ive linked it like 5 times

opal plank
#

legit the third topic dude

solemn latch
#

read the entire page top to bottom

clever thunder
solemn latch
opal plank
#

whole thing

fiery canyon
#

Shy how old are you? Legit curious
@earnest phoenix hmm maybe check their yt channel

clever thunder
#

Shy how old are you? Legit curious
@earnest phoenix dafuq is wrong with you, i'm not sharing my personnel information

fiery canyon
#

LOL

#

F

clever thunder
#

why do i make bots, there just dumb anyways

fiery canyon
#

true

#

make humans instead

faint prism
#

Don't get discouraged

solemn latch
#

LOL

faint prism
#

But you need to learn js first

clever thunder
#

Don't get discouraged
@faint prism i will and i already am

solemn latch
#

I wish we could star messages as a group

opal plank
#

age doesnt matter as long you have enough maturity to code and develop stuff

fiery canyon
#

I wish we could star messages as a group
@solemn latch LOL

#

okay now fellas pls help mongoose is terrible

opal plank
#

we didnt even judge you for your age before we just asked, we provided you full of guides and resources to learn, everything else is on your hand

solemn leaf
#

oi

#

you ok

opal plank
#

@fiery canyon pst pst, hey, kid, have you heard of PostgreSQL?

fiery canyon
#

smh

#

i would switch

#

but it would be a bigger pain

opal plank
#

short term? yeah

#

olong term?

#

not at all

fiery canyon
#

i mean mongodb isn't bad

#

it's not about the data

opal plank
#

mongo isnt nearly as powerful as postgres

fiery canyon
#

it's about the code itself

opal plank
#

ive yet to find other databases that match the complexity postgres has to offer

carmine summit
#

How do I know which line the error generated using catch(e)

opal plank
#

cassandra is the only one i'd say beats it, but thats mostly about efficiency/speed at webscale

fluid basin
#

okay now fellas pls help mongoose is terrible
@fiery canyon in what way

opal plank
#

i was thinking about moving some of my stuff to cassandra due to the sheer amount of traffic im getting, we talking 50k+ events per minute, something topping 80k+, you'd need a beefy af databse to handle that much traffic consistenly. And postgres does it fine. Its complex, its fast and good. Unless you webscaling stuff, dont bother with any other db @fiery canyon

carmine summit
#

It should tell you in the stack trace
@earnest phoenix I am using try catch....

opal plank
#

actually, my bad

#

its not every minute

#

its every 15 seconds

#

yeah, its every 15 seconds that i produce

carmine summit
#

yes

opal plank
#

i need to fix that, its 4x higher per minute

solemn leaf
fiery canyon
#

@fiery canyon in what way
@fluid basin oh hai

opal plank
#

@solemn leaf i told you., bad idea

fiery canyon
#

okay so

solemn leaf
#

Im not gonna make it update

opal plank
#

then whats the point?

carmine summit
#

.onMouseHover: ishhhh?

solemn leaf
#

for fun

clever thunder
#

in node it says npm should be run outside of the node repl, in your normal shell. and i tried command prompt and it didn't work

opal plank
#

just host that pic somewhere then

#

and pull it on :hover

solemn leaf
#

how do I position it

fiery canyon
#

okay so willi

#

i have a database called Player, i'm trying to get all the documents in Player, where Player.guilds[message.guild.id].active == true

opal plank
solemn leaf
#

got my host

#

https://cdn.discordapp.com/attachments/272764566411149314/763551146630578196/unknown.png

fluid basin
#

well erwin you gotta know that mongodb has no cache

near ether
#

Anyone know why this is happening? I’m not requesting any intents I haven’t been verified for, which is why I’m confused about this

fluid basin
#

yuh so? @fiery canyon

fiery canyon
#

idk how to do it lol

#

main problem is

clever thunder
#

its refuses to take a screenshot

solemn latch
#

is your bot in 100 servers @near ether ?

clever thunder
#

windows + g

fiery canyon
carmine summit
#

I understand @carmine summit
When your exception is "caught"
You'll get an error inside of (e)

If you console.error(e) that is the stack trace
@earnest phoenix I wanna know which line the error originated

fluid basin
#

@near ether contact support?

fiery canyon
#

idk how to query with a variable like message.guild.id
@fiery canyon that's my whole problem

near ether
#

It’s in like 60k servers

#

I got it verified a while ago

solemn latch
#

o

#

yeah contact support

near ether
#

Aight

#

Ty

opal plank
#

you are asking for intents you do not have access

#

just change em'

solemn latch
#

he should have them no?

opal plank
#

dunno which library you coded your bot in

carmine summit
#

the thing isss...... My IDE wont let me copy/paste in my console

solemn latch
#

if he is verified

near ether
#

I double checked all of them and I’m not requesting for intents I didn’t ask for

opal plank
#

he didnt enable them or didnt get approved for it

carmine summit
#

alr

opal plank
#

you CHOOSE which intents you want

#

if he didnt pick the intents i assume it would error like that

fluid basin
#

hoss its just key.key.key

near ether
#

i did choose

fiery canyon
#

yeah but how do i do that in the db.find()

#

that's my problem here

clever thunder
#

welp

opal plank
#

which ones did you enable?

#

and which ones did you put on your code

near ether
#

both are enabled

fluid basin
#

collection.find({"data.time.value": Date.now()})

fiery canyon
#

what

fluid basin
#

one example

opal plank
#

on verification did you request access to both?

fiery canyon
#

yeah

#

but

#

i cannot use "" in this case

near ether
#

yes

fiery canyon
#

cus im looking for an indexed variable

opal plank
#

huh?

fluid basin
#

then use ''

near ether
#

exactly lmao

fluid basin
#

or ``

#

lol

near ether
#

thats why im so confused about this

fiery canyon
#

`` didn't work

opal plank
#

json payloads are always "

fluid basin
#

indexed variable?

fiery canyon
#

sec ill send you my original message

#

i have a database called Player, i'm trying to get all the documents in Player, where Player.guilds[message.guild.id].active == true

opal plank
#

how did you put on your code your intents? @near ether

fiery canyon
#

so im looking for an object's property, in a list of objects

near ether
#

I took the whole list and filtered the values to match what I wanted

opal plank
#

show the code for it

#

just the snippet of the constructor for the intents

clever thunder
#

its doing the oppisite than this, and i did npm install discord.js but it wont work

near ether
fluid basin
#

wait so guilds is an object or array

solemn latch
#

did you do it in a terminal set to the project folder @clever thunder

fiery canyon
#

wait so guilds is an object or array
@fluid basin array of objects

clever thunder
#

im doing it in node.js

solemn leaf
#

@opal plank How would I do it thou

solemn latch
#

after initializing the folder ofc

fluid basin
#

thats both objects lol

solemn latch
#

i dont know what you mean

#

just do it in terminal

fiery canyon
#

well yeah sorry i ujst checked

opal plank
#

@near ether can you do NON_PRIVILEDGED and then ADD the ones you need?

#

@solemn leaf i told you

fluid basin
#

isnt it ghosts.68814.active ?

near ether
#

sure, i actually didnt know non_p existed

solemn leaf
#

no you didnt

fiery canyon
#

yeah but i cannot use .68814.

opal plank
#

there are quite a few, lemme check

fiery canyon
#

and it doesn't let me do that in the find()

#

that's what im trying to do

fluid basin
#

build the query first

opal plank
fiery canyon
#

wat

#

wdym?

#

like just write it down?

#

im trying to get the players with this

#

Player.guilds[message.guild.id].active == true

near ether
#

thanks man

fiery canyon
#

exactly

opal plank
#

np

fluid basin
#

are you using raw mongo or mongoose

solemn leaf
#

@opal plank you never told me how to position it and stuff

fiery canyon
#

mongoose

clever thunder
#

i suck

fluid basin
#

bruh mongoose

opal plank
#

cuz i dont know positioning well

#

i told ya before i couldnt help you with css

fluid basin
#

make a raw query using mongoose then

clever thunder
#

dude im doing what it says

#

im waiting

fluid basin
#

I dont think you can access it via your defined schema

solemn leaf
#

what about html

clever thunder
#

but its not working

fiery canyon
#

I dont think you can access it via your defined schema
@fluid basin how about using a function or something?

#

is there a way i could find using a function

clever thunder
#

i wont let me take a screenshot of it

opal plank
#

@solemn leaf im a full backend dev, im not very confident in my front end skills, therefore i wont be giving bad/half assed advice, you better off waiting for someone who knows better than me

solemn latch
#

windows + shift + s

reef carbon
#

How do I add an image file to my domain?
for example I do example.com/w34he and it'll show an image

solemn latch
#

then control + v in discord

clever thunder
earnest phoenix
#

@opal plank Could you tell me which host do you use?

reef carbon
#

@reef carbon you serious?
You just upload the file to your domain
Who's your webhost?
@earnest phoenix I just got a free domain .tk domain lol

opal plank
#

depends on your needs

#

for free? paid? good vps? decent? high end?

solemn latch
#

if you follow the page, it says this

clever thunder
#

Command Prompt wont work

solemn latch
#

have you tried it?

earnest phoenix
#

I need it to be a little cheap, 1 dollar is practically 6 dollars in Brazil

opal plank
#

i'd say go for Digital Ocean, if you have github student you can get it for free

#

or with a discount iirc

clever thunder
#

. uh

#

no idk where that is but i installed LTS

earnest phoenix
#

could you please send me the link?

#

ok

#

i go see

opal plank
#

@earnest phoenix

earnest phoenix
#

thanks

opal plank
#

highest end user performance

#

bold claims

#

hmmmm interesting

clever thunder
earnest phoenix
#

how to make website for me bot?

fluid basin
#

@fiery canyon have you tried this:

Player.collection.find({`ghosts.${message.guild.id}.active`: true})```
clever thunder
#

so yes?

#

the only box i see :/

opal plank
#

aight time to go finish my project

earnest phoenix
#

bruh

opal plank
#

wish my luck fellas

solemn latch
#

bye peeps

quartz kindle
#

bad luck

#

:^)

opal plank
#

@quartz kindle toxic

fiery canyon
#

@fiery canyon have you tried this:

Player.collection.find({`ghosts.${message.guild.id}.active`: true})```

@fluid basin

#

syntax is not working i think it needs to be a ""

opal plank
#

promisified IPC

#

how to make bad internal sharding 101

quartz kindle
#

cool

opal plank
#

time to abooze Twitch with 40 different socket connections

quartz kindle
#

i have a thing like that too

clever thunder
#

. .

V

#

did it

opal plank
#

im getting on Tim's level

quartz kindle
#

lmao

#

you're already doing stuff that i have no idea wtf you're doing so...

#

Β―_(ツ)_/Β―

#

lmao

opal plank
solemn latch
#

only difference, tim did it while in first grade

quartz kindle
#

LOL

opal plank
#

tim, legit, can you read this?

quartz kindle
#

no i cant read

#

:^)

opal plank
#

here

#

was looking for it

#

tell me this aint one heck of a mess

clever thunder
#

everyone on the server: Genius's

me: i suck

quartz kindle
#

its a bit confusing indeed haha

opal plank
#

a bit ?

clever thunder
#

Zane, your correct

quartz kindle
#

its a request-response message right?

opal plank
#

even i agree this whole thing is a mess

#

yeah

#

i had to build a whole handler/dispatcher for IPC

quartz kindle
#

i did something like that a while ago, in one of my shelved projects lmao

#

i need to finish it

opal plank
#

so i could target specific processes

quartz kindle
#

let me find it

opal plank
#

i still need to dynamically create more child processes once the limit threshold is reached though

clever thunder
#

welp im done with vsc for now..

quartz kindle
opal plank
#

thats similar to what i got

#

im handling them in bools though

solemn latch
#

return new Promise((ok,nope)

earnest phoenix
#
  File "OwO.py", line 188, in not_allowed
    if ctx.author.id not in sql:
TypeError: 'in <string>' requires string as left operand, not int``` im close
solemn latch
#

nice

quartz kindle
earnest phoenix
#

i can feel it!

opal plank
#

your seems more organized

quartz kindle
#

my idea was to make it like a webserver sort of

quaint knot
#

Tim can u make me a Discord bot?

opal plank
#

this is what i got on the child process

#

its not that bad when you grasp the concept, each process has its own unique name, im just emitting it on the same IPC line with the target

#

and then a command with will run whatever funciton it is

quaint knot
#

πŸ‘½

opal plank
#

thats about it

quartz kindle
#

i made mine to use like this ```js
// ipc1
client.request("bla").then(response => console.log(response)) // test

// ipc2
client.on("request", (request,response) => {
console.log(request) // "bla";
response("test");
})

opal plank
#

heres where things get a big confused

#

_master is client

quaint knot
#

Erwin r u bot developer

opal plank
#

__master is the handler, to emit the message onto client, or PROMISES and other non message events to a different handler

#

i needed a middleware

quaint knot
#

No

opal plank
#

@quaint knot yes

quartz kindle
#

@quaint knot i dont make bots for other people sorry (unless they pay good)

opal plank
#

^^

fluid basin
#

well like I said its pretty simple @fiery canyon

const key = `ghosts.${message.guild.id}.active`;
const query = {}
query[key] = true;
Player.collection.find(query);
quaint knot
#

Of course it's always ABOUT the mobey

fluid basin
#

lol $5

opal plank
#

how about you go build me a house for free? pool included pls @quaint knot

quartz kindle
#

sorry, but i have the bad habit of having to eat every day

fluid basin
#

a typical developer gets paid about $15-20 per hour

opal plank
#

^^^^^^^^

quaint knot
#

Wait what does money do u for

earnest phoenix
opal plank
#

anyone, ignoring the troll

earnest phoenix
#

yh

quartz kindle
#

im not a kid who lives with his parents and codes for fun
im a 30yo dude with bills to pay

quaint knot
#

Dam u old

#

I'm only 16

opal plank
#

what i did is basically added a command handler inside each process.
the payload contains

target: the process to run this
command: what function needs to be executed
args: the arguments

thats it @quartz kindle

#

the rest is just the dispatcher/promise

quartz kindle
#

cool

opal plank
#

in theory its not that bad, in practice it gets a bit messy

quartz kindle
#

mine is made to be run over the network

#

1 server, multiple clients

quaint knot
#

@opal plank how old r u

opal plank
#

i think somewhere betwween 21 or 23

#

why?

quartz kindle
#

lmao

opal plank
#

jan 98, do the math

earnest phoenix
opal plank
#

after 18 you kinda stop counting

quartz kindle
#

true tho

earnest phoenix
#

lol

solemn latch
#

damn erwin beats me by 2 months

#

whatta guy

quartz kindle
#

wait until you get to 30, you will definitely stop counting

opal plank
#

git rekt

clever thunder
#

:^I

solemn latch
#

i forgot how to count at 21

earnest phoenix
#

i've stopped counting up and started counting down.

solemn latch
#

was a rough night

quaint knot
earnest phoenix
opal plank
#

27 is when you start getting your motorcycle and start to think about wandering the country with it

#

most people call it middle age crisis though

earnest phoenix
#

lol

fluid basin
#

pls kep this ontopic plox thank

opal plank
#

^^

#

i should get back to screeching at my code for the next couple mins

quaint knot
#

Mhm

earnest phoenix
#

@opal plank i've been raging at mine for 2 days..

opal plank
#

this shit requires a lot of attention

earnest phoenix
quaint knot
#

Do y'all work irl

opal plank
#

i do investments, so yes and no

quartz kindle
#

i need to update one of my bots that's still running on discord.js v12.0.0-dev

earnest phoenix
#

whats work ?

opal plank
#

i just pushed the update to the repo for the intents

#

as soon as the bot restarts it should auto pull from the repo and restart

solemn latch
#

Do y'all work irl
not anymore

earnest phoenix
#

Sql can suck my dick.

quartz kindle
#

sqlite is cool tho

opal plank
#

PostgreSQL >

solemn latch
#

ay tims gotchu

faint prism
#

Sql is a language

opal plank
#

PostgreSQL | Cassandra > *

fluid basin
#

oh nice

#

d.js 12 still using gateway v6

#

time to move to v8

opal plank
#

not a chance

quartz kindle
#

they're working on v8

sudden geyser
#

SQLite > *

opal plank
#

pg + postgres > *

earnest phoenix
#

@quartz kindle no no no.. SQLite has made me loose my voice its not cool.πŸ˜‚

fiery canyon
#

oh wow willi

#

this works

faint prism
#

JasonDB is dah best!Β‘!

quartz kindle
#

LOL

faint prism
#

Check my XML db

opal plank
#

i keep my database in a single .txt file mmulu

fiery canyon
#

wait

fluid basin
#

is there even official docs for v8

fiery canyon
#

uh damnit

quaint knot
earnest phoenix
#

i sound like i've just come off the Local Street corner after Bang bro's Rocked up with 5 BBC's

fluid basin
quartz kindle
#

@fluid basin v8 is officially released

fiery canyon
#

willi is it possible to search for two queries?

fluid basin
#

yes

#

just extend the query

#

query.someotherkey = 'test'

quartz kindle
#

i believe djs will change to v8 when they release v13

fluid basin
#

damn isn't there a changelog or smth for v8?

fiery canyon
#

like i'm trying to get both when the guild[].active is false, and also when the guild thing doesnt exist at all

opal plank
#

@quartz kindle is that on the works though?

fluid basin
#

fk it

#

time to read the entire gateway docs page again

blissful coral
#

have fun

opal plank
#

i asked the fuckers if they wanted type annotations and they said 'we might on v13'
i assumed they were taking a piss but if you think they making v13 i think i might have brushed that response a bit too lightly

quartz kindle
#

@fluid basin you can check the commit comparison i guess lol