#development

1 messages ยท Page 819 of 1

tight plinth
#

Server

earnest phoenix
#

Hmm

tight plinth
#

Coding in termux aaaaaaah

#

Wait

#

Vps?

earnest phoenix
#

Nah node only without vps

tight plinth
#

Oof

earnest phoenix
#

Both functions good

tight plinth
#

Well terminus is meant to be used with a vps

earnest phoenix
#

Nah... It's up to you...
You can use both but you need to choose which one is more stable for you

#

@tight plinth btw which discord bot wrapper are you using?
Discord.js
Eris
Or what?...

pale vessel
#

discord.js

earnest phoenix
#

Me too

#

Best one ever...

tight plinth
#

Djs

earnest phoenix
#

Hmm very good

restive furnace
#

@tight plinth where u got vps?

tight plinth
#

A friend lend it to me

restive furnace
#

k my friends arent nice :{

earnest phoenix
#

Is there a api for anime hugging gifs

#

Ping me if so

pale vessel
#

I can't ping you without using your id

tight plinth
#

True

pale vessel
#

can you change your nickname?

finite bough
#

@earnest phoenix

flat pelican
#

jeez

pale vessel
#

great job

finite bough
#

yes

#

I pro

tight plinth
#

UwU

flat pelican
#

fix

#

-ed

pale vessel
#

who's ed

finite bough
#

oof

#

-ed

pale vessel
#

oh

#

pepega

#

clap

zenith terrace
#

Ed

tight plinth
#

@earnest phoenix use nekos.life .

flat pelican
#

no

pale vessel
#

are you sure that's the right "Unicode"?

#

oh and no there'll be bunch of lolis

flat pelican
#

nekos.life isn't SFW as it can return loli content

#

ah wait

#

the anime endpoint should be fine

pale vessel
#

i think you can filter it

tight plinth
#

U can

pale vessel
#

well ok

tight plinth
#

There is sfw and nsfw

#

They separate both

pale vessel
#

imagine the devs trolling

#

lmao

finite bough
#

and

peak venture
#

i'm having an issue forming tablecells for eachpart of my array.
Anyone can help me out with that?

    let html = "";
    username = Tabledata.map(u => "<tr><td>" + u.userInfo[0] + "</td><td>" + u.userInfo[3] + "</td></tr>") //</tr>")//"
    // Ships from Array are inside u.userInfo[3] where u.userInfo[3][0] is the name and need to be seperated in a cell.
    
    let room = request.params.room
    let data = request.session.discorddata
    var cards = new CardCollection();

    username.forEach(discord_id => {
      html += discord_id
    });
finite bough
#

accidently change cuddles with lewd hentai

surreal sage
#
  if(command === "warn") {
    if(!message.member.hasPermission("KICK_MEMBERS")) return message.reply("You're missing permissions! **Required Permission** `KICK_MEMBERS`");
    const user = message.mentions.members.first()
    const reason = args[1]
    const channel = message.guild.channels.find(ch=>ch.name==="moderationlog")
    const embed = new Discord.RichEmbed()
    .setTitle("Action Taken")
    .addField("Action", "```WARN```")
    .addField("โ”Œ Target", user)
    .addField("โ”‚ Reason", reason)
    .addField("โ”” Commander", message.author)
    .setColor("#ff4500")
    .setTimestamp()
    if(!user) return message.reply("You forgot to enter the `USER`");
    if(user.hasPermission("ADMINISTRATOR")) return message.reply("Hey! He's an administrator!");
    if(!reason) return message.reply("You forgot to enter the `REASON`");
        const embedDelete = new Discord.RichEmbed()
    .setTitle("Deleting Command Message. . .")
    const embedWarn = new Discord.RichEmbed()
    .setTitle("Warning *" + user.tag + "*. . .")
    const embedSending = new Discord.RichEmbed()
    .setTitle("Sending Moderation Log. . .")
    message.channel.send(embedDelete).then(thatEmbed=>{
      message.delete()
      thatEmbed.edit(embedWarn)
      thatEmbed.edit(embedSending)
      user.send(`------------------------------------------------\nYou've been warned in ***${message.guild.name}***\nWhy? *${reason}*\n\nIf you think this is a false warn,\nPlease appeal here: *https://forms.gle/yNSqjmBMDkxktGod8*\n------------------------------------------------`)
      channel.send(`${user.id}`)
      channel.send(embed)
      const embedFinished2 = new Discord.RichEmbed()
.setAuthor(`${user.tag} has been warned`, user.avatarURL)
.setDescription(`**Reason:** ${reason}`)
thatEmbed.edit(embedFinished2)
      setTimeout(()=>{
        thatEmbed.delete()
      }, 7000)
    })
  }```

```.setAuthor(`${user.tag} has been warned`, user.avatarURL)```
It says "undefined"
peak venture
#

user.tag is unefined?

surreal sage
#

y

tight plinth
#

User

pale vessel
#

does the user have a default avatar?

tight plinth
#

Isn't user message.guild.member here?

#

It is

pale vessel
#

that's a member

surreal sage
#

const user = message.mentions.members.first() check the first 1

tight plinth
#

So you should message.guild.member.user.tag

#

user.user.tag

#

I think

pale vessel
#

yes

surreal sage
#

i jsut wanted to say that

pale vessel
#

correct

surreal sage
#

xd

pale vessel
#

change the constant user to member to avoid confusion

tight plinth
#

^

#

So it will maybe be member.user.tag

pale vessel
#

yes

peak venture
#

i'm having an issue forming tablecells for eachpart of my array.
Anyone can help me out with that?

    let html = "";
    username = Tabledata.map(u => "<tr><td>" + u.userInfo[0] + "</td><td>" + u.userInfo[3] + "</td></tr>") //</tr>")//"
    // Ships from Array are inside u.userInfo[3] where u.userInfo[3][0] is the name and need to be seperated in a cell.
    
    let room = request.params.room
    let data = request.session.discorddata
    var cards = new CardCollection();

    username.forEach(discord_id => {
      html += discord_id
    });
earnest phoenix
#
      const response = await fetch(
        `https://newsapi.org/v2/top-headlines?sources=reuters&pageSize=5&apiKey=${newsAPI}`
      );
      const json = await response.json();
      const article1 = json.articles;
    let article = [Math.floor(Math.random() * article1.length)]
    console.log(article);
        const embed = new RichEmbed()
          .setColor('#FF4F00')
          .setTitle(article.title)
          .setURL(article.url)
          .setAuthor(article.author)
          .setDescription(article.description)
          .setThumbnail(article.urlToImage)
          .setTimestamp(article.publishedAt)
          .setFooter('Powered by NewsAPI.org');
        return msg.channel.send({embed});```
#

it returns undefined

tight plinth
#

Is article defined ?

earnest phoenix
#

see up

tight plinth
#

U log article

earnest phoenix
#

code

tight plinth
#

So what appears inside the console

earnest phoenix
#

it returns [2]

#

in console

tight plinth
#

So

earnest phoenix
#

the article1 value returns in array

tight plinth
#

jsonify it and see results

earnest phoenix
#

๐Ÿ˜‘

#

If I use math.random it returns me array value so how I can find which array value it has returned 0, 1 or...

#

What lol

tight plinth
#

Math.random

#

Erp

#

Why

earnest phoenix
#

This entire conversation

tight plinth
#

Article is just a number

#

^
@earnest phoenix idfk what you try to do

pale vessel
#
let random = Math.floor(Math.random() * article1.length);

let article = article1[random];```
earnest phoenix
#

oh!

tight plinth
#

^^

#

Use this

#

Or

pale vessel
#

delicious spoon of codes

earnest phoenix
#

hmm

#

thanks

tight plinth
#
let article = article1[Math.floor(Math.random() * article1.length)];```
#

Works too

pale vessel
#

ye

earnest phoenix
#

Dur better off article1[process.exit()]

peak venture
#

so ahm

#

anyone here able to help me with my issue?

tight plinth
#

What's ur issue @peak venture

pale vessel
#

what's the issue? is there an error with that code?

tight plinth
#

We need a problem to solve it

pale vessel
#

he posted it twice

#

it got buried

fathom storm
#

Guys is disconnect event working ?

tight plinth
#

Yes

tight plinth
#

Almost never triggered, but works

#

@peak venture yes ik

fathom storm
#

oh okey ๐Ÿ˜„

tight plinth
#

What is the error

peak venture
#

there's no error

fathom storm
#

nothing i just ask

peak venture
#

Just trying to figure out how to obtain a new cell for each ship i have in the array

#

behind the user

earnest phoenix
#

draw in ms paint what your trying to do @peak venture

#

and send the current code for that pic

#

its just some minor frontend tweaking you have to do

peak venture
earnest phoenix
#

so you want a table inside the cells

peak venture
#

Well it's already a table

#

but yea; kind of a table inside a table?

#

Just 2 things to be done indeed but i can't get my head around that

#

It's like the userInfo[3] is the shipname where userInfo[3][1] should be the colorCode to fill in the color as a background

earnest phoenix
#

whats [3][0]

#

also how is this implamented into the frontend

#

im guessing [3][0], [3][2], [3][4] are the ship names

#

and 1 3 5 etc are color codes

peak venture
#

its like Zao, #123123

#

in front is like username, region and discord_id

earnest phoenix
#

mk one sec

quartz kindle
pale vessel
#

that shape...

peak venture
#

so like: { username, region, discord_id, [Shipname, colorcode]}

finite bough
#

tim

#

what files in sqllite r readable

#

.sqlite?

pale vessel
#

.db maybe

peak venture
#

@quartz kindle you mean the array? or the image it should be

quartz kindle
#

the file extension inf sqlite doesnt matter, you can name it whatever you want

#

@peak venture the image

#

how you want the table to be

peak venture
#

yes, the horizontals should be for each username

earnest phoenix
#

{ username, region, discord_id, [Shipname, colorcode]} will that array always be just 2 values

#

or does it change depending on how many ships they have

peak venture
#

just 2 values

#

there will not be anything else then the Shipname, colorcode

finite bough
#

?*

quartz kindle
#

the amount of ships will always be different right? so the way i did it above will not be efficient

#

you better simply use divs with borders and backgrounds

#

instead of table cells for ships

peak venture
#

the amount of ships will be different

#

but divs may be an option. Though i gotto drop the Table thing then

earnest phoenix
#

to clarify

quartz kindle
#

you can keep the table as it is

earnest phoenix
#

username = Tabledata.map(u => u will always have 1 ship and 1 color

#

?

#

if so you can just throw it in like this

#
username = Tabledata.map(u => {
    return `<tr><td>${u.userInfo[0]}</td><td style=\"background-color:${u.userInfo[3][1]};\">${u.userInfo[3][0]}</td></tr>`
}) 
peak venture
#

Tabledata.map(u => contains the userInfo with name and stuff

#

like the package

#

u.userInfo[3] contains the ship data (shipname and color)

earnest phoenix
#

yea

#

if there will only ever be just those 2 entries in the array

#

you could use that above

#

will make background the color you want

#

and put shipname in it

#

now idk how your implementing all this in the frontend but you might want to rethink your approach by what you sent me

peak venture
#

Yea. my tutor also said to make something similar as to what i have done in a different feature

#

let me get you a link so you can see that

#

But then do it slightly different. To make it a card a user and get it horizontally

pale vessel
#

it's not loading for me

earnest phoenix
#

same

peak venture
#

thats odd

earnest phoenix
#

granted it is glitch

#

so thats to be expected

#

:^)

peak venture
#

๐Ÿ˜›

#

It's loading. Though it needs to get quite some details

#

give it a bit of time before entereing. most i've seen is roughly 30s time O_O

earnest phoenix
#

ah yes i too take 5 mins for a database fetch

peak venture
#

i made a promise for alot

earnest phoenix
#

test the code i sent above

peak venture
#

to decrease waiting time

earnest phoenix
#

tell me if it works

#

if not send me the output

peak venture
#

aight, restarting

#

just a second

quartz kindle
#

that sounds way slower than it needs to be

peak venture
#

It's deffo extremely slow today though

#

But there may be some execution perfections i could do on my end

earnest phoenix
#

genuinly surprising

quartz kindle
#

o.o

#

really

#

what did they do back then?

earnest phoenix
#

no clue

#

they have only ever done one vc funding round

#

oh but it was last july

#

coorious

pallid zinc
#

I was trying to send a message if our mods are off
I created this but it only check for first mod

let mod = list.members.get("414622975598395398")
 let mod1 = list.members.get("280754036989493248")
 let mod2 = list.members.get("528917780561526804")
 let mod3 = list.members.get("420598739984711680")

let mem = mod|| mod1 || mod2 || mod3;

if(!mem) return message.reply("error")

if(mem.presence.status === "offline"){

message.reply("**our mods are offline..** *** we will reply you soon*** ") }
finite bough
#

i am 5 so gonna punch my laptop

earnest phoenix
#

maybe they just had the company registered sitting around

quartz kindle
#

Based in New York City, Fog Creek was founded in 2000 as a consulting company by Joel Spolsky and Michael Pryor. As the consulting market started to dry up due to the collapse of the Dot-com bubble, Fog Creek moved to a product-based business.[2] In December 2016 Anil Dash was appointed CEO.[3] Fog Creek's offices are located in the Financial District of Manhattan.[4][5] On September 25, 2018 the company was officially renamed Glitch after their flagship product.[6]

restive furnace
#

@pallid zinc cause mod1 exists even tho its offline

earnest phoenix
#

huh

#

neat

#

they only got funding last july too

#

@pallid zinc sec ill spoonfeed you

#

are you on master or what of djs

pallid zinc
#

Master

#

Just tell me

#

I try with forEach but it spam

restive furnace
#

const list = client.guilds.get("id");

list[i]
}```
#

starting dor u

#

think last ur self

#

look docs

marble juniper
#

try without the cache

#

idk if you need it or not

quartz kindle
#

there is no guild.cache

peak venture
#

Err.. some reason the webpage is lagging like hell xD

earnest phoenix
#

there

slate oyster
earnest phoenix
#

thats assuming you arent making onlineMods a global var

#

and its incapsulated in a method/function/event

#

depends the size of data your storing/manipulating and the computational stress of that @slate oyster

#

if its just a script taht stores a few things to a hashmap

#

thats like nothing resource wise

#

and it should actually be way lower

#

also hashmaps are actually pretty memory effecient

quartz kindle
#

why would memory usage be shown in the terminal app tho?

#

unless you're using like bash variables or something

earnest phoenix
#

im assuming your talking about java hashmaps

#

and not like node maps

slate oyster
#

Yea

earnest phoenix
#

yea i mean depends how much your storing etc

slate oyster
#

But my main thing is I'm holding on to objects
I create one for each user who talks per guild
And never let go of the obiect
And I've been doing this for 70 hours across 11 guilds
So I would expect memory usage to be much higher

earnest phoenix
#

how big are the objects

quartz kindle
#

but i still dont understand why you're expecting the memory usage to be shown in a terminal app? i mean i highly doubt the memory is being stored there

earnest phoenix
#

try looking for a jvm process or something

slate oyster
#

The program is running on the app
So realistically, I'd assume my program is using somewhere <22MB since Termux altogether uses 22 MB

It is sorted by app. No jvm listing, because it is Termux running the jvm, not android

earnest phoenix
#

do you know how many object were created total?

#

and are currently loaded into memory*

crimson vapor
#

It could just not be registered as the terminal process

slate oyster
#

No
But I'd assume quite a lot
Since it is across so many servers
Also those objects contain references to a third party api's objects
Highly developed=large

crimson vapor
#

if you can open 2 tabs, do a command to se ram usage

earnest phoenix
#

any way to see how many are existing? 11 guilds isnt a huge amount

#

and 1 object per unique user

#

i cant imagine would be intensive

crimson vapor
#

Only commands and events use ram tbh

#

How many commands do you have

earnest phoenix
#

what

slate oyster
#

I don't log how many objects I have
unique users per guild

quartz kindle
#

not really, commands and events dont use a lot of memory

#

what uses memory is storing data

earnest phoenix
#

commands practically use none compared to storing data

crimson vapor
#

More than an object though, right

earnest phoenix
#

no, ye to tim

#

hashmaps are just refrences not clones so maybe it just stores that the object exist but they point to the same methods etc? I dont know about the inner inner workings of hashmap to say that with confidence

#

but might be a thing?

quartz kindle
#

id say first find a reliable way to monitor memory usage

#

i wouldnt take what the app reports as reliable

void peak
#

Oof

earnest phoenix
#

yea best bet is to log memory stuff out and test

void peak
#

Uhhh

#

Oh

earnest phoenix
#

since hashmaps arent pass by value might just be refrencing the same methods etc etc

#

but then the vars of the refrenced objects and such Thonk

#

idk

#

just log your memory usage

slate oyster
#

I think in Java methods of a class are only loaded into memory up to one time

earnest phoenix
#

that would make sense

quartz kindle
#

methods of classes yes, but each instance of the class uses memory

#

if your classes only have methods and no actual data, then yeah it will be very little

#

but still a minimum amount per instance

grizzled raven
#

what do you do if you recieve the js Error: Client network socket disconnected before secure TLS connection was established error

earnest phoenix
#

restart your wifi

#

lol

#

or reconnect to discord with your bot

slate oyster
#

My classes have data
Including references to instances of objects from a third party library

earnest phoenix
#

are they super data intensive?

pale vessel
#

get better network

earnest phoenix
#

if its all pretty much methods with a few global vars here and there

#

then its a real /shug

slate oyster
#

I dunno
It's a third party lib
so I can't say how much data they use

quartz kindle
#

i mean, just look into how to monitor its memory usage

#

open a new terminal tab, and run something like top

slate oyster
#

ok

peak venture
#

@earnest phoenix gotto await this answer from me. According to the status of Glitch projects at this moment are very slow. I'll get back to you

earnest phoenix
#

resource management/monitoring on a phone sounds not fun

slate oyster
quartz kindle
#

welp

earnest phoenix
#

nice

#

we are doing lots of java swing gui stuff recently all manually long form

#

and i want to die

#

java gui's without something like intellijs scene builder hurt

quartz kindle
#

your phone is not rooted is it?

slate oyster
#

Nope

earnest phoenix
pale vessel
#

flash magisk

quartz kindle
#

@slate oyster try using some monitoring app that lists per-process cpu and memory

#

should show processes like: app.android.termux.apk or something along those names

slate oyster
#

Ok

#

On data rn
will later

earnest phoenix
#

want a quick way to know if your app is monitoring correctly? just write a quick recursive function that fills an array with arrays of like 2mil size over time mmLol

slate oyster
#

lol

finite bough
tight plinth
#

Lol

pallid zinc
#

Uber thanks but I use stable

#

I changed it accounting to my use

finite bough
#

WHY IS SQL SO HARD

slate oyster
#

I don't get it
Probably because I don't use SQLTools

finite bough
#

neither do i

#

neither does anyone in this world

#

lmao

quartz kindle
#

what are you trying to do?

finite bough
#

make a table

#

format

amber fractal
#

SQL's syntax always confused me. It's supposed to be english, so it should be easy, but I find it easier to use properties and methods like that

finite bough
#

to view my data

quartz kindle
#

cant you just make it with code?

finite bough
#

like

quartz kindle
#

if you want to edit the file directly, use something like db browser

finite bough
#

welp

#

it didnt work but i will try again

quartz kindle
#

what does "didnt work" mean in this case?

finite bough
#

db browser

quartz kindle
#

.... what didnt work?

pale vessel
#

nothing works in life ๐Ÿ˜ญ

tight plinth
#

True

finite bough
#

nvm screw sql ima play something

vestal star
#

Could somebody help me with dblapi webhooks?

small prairie
#

For server count?

tight plinth
vestal star
#

No, vote

#

ok

lyric mountain
#

No, vote
@vestal star you can either make your code check for lastest votes or setup a webhook

#

the latter is a bit harder, but will be more efficient

peak venture
#

@quartz kindle and @earnest phoenix i adjusted the code slightly but now only getting the last ship in the line (most likely due to overwriting the dataObject)

Can you guide me the right direction again?

#
     let shipNames, shipColor
    
    let html = "";
    ships = Tabledata.map(s => s.userInfo[3])
    console.log(ships[0].length, ships[0][0].length) 
    // ships[0].length = 35, ships[0][0].length = 2 [[Zao, #1b82e3]]
    for (var i = 0; i < ships[0].length; i++) {
      shipNames = ships[0][i][0]
      shipColor = ships[0][i][1]
    }
    console.log(shipNames)
    console.log(shipColor)
    username = Tabledata.map(u => {
      return `<tr><td>${u.userInfo[0]}</td><td style=\"background-    color:${shipColor};\">${shipNames}</td></tr>`
    })```
quartz kindle
#

those last 4 lines must all be inside the for loop

#

and that return there is weird

#

what do you want to return?

peak venture
#

uber gave me that return

#

i dunno wether it makes sense

quartz kindle
#

ah nvm

#

i was looking at something else

peak venture
#

the last 4 lines inside the loop @quartz kindle make my table go like this:

quartz kindle
#

you have to do something completely different than what you're doing

#
for (var i = 0; i < ships[0].length; i++) {
    let user = Tabledata[i].userInfo[0];
    let ships = Tabledata[i].userInfo[3].map(ship => `<div class="ship"><span class="shipname">${ship[0]}</span><span class="shipcolor">${ship[1]}</span></div>`)
    let html = `<tr><td>${user}</td><td>${ships}</td></tr>`;
}
#

or if you want the color to be directly used for background color and nothing else, change the .map to <div class="ship" style="background:${ship[1]}">${ship[0]}</div>

peak venture
quartz kindle
#

no

#

if you have let html = ""; then change the one in the loop to html +=

#

and remove this `username.forEach(discord_id => {
html += discord_id

});`
#

also remove ships =

#

also remove userShips

#

no need for username either

peak venture
#

how would it know ships[0] then?

#

that would be Tabledata i assume

quartz kindle
#

yes, it gets them directly from Tabledata

#

in the loop

peak venture
#

UnhandledPromiseRejectionWarning: TypeError: Tabledata[i].userInfo[3].map is not a function

quartz kindle
#

actually i made a mistake, change the loop to for(let i = 0; i < Tabledata.length; i++)

#

and it seems i got the structure for userInfo wrong

#

can you show what console.log(Tabledata[i].userInfo) looks like?

#

you can just do console.log(Tabledata[0].userInfo) somewhere

earnest phoenix
#

How can i attachfiles in an embed?

quartz kindle
#

files or images?

earnest phoenix
#

an gif

quartz kindle
#

use an attachment, then set the embed image URL to http://attachment/imagename.gif or something like that

#

let me check

earnest phoenix
#

How client will know the attachment?

quartz kindle
earnest phoenix
#

Please send me that doc link

quartz kindle
peak venture
#

@quartz kindle

 [ 'yohane1',

  'eu',

  500370681,

  [ [ 'Zao', '#1b82e3' ],

    [ 'Yueyang', '#ab7ee3' ],

    [ 'GroรŸer Kurfurst', '#ab7ee3' ],```
quartz kindle
#

then it should be correct

digital seal
#

helpo

#

helppp

#

How can I land when anyone opens Tiket sends a message I am writing

#

@unreal cape

#

@wanton rock

#

PLZ Help

pale vessel
#

stop mentioning people

#

people will help when they can or when they have the time

#

also, your objective is vague af

scenic kelp
#

^ plus your question seems super vague

copper cradle
#

yeah

solemn quartz
#

guys can you help me with a command?

digital seal
#

i can or no?>

pale vessel
#

sure

copper cradle
solemn quartz
#

probably ill need to install a npm

#

but

copper cradle
#

"a npm"

pale vessel
#

node comes with npm though

copper cradle
#

"a module" โˆš
"a npm" ร—

solemn quartz
#

Do you know the bots that does something like "To use NSFW commands u must vote"

earnest phoenix
#

yeah an npm sounds better peepoClown

pale vessel
#

an npm package maybe

solemn quartz
#

...

pale vessel
#

that sounds like an API thingy majig

solemn quartz
#

when i install something i do npm install (something) Ok?

copper cradle
#

yes

scenic kelp
#

yes that is how you install npm packages

solemn quartz
#

gud

finite bough
#

yes

#

get an npm

solemn quartz
#

what

scenic kelp
#

stop mocking him smh

slender thistle
#

Best way to do that is to use the webhook that dblapi.js provides

copper cradle
#

lmao

pale vessel
#

lazy people do npm i, including me

solemn quartz
#

and me

finite bough
#

I am mocking ricochet

quartz kindle
#

i do npm install

#

xD

solemn quartz
#

npm i or npm install

copper cradle
#

I do yarn add

scenic kelp
#

tim you are no longer welcome here

pale vessel
#

to each their own

#

so yeah

solemn quartz
#

i do how i want to in that moment

tight plinth
#

npm i team

copper cradle
#

hi

solemn quartz
#

...

pale vessel
#

hi

tight plinth
#

Hmm

copper cradle
#

๐Ÿ˜ณ

earnest phoenix
#

npm i > npm install

pale vessel
#

yes

tight plinth
#

^

quartz kindle
#

if anything, programming teaches you to be as explicit as possible. install is more explicit than i so...

#

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

pale vessel
#

help him

slender thistle
#

This server never stops surprising

pale vessel
#

why are we talking about npm again

tight plinth
#

This server never stops surprising
@slender thistle yes

pale vessel
#

smh

finite bough
#

npm install tim

slender thistle
#

Can we get to the issue now

finite bough
#

module tim was installed

slender thistle
pale vessel
#

yes we can

solemn quartz
#

:p

finite bough
#

ok to the issue

pale vessel
#

stop

solemn quartz
#

Do you know the bots that does something like "To use NSFW commands u must vote"
?

#

i want to do that

pale vessel
#

you need the API

tight plinth
#

Wait for ur bot to get approved

solemn quartz
#

Best way to do that is to use the webhook that dblapi.js provides
Oki

pale vessel
#

go to #topgg-api and see some examples in the meantime

solemn quartz
#

Wait for ur bot to get approved
I know

slender thistle
#

On vote, save user in DB for 12 hours
Store in cache to quickly fetch the data
Fetch user ID and if they voted, allow them to use NSFW commands

solemn quartz
#

Oof

#

im ded

pale vessel
#

challenge accepted

solemn quartz
#

Nope

#

challenge denied

pale vessel
#

it's the only way

scenic kelp
#

if you don't do things you don't know how to do, you won't learn how to do new things

pale vessel
#

you gotta get gud

scenic kelp
#

damn i can't type today

pale vessel
#

me neither

solemn quartz
#

lol

#

i dont even know how to rwurqw.type.AHDASD

#

Me: Alexa, Write "Me: Alexa, Write lol"
Alexa: Move your fucking fingers idiot

earnest phoenix
#

This ain't no programming

quartz kindle
#

to get votes you need to use the top.gg api. there are two ways to use it: receive vote updates in real time and store them, or fetch votes and check if the user voted

solemn quartz
slender thistle
#

latter being more prone to delays

solemn quartz
#

So ill probably do that when my bot is released

pale vessel
#

approved you mean

tight plinth
#

^

pale vessel
#

remove caret posts

earnest phoenix
#

^

hollow sail
#

Since a while my bot shows as offline on top.gg. Is there any requirement to be shown as online?

quartz kindle
#

it needs to be in this server. if it shows offline it means it was kicked from here

hollow sail
#

Oh okay. My bot was already approved. is there a way to get it invited again?

tight plinth
#

dm a mod

lyric mountain
#

what's a verification level?

drowsy sentinel
#

A criteria that users who join your server must meet.

#

None Unrestricted
Low - Verified email with Discord
Medium - Registered for longer than 5 minutes
(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป - On the server for longer than 10 minutes
โ”ปโ”โ”ป ๏พใƒฝ(เฒ ็›Šเฒ )ใƒŽๅฝกโ”ปโ”โ”ป - Verified phone on their Discord account

lyric mountain
#

ah, that

thorny meteor
#

i cant get ping in v12

#
const client = new Discord.Client({ fetchAllMembers: true });```
#

is this why?

quartz kindle
#

no

#

wdym you cant get ping?

#

show your code

thorny meteor
#

the ping cmd not working

quartz kindle
#

i cant think of any reason for it to be undefined

thorny meteor
#

The output is NaN

quartz kindle
#

NaN means "not a number"

#

you have a type mismatch somewhere

#

show your code

thorny meteor
#

k

#

module.exports = {
    name: 'ping',
    execute(message, args){
message.channel.send(` Pong!! \n Latency is ${client.ws.ping} API Latency is ${Date.now() - message.createdTimestamp}ms`);
    }
}```
quartz kindle
#

which one is returning NaN?

tight forum
#

guyz hey

#

need a little help about node

#
Error: Cannot find module 'C:\Users\minecraft\Desktop\Lemniscate Development\nod
e_modules\sqlite3\lib\binding\node-v72-win32-x64\node_sqlite3.node'
thorny meteor
#

Latency

tight forum
#

sqlite3 already installed btw

thorny meteor
#
client.ws.ping``` Not working
tight forum
#

it says use npm rebuild but its not working

drowsy sentinel
#

You didn't define client.

#

What does execute look like in your message event?

thorny meteor
#

i defined client

quartz kindle
#

@tight forum what does "not working" mean? what happens when you run rebuild?

tight forum
#

mm

quartz kindle
#

@thorny meteor client is not defined there

tight forum
#

w8 please

thorny meteor
#

it id defined up

#

is^

quartz kindle
#

you have execute(message,args) so you're only receiving a message and args

thorny meteor
#

oh

#

so

quartz kindle
#

if you are creating a new client up there, then that will be a completely separate disconnected client

thorny meteor
#

execute(client,message,args)

quartz kindle
#

you need to get from the same client where you are running your commands from

#

thats one option yes

#

another option is to get it from message

#

message.client

thorny meteor
#

thx

#

@quartz kindle

#

it works

quartz kindle
#

@earnest phoenix message.guild.verificationLevel does not return a number in v12, you cannot use it as an index for another array

#

just do message.guild.verificationLevel and not serverLevel[message.guild.verificationLevel]

#

and remove serverLevel

thorny meteor
#

and

#

how to find roles

#

in v12

quartz kindle
#

guild.roles.cache.find

thorny meteor
#

docs are just saying something else

#

thx

quartz kindle
#

go to the v12 docs

thorny meteor
#

how do u guys learn new updates this fast?

quartz kindle
#

i've been using it for over 6 months

thorny meteor
#

pro coder

#

๐Ÿ‘

quartz kindle
#

i actually am lol, i make money with coding

thorny meteor
#

how?

quartz kindle
#

i get hired to do coding jobs

thorny meteor
#

oh nice

#
 let muteRole = client.guilds.cache
        .get(message.guild.id)
        message.guild.roles.cache.find("name", "Muted");```
#

getting error as

#
TypeError: Cannot read property 'roles' of undefined
tight plinth
#

.guild__s__

tight forum
#

i hope gonna fix my problem

thorny meteor
#

.guild__s__
@tight plinth huh?

#

oh the s

#

thats my mistake

#

in program it is correct

tight plinth
#

Yed

quartz kindle
#

if message.guild is undefined, then the message came from a DM

copper cradle
#

lmao

#

it's not guilds

#

it's guild

#

if guild is undefined

#

then the message is....

#

what tim said

thorny meteor
#

how to get a persons id in v12?

vernal yoke
#

still, client.user.setStatus("dnd"); doesn't change the discord icon into the red one on 12.0.2 :\

quartz kindle
#

@thorny meteor wdym

tight plinth
#

@vernal yoke works for me

vernal yoke
#

@tight plinth doesn't work for me for 4 days already.

#

never worked in the first place

tight plinth
#

Hmm

#

What djs version, exactly

vernal yoke
#

12.0.2

tight plinth
#

Oh

#

@earnest phoenix message.member.permissions.has('BAN_MEMBERS') maybe?

#

@vernal yoke try going back to 12.0.0

vernal yoke
#

@tight plinth cant be arsed honestly, for a simple icon change, everything works fine :p

tight plinth
#

Lol

#

Lemme check @earnest phoenix

#

if(!message.member.permissions.toArray().includes("BAN_MEMBERS")) @earnest phoenix

quartz kindle
#

setStatus is not working for me either lul

tight plinth
#

Hmm

#

Works for me

#

Maybe they changed it in 0.1 or 0.2

finite bough
#

:C

tight plinth
#

Look at the ping

#

Hmmm

#

What u tried

#

Ur sure he don't have perms

night thicket
#

no.yardฤฑm

#

hi

#

sa

digital ibex
#

w!serverinfo

finite bough
#

@tight plinth what db do u use

digital ibex
#

,,serverinfo

#

oh

tight plinth
#

@finite bough I don't use db

#

@digital ibex wrong Chan

digital ibex
#

wrong chat

#

yea

tight plinth
#

idk

#

Apparently no

tight forum
#

guyz need with glitch

#
npm ERR! path /app/node_modules/.staging/winston-2cc80f13/node_modules/async
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/app/node_modules/.staging/winston-2cc80f13/node_modules/async' -> '/app/node_modules/.staging/async-ba5de1c7'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

when i try to install express

hoary elm
#

How are you installing it?

tight forum
#

by the way i cant access to '/app/node_modules/.staging/winston-2cc80f13/node_modules/async'

#

with console

#

npm i express

#

should i use pnpm ?

hoary elm
#

And it added it to your package?

tight forum
#

nope

hoary elm
#

Make sure it's in your Package.json

tight forum
#

just giving error

#

let me check

#

oh...

#

there is no express

#

but pnpm worked

hoary elm
#

With glitch if you open the Package.json inside the editor there is an option to install packages

#

Use that to look for express and install it

tight forum
#

normally i use package.json

#

to install packages

#

but

#

this time express is not written

#

idk how was it

#

thank you anyway

hoary elm
#

Yeah it happens.

#

Np

tight forum
finite bough
#

do u get an error?

tight plinth
#

@earnest phoenix known bug

#

nobody knows

plucky jewel
#

What is the version discord.js? @earnest phoenix

#

Hmmm

tight plinth
#

@plucky jewel the bug is actually from the image

#

dbl is weird

hoary elm
#
      "https://top.gg/api/widget/669569770059989024.png" +
      "?gen=" +
      Math.random()
        .toString(36)
        .substring(2, 6);```

So you know the fact that he is trying to string an image and a text together and send them via a image field isn't the issue!?
#

Lol

#

Notice the " + "?gen

#

๐Ÿค” interesting never tried it personally was just a suggestion honestly

#

As Lumap said it's a bug that no one really knows how to fix right now so honestly I'm not really the right person to ask considering I haven't even experienced the bug yet

tight plinth
#

Maybe admins knows

quartz kindle
#

what bug?

finite bough
#

ayy tim back

#

welcome gift

quartz kindle
#

... what are you even doing?

finite bough
#

trying to read the file and make a copy

quartz kindle
#

copy to where?

finite bough
#

same file

#

witha. different. ame

#

name

#

step 1

#

read the file

#

step 1 failed

quartz kindle
#

step 1 - ctrl+C / right click copy
step 2 - ctrl-V / right click paste

tight plinth
#

Step 1 - shutdown ur pc

crimson vapor
#

Lmao

amber fractal
#

Same file, different name?

#

Right click rename

#

Enter new name

#

Press enter or click off

golden condor
#

How does one know coding yet not know how to copy and paste a file

finite bough
#

cant

golden condor
#

Using glitch?

finite bough
#

untypable,readable letters in sql

#

ye

golden condor
#

Press the 3 dots

#

And duplicate

finite bough
#

.,.

golden condor
#

And rename it

finite bough
#

I m using glitch for almost 4 yrs now

golden condor
#

Surprisingly, the buttons aren't lying to you

finite bough
#

sql is

golden condor
#

SQL is a different story altogether

finite bough
#

using console

#

I want to read it

#

like u inset pics using console

quartz kindle
#

why do you want to read it?

#

an sqlite file can only be read by an sqlite database program

finite bough
#

does a sqlite file contain loads of question Marks and stuff?

modest maple
#

what

#

why are you trying to read a db file like a txt file

finite bough
#

holdon

quartz kindle
#

@finite bough yes it does, because an sqlite file is written in binary, not text

#

you cannot read it as text

summer torrent
hoary elm
#

Usually some kind of database program like MySQL will allow you to read/edit them

summer torrent
finite bough
#

ah

#

oki

summer torrent
earnest phoenix
#

How i commit some updates to a branch ?

#

For example i have the branch dev, how i upload these files for this branch

#

Without uploading it to the master branch

tight plinth
#

Create a new branch

#

How do you push updates @earnest phoenix

earnest phoenix
#

git push origin master

#

I already created

tight plinth
#

WELL

earnest phoenix
#

I just want to upload the files

#

To the new branch

tight plinth
#

Git push origin 'branch name'

#

So...

#

git push origin dev

earnest phoenix
#

error: src refspec dev does not match any
error: failed to push some refs to GITHUB_URL
#

Same error that were giving me before

tight plinth
#

''

amber fractal
#

dev branch doesnt exist

#

Do git branch -a

violet frost
#

how do you make a bot

true ravine
#

With a lot of love, care and attention

#

And javascript

violet frost
#

and javascript?

true ravine
#

You don't have to use javascript if you don't want to

#

But I do

#

You can use python, java, javascript, the list goes on

violet frost
#

can i invite luca

#

xd

blissful scaffold
#

no, luca does not like being on other servers

violet frost
#

xd

grizzled raven
#

what do you do if you recieve the

Error: Client network socket disconnected before secure TLS connection was established

error

restart your wifi

ho

crimson vapor
#

in the faq there is a link to a tutorial on learning the basics of making a bot on js

grizzled raven
#

huh

crimson vapor
#

not replying to you

#

I see the confusion

#

I am not sure what to do with the error

grizzled raven
#

i know you arent

crimson vapor
#

oh

earnest phoenix
#

Why do you put return there

crimson vapor
#

what are you trying to do?

amber geyser
#

reaction.message.guild.member(user).has("687741847988076604") return;

What was it like to do that if the user who reacted and had x role made return?

violet frost
#

sdl[

digital ibex
#

hi

violet frost
#

hi

digital ibex
#

how do i get the cpu usage my bot is using

violet frost
#

im messed up

#

what about you?

#

lmfao

digital ibex
#

?

violet frost
#

-.-

#

nvm

digital ibex
#

ok

#

uh

#

no

modest maple
#

@violet frost not the place to ask

flat pelican
#

No ads @violet frost

violet frost
#

wdym

#

imma ask it in off topic-

modest maple
#

@violet frost you will get banned for that

flat pelican
#

They are muted

#

Your message confused them

#

Itโ€™s not allowed at all

modest maple
#

Sigh

#

People don't read the rules enough >.<

heavy marsh
#

Need a help on discord.js version 11
So in guildMemberAdd I wanna check if a member has a certain role in a different guild.

client.on('guildMemberAdd', async (member) => {
    
    if(member.bot) return;
    if(member.guild.id !== `687615474774573096`) return;
    
});```
What is the best way to do it?
quartz kindle
#

get the guild by id, and check if the member exists there

true ravine
#

Is it always the same guild you wanna check?

quartz kindle
#

if it does, check its roles

true ravine
#

Yeah if it's a know guild use Tim's method

heavy marsh
#

yep in the same guild

#

Mr Delivery ManToday at 23:48
Is it always the same guild you wanna check?

quartz kindle
#

if the guild is large, you might wanna fetch the member, just in case its not cached

heavy marsh
#

it has only 2000 members

#

but i guess its better to do that

quartz kindle
#

2000 is considered large

#

large is by default anything bigger than 250

heavy marsh
#

ahhh

summer torrent
#

what is the difference between cheerio and jquery

quartz kindle
#

jquery is a framework to simplify DOM operations

#

cheerio is a scraping library? i think?

summer torrent
#

Cheerio - Fast, flexible & lean implementation of core jQuery designed specifically for the server.

quartz kindle
#

so its basically a dom parser for server side

summer torrent
#

yes

quartz kindle
#

well then they should be like the fetch api and node-fetch

#

one is for browser, the other is a simulation of it for server side

heavy marsh
#
client.on('guildMemberAdd', async (member) => {
    
    let user = await member.guild.fetchMember(member);
    
    if(member.bot) return;
    if(member.guild.id !== `687615474774573096`) return;
    
    if(!user.guilds.get(`687615474774573096`).roles.find(r => r.name === "Server Staff Team") return member.kick();
    
});
#

Is this wrong?

quartz kindle
#

yes

heavy marsh
#

What would be the mistake?
All?

summer torrent
#

you cant get guilds of user

quartz kindle
#

you dont need to fetch the member of the guild it just joined, since it will be cached automatically

#

and what NMW said

summer torrent
#

*without oauth2

quartz kindle
#

to get guilds of a user you need to do the other way around. loop over client.guilds and see if user exists on each of them

heavy marsh
#

But want client be undefined?

quartz kindle
#

all discord.js objects have client attached to them

#

you can get it from everywhere, even member.client

heavy marsh
#

oK MESSED up

summer torrent
#

discord js v13 mmulu

quartz kindle
#

ye ik lul

#

gonna take a long while tho

summer torrent
#

what is emojiID

quartz kindle
#

is it a custom emoji?

#

then thats the problem

#

a custom emoji is obtained from a guild, and not all guilds are available in all shards

summer torrent
#

^

quartz kindle
#

you might be able to share emojis using broadcast eval

heavy marsh
#

let user = await member.client.guilds.get(xxx).fetchUser(member.id);

#

like this?

quartz kindle
#

fetchUser doesnt exist in guilds

#

there are users and members, they are two separate things

summer torrent
#

fetchMember

quartz kindle
#

users are stored in the client, members are stored in a guild

heavy marsh
#

ooo

quartz kindle
#

because one user can be a member of many guilds

heavy marsh
#

let user = await member.client.guilds.get(xxx).fetchMember(member.id);

quartz kindle
#

yes that should work

summer torrent
quartz kindle
#

but that will give you a member, not a user

summer torrent
#

you can get with .user

heavy marsh
#

let user = await member.client.guilds.get(xxx).fetchMember(member.id).user;

summer torrent
#

try it

heavy marsh
#
//Check if the user has the a staff role in join
client.on('guildMemberAdd', async (member) => {
    
    let user = await member.client.guilds.get(xxx).fetchMember(member.id).user;
    
    if(member.bot) return;
    if(member.guild.id !== `687615474774573096`) return;
    
    if(!user.roles.find(r => r.name === "Server Staff Team") return member.kick();
    
});
summer torrent
#

User object has no roles

#

only GuildMember

quartz kindle
#

you cant do await ...fetchMember().user

#

you have to await it first, or do (await ...fetchMember()).user

#

but anyway it seems like you dont want a user

#

so just remove the .user and you have the member

heavy marsh
#
//Check if the user has the a staff role in join
client.on('guildMemberAdd', async (member) => {
    
    let user = await member.client.guilds.get(xxx).fetchMember(member.id);
    
    if(member.bot) return;
    if(member.guild.id !== `687615474774573096`) return;
    
    if(!user.roles.find(r => r.name === "Server Staff Team") return member.kick();
    
});
summer torrent
#

yes

heavy marsh
#

Can we do member.addRole(xxx)

summer torrent
#

yes

quartz kindle
#

yes

#

nope

wide ridge
#

O.O

quartz kindle
#

your message will be in one shard, the emoji in another

#

neither in both shards

#

i can see two options (both are pseudocode and will probably not work straight away, but you should get the gist of it):

  1. broadcastEval("if(client.emojis.get(emojiID)) { client.chanels.fetch(channelID).then(channel => channel.messages.fetch(messageid).then(message => message.react)) }")
  2. fetchClientValues("emojis.get(emojiID)").then(value => client.emojis.set(emojiID,value).then(m.react(emoji)))
#

the gist is:

  1. find the shard that has emoji, fetch the channel, fetch the message, react (since neither channel nor message will be cached in other shards)
  2. attempt to import an emoji from another shard and cache it in the current shard
uneven monolith
#

I need help with something

#

When i play music with my bot close to the end of the song it starts skipping like every five seconds til the end, imm using ffmpeg, js, ytdl core, and opusscript.

lyric mountain
#

@uneven monolith have you tried changing the server's region to us?

#

Also, maybe it's bitrate issues

uneven monolith
#

maybe, how do i change it?

lyric mountain
#

Server settings -> change region

#

For bitrate: channel settings -> set bitrate slider

uneven monolith
#

ok, it is set to central us

lyric mountain
#

Also, the next music might be caching before it starts, which could be the cause if you're using a weaker host

uneven monolith
#

like a 4gb laptop

lyric mountain
#

Are you hosting the bot yourself?

uneven monolith
#

yes

lyric mountain
#

Is you connection strong enough for that?

#

Like, at least 1 Mb/s

uneven monolith
#

yeah, is liek 255mbps good enough

#

ok

lyric mountain
#

Hm, try the region or bitrate solutions, if those don't fix it then you might need help of someone who's more experienced with the library that you're using

uneven monolith
#

ok

drowsy sentinel
#

Library?

blissful scaffold
#

are you getting any errors?

wide ridge
#

should I regenerate my token?

earnest phoenix
#

there more than likely is an error happening

#

you probably just aren't handling it properly

blissful scaffold
#

Discord will return an error when your token isn't working, so it looks like you don't handle errors correctly

lyric mountain
#

Timeout

#

It couldn't connect within a certain time

pallid vector
#

would a card drop like Pokecord make the bot invalid for sign up?

#

(based on non prefixed messages, e.g. drops randomly based on user messages)

lyric mountain
#

Almost every bot is valid, except dickbots and spam/advertising ones

blissful scaffold
#

I think the bot will be accepted, but it will be muted on this server if it has random card drops

thorny meteor
#

Who pinged me?

merry grove
#

idk but my bot that im working on only one out of the 5 commands work im sad lmao.

astral yoke
#

When I try to make new commands and stuff, it makes this error.

#

It's done this before.

#
    at load (C:\Users\Cools\dog1bot\handlers\command.js:15:36)
    at C:\Users\Cools\dog1bot\handlers\command.js:29:27
    at Array.forEach (<anonymous>)
    at C:\Users\Cools\dog1bot\handlers\command.js:29:14
    at FSReqCallback.oncomplete (fs.js:152:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fyre@1.0.0 start: `node src/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fyre@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Cools\AppData\Roaming\npm-cache\_logs\2020-03-13T02_54_47_511Z-debug.log

C:\Users\Cools\dog1bot>```
#

I can read that's name undefined, but it happens when I make any new code, and when I would then delete the new commands I make, this error of undefined name would go away.

#

And it's not possible on my end, because it says that it's undefined in handlers.

#

In the handler*

#

Does anyone know why this just randomly happens?

copper cradle
#

show your code

thorny meteor
#

how to filter in v12?

#

message.guild.member.filter now roking

#

working^

copper cradle
#

members

thorny meteor
#

yea

copper cradle
#

not member

#

it's actually basic grammar

#

smfh

thorny meteor
#

thats not working

copper cradle
#

what's not working

#

message.guild.members.cache.filter() i think it is

thorny meteor
#

How to get channel count in v12?

red hollow
#

probably msg.guild.channels.cache.size for server and client.channels.cache.size for total

#

wdym

#

r u on latest v12?

wide ridge
#

v12? for nodejs?

red hollow
#

uh

#

d.js

wide ridge
#

o

red hollow
#

if ye try emojis.cache.get() instead

wide ridge
#

will do, what's a quick way to check my version?

red hollow
#

require('discord.js').version

thorny meteor
#
message.author.presence.game```
#

not working

red hollow
#

msg.author.presence.activities is an array

#

[0] is custom status and [1] is 'game'

#

iirc

#

so try msg.author.presence.activities[1].name
(replace msg with message)

thorny meteor
#

@red hollow not working

red hollow
#

what version of d.js u using

#

and if u dont have custom status set try msg.author.presence.activities[0].name maybe?

#

idk

thorny meteor
#

v12

#

Still same

red hollow
#

what error are you getting

thorny meteor
#
TypeError: Cannot read property 'name' of undefined```
red hollow
#

hm

#

idk

thorny meteor
#

does it work for you

#

can i use the old version some how?

red hollow
#

yes it does work for me

#

and you can use old version

#

npm i discord.js@version
for ex npm i discord.js@11.5.1

candid granite
#

its about damn time, my bot was verified!

prime cliff
#

Imagine not waiting and accepting any bot that gets added including ones that will just spam your DMs Smug

earnest phoenix
#

Yeah takes a while

drowsy sentinel
earnest phoenix
#

What is the fastest way to move files from your computer to a DigitalOcean Ubuntu VPS?

broken jay
#

FTP? @earnest phoenix

earnest phoenix
#

thanks @broken jay

thorny meteor
#

How do i find a role in v12?

wide ridge
#

I'm trying to fetch an emoji from a specific guild in my shard but it's returning my emoji object as empty

Here's my code (I use "this" because when I use "client", it says that "client is not defined"):
client.shard.broadcastEval(this.guilds.get("664509279251726363")).then(value => {
console.log(value);
//this.emojis.set("671848138935500836",value);
//m.react("671848138935500836");
});

#

when I log value, it shows that the emoji object is {} for my guild, even though I have over 30 emojis in that guild. Any ideas?

#

My goal is to grab one of the emoji's from that guild and use it to react to a message handled by the current shard

#

Since the current shard does not have the emoji cached it can't use it unless I set its cache somehow, right?

wide ridge
#

I also tried
client.shard.fetchClientValues(emojis.get("671848138935500836")).then(async value => {
client.emojis.set("671848138935500836", value);
console.log(value);
m.react("671848138935500836");
});
but to no luck ๐Ÿ˜ญ Value returns [ { }, { } ] ๐Ÿ˜ญ

tight plinth
wide ridge
#

is it supposed to be double quotes? O.O

tight plinth
#

idk, looks the same

#

Try to remove them

wide ridge
#

So now I have

client.shard.fetchClientValues("emojis.get("671848138935500836")").then(async value => {
client.emojis.set("671848138935500836", value);
console.log(value);
m.react("671848138935500836");
});

#

returns [ null, null ]

#

๐Ÿ˜ญ

tight plinth
#

Erm

wide ridge
#

hmm in the examples, if I do client.shard.fetchClientValues(guilds.size).then(value => console.log(value))
Then I get [ 5, 13 ], which is right

#

so the single quotes thing should work

#

just I can't seem to be able to grab a specific emoji from a specific guild that one of my shards is serving ๐Ÿ˜ญ

tight plinth
#

Hmm

wide ridge
#

It seems when I try to fetch the 'emojis' object of the guilds in my shards, I receive an empty result
client.shard.fetchClientValues(emojis).then(value => {
console.log(value);
});
Value is [ {}, {} ] for both of my shards, even though I have tons of emojis. Any ideas?

#

Could it be because my sharding is not set up correctly?

#

I'm using Discord.js 11.5

wide ridge
#

I console logged my client.shard, and noticed there's no "emojis" property anywhere, nor is there any mention of emojis. How could this be? O.O

#

I'm guessing because the emojis object is inside one of the guilds object in my shard?

#

Update:
This worked: console.log(client.shard.client.guilds.get("677592580334288948").emojis);

tight plinth
#

client.shard.client

#

I'll never understand shards

wide ridge
#

๐Ÿ˜ญ

#

still trying to figure out my overlying issue but progress is progress xD

earnest phoenix
tight plinth
earnest phoenix
#

Pretty sure

finite bough
green kestrel
#

ok, so why does every damn lame-ass botlist have a problem with my invite link, except top.gg and maybe 1 or 2 others

#

everywhere i put my invite link, they strip it down to just the bot id and no permissions

#

taking out my oauth2 scope and redirect uri

#

they all exhibit exactly the same bug, are they all forking some generic "bot list" code?

slender thistle
#

Generally it's to keep servers safe from being nuked with bots that decide to go crazy upon joining with permissions

green kestrel
#

but it doesnt make sense, some bots need the oauth2 scope

#

and on those same lists nothing stops me putting a permissions with everything or Administrator

#

i think its just a crap regex they all copy

slender thistle
#

Sorry to say it, but they don't exactly care as far as I understand :^)

earnest phoenix
#

Other bot lists are bad anyways