#development

1 messages · Page 1364 of 1

earnest phoenix
quartz kindle
#

that doesnt mean its installed

strong tundra
#

try re-running npm i or yarn

quartz kindle
#

npm i better-sqlite3

earnest phoenix
#

ok

#

Nothing changes

quartz kindle
#

show what happens when you try installing it

earnest phoenix
#

ok

#

is all that

regal creek
#

Delete the 'better-sqlite3' dependenci in the Package.json and npm i then npm i better-sqlite3

quartz kindle
#

did it not occurred to you that if there are a bunch of errors when installing, it likely means that the installation failed?

earnest phoenix
#

no

#

xd

regal creek
#

Oh wait

quartz kindle
#

your installation failed because python is missing

earnest phoenix
#

Delete the 'better-sqlite3' dependenci in the Package.json and npm i then npm i better-sqlite3
@regal creek ok

strong tundra
#

yeah install build tools and python

quartz kindle
#

if you're on windows, you need to install build tools

regal creek
quartz kindle
#

npm i -g windows-build-tools from an admin powershell

earnest phoenix
#

npm i -g windows-build-tools from an admin powershell
@quartz kindle ok

strong tundra
#

here's my oracle server

#

net speeds are trash ik

blissful coral
#

So I am completely redoing my entire bot cuz of sharding bullshit and for some reason this is not working:

#
const Discord = require(`discord.js`)
const config = require(`../config`)
const db = require(`../database/db`)
const prefix = config.prefix
module.exports.run = (message) => {
    if(message.author.bot) return;
    const client = message.client
#

Apparently client is not defined?

young flame
#

hmm

quartz kindle
#

disk speeds are more trash xD

#

but still better than google compute engine

#

google's disks are 35MB/s

young flame
#

@blissful coral message client isn't a thing hhhhh

blissful coral
#

message.client??

young flame
#

use discord.client

blissful coral
#

It work's exactly like that on my other bot

young flame
#

idk

blissful coral
#

@young flame Not making a new one, the client already exists

young flame
#

discord did a new one

#

like a mini update

#

it broke my bot lmao

blissful coral
#

hmmm

young flame
#
const client = new Discord.client()
blissful coral
#

When making the channel set the permissionOverwrites to everyone in the guild to not talk

quartz kindle
#

@lyric mountain ya got results yet?

blissful coral
#

@young flame read what I said

#

It is my event

#

I am not making a new client

#

This is my message event.

young flame
#

message.client wont work

blissful coral
#

Works correctly right here

#

on my other bot

solemn latch
#

message clients fine

blissful coral
#

Thought so

blissful coral
#

Well I found one part

young flame
#

Thought so
@blissful coral it wont work lmao

#
new Discord.Message(clientdatachannel);
blissful coral
#

If you can give me a valid reason why it won't work

young flame
#

that is an option

quartz kindle
#

what the fek

solemn latch
#

its in the docs Thonk

blissful coral
#

message#client is a thing

#

lmao

young flame
#

ik

blissful coral
#

That is what I am using

young flame
#

what are you pulling message.client from if your client isn't defined

solemn latch
#

did he say client is undefined

young flame
#

@solemn latch it isnt

solemn latch
#

what are you pulling message.client from if your client isn't defined
then whats this about

young flame
#
new Discord.Message(clientdatachannel);

@young flame

quartz kindle
#

its a message event, if you receive a message, there is a client in there for sure

young flame
#

you need a constructor

quartz kindle
#

if there was no client you would never receive a message in the first place

solemn latch
#

^

blissful coral
#

You don't need a constructor

solemn latch
#

Im not sure what your question is

blissful coral
#

@earnest phoenix busy

young flame
#

the docs says it

quartz kindle
#

no lmao

young flame
solemn latch
#

the docs says message classes have clients

young flame
quartz kindle
#

the docs explain how the Message class is made and how it works, it doesnt tell you to literally create an empty message instance lmao

solemn latch
#

whats your actual question though @earnest phoenix

young flame
#

it isn't empty

quartz kindle
#

if you create it like that it is empty

young flame
#

???

#

bruh

#

ok

solemn latch
#

youll want to have an event for when users join vc

#

i forget which event that is 🤔

drowsy kite
#

my bot send 4 messages

quartz kindle
#

@drowsy kite show code

#

portugal caralho

young flame
#

when did i say just client?

drowsy kite
#

portugal caralho
@quartz kindle tmb es?

earnest phoenix
#

hay carajo

blissful coral
#

I fixed the problem already

young flame
#
new Discord.Message(client, data, channel);

@young flame

#

smfh

#

and dont ping me

blissful coral
#

That is not it

young flame
#

That is not it
@blissful coral ik shush

quartz kindle
#

@young flame and where do you suppose you're gonna get the data from?

solemn latch
young flame
#

and dont ping me

#

i'm right here

#

not going anywhere

earnest phoenix
quartz kindle
#

wait until it says ALL DONE

earnest phoenix
#

NOOO

#

AAA

quartz kindle
#

YES AAA

earnest phoenix
#

i closed the window...

#

putamadree

quartz kindle
#

then open it again and install it again

#

con tres cojones

earnest phoenix
#

JAJJAJ

drowsy kite
#

hi

earnest phoenix
#

con los dedos de los pies y las manos, con la polla y los cojonoes todos suman 23

quartz kindle
#

lmao

young flame
#

hhhhh

blissful coral
#

When I use the shardingManager on discord.js, is there a way to get client from manager?

#
const manager = new ShardingManager(`./index.js`, {
solemn latch
#

lemme see

#

I dont see client as a property

quartz kindle
#

no

#

managers dont have clients

#

the clients are in the child processes

blissful coral
#

Thought so thanks

earnest phoenix
#

@quartz kindle the screen is like blinking

#

MI PC IS SO LAGG

#

AAA

quartz kindle
#

BBB

lyric mountain
#

@quartz kindle I'm back, I'll run the bench again and save it to a file this time

earnest phoenix
#

what is this

#

wea

blissful coral
#

how can I manually put info into my dbl api connection upon start

#

because I can't get overall guild count

#

cuz of sharding

#

dblapi.js

earnest phoenix
#

a las doce me llama la señora culia

blissful coral
#

djs

quartz kindle
#

dblapi.js supports sharding

#

you can use it normally with the autoposter in each shard and it will send the server count from each shard

earnest phoenix
#

Tim, the thing you made me install takes 30m and doesn't stop

#

xddddd

faint prism
#

shoulda backgrounded it

#

lol

boreal iron
#

Tim‘s is known to send his coinbot virus around make u earn Bitcoins for him

#

It well never stop to „install“

faint prism
#

Defamation of the holy Tim. Heretic!

earnest phoenix
#

nooo

#

i closed the terminal

#

again

quartz kindle
#

lmao

earnest phoenix
#

LOOOL

quartz kindle
#

restart your pc and try again

earnest phoenix
#

@quartz kindle nono

#

seeee

#

se

#

mira

#

in vsc if it installs me and although the powershell is closed there, things continue to install

#

now

#

this

solemn latch
#

did you define sqlite?

umbral zealot
#

you already know the answer to that, Woo 😛

earnest phoenix
#
 
const { Client, MessageEmbed } = require('discord.js');
const Discord = require("discord.js");
const SQLire = require("better-sqlite3");
const client = new Discord.Client();
const sql = SQLite('./treeLogs.sqlite');


module.exports = async (client, message) => {
  if(!message.author.id === message.guild.owner) return message.reply("You do not have permissions to view chat logs.");
  const msglogs = sql.prepare("SELECT username, message FROM lounge LIMIT 1").all(message.guild.id);
  const embed = MessageEmbed()
      .setTitle("Message Logs")
      .setAuthor(client.user.username, client.user.avatarURL)
      .setColor(0x00AE86);
      
  for (const data of msglogs) {
    embed.addField(client.users.get(data.user).tag, `${data.username} points (level ${data.message})`);
  }
  return message.channel.send({
    embed
  });
}
solemn latch
#

const SQLire = require("better-sqlite3");

#

🤔

earnest phoenix
#

what's up with that

quartz kindle
#

lmao

earnest phoenix
#

OO

#

sqlire

#

xd

solemn latch
#

const SQLire
SQLire
SQL
L

earnest phoenix
#

muchas gracias guapos

sudden geyser
#

SQLite lies

young flame
#
if(message.content === "pog") {
message.channel.send("poggers")
}
#

i get a not pog enough error

#

how to fix

safe creek
#

@young flame copy paste pog gets and pog in different fonts 100 times lol and make it ping the user saying pog in the dms

#

That’s ultra pog

young flame
#

ok

fiery canyon
#

does anyone have an idea on how to check if a user is in the message.guild without server members intent

solemn latch
#

try fetching them?

fiery canyon
#

apparently, in my case, fetch was able to fetch the user, even after they left the guild

#

idk how is that

solemn latch
#

they would still be in cache, which fetch checks cache first

fiery canyon
#

oh

#

how do i disable that

solemn latch
#

set force true

fiery canyon
#

message.guild.members.fetch({user: id, force: true})

#

i tried that

#

didn't work for me

#

or am i doing it wrong

lyric mountain
solemn latch
#

message.gulid doesnt exist

drowsy kite
#

my bot send 4 messages

#

in same time

solemn latch
#

looks like you logged in on 4 instances, login on only one @drowsy kite

fiery canyon
#

Woo it exists in my case

solemn latch
#

gulid?

ornate python
#

lol

fiery canyon
#

Yeah message.guild

#

I mean

solemn latch
#

guild does

fiery canyon
#

The problem is

solemn latch
#

gulid doesnt

drowsy kite
#

looks like you logged in on 4 instances, login on only one @drowsy kite
@solemn latch ?

fiery canyon
#

oh sory must've mistyped it in discord

#

but that isn't the problem

solemn latch
#

oh?

fiery canyon
#

problem is, it still fetches users without being in the guild

solemn latch
#

oh, your talking about your problem

#

i thought you where talking about tokyo

drowsy kite
#

@solemn latch how do i login on only one?

fiery canyon
#

oh lol sorry

drowsy kite
#

instance

fiery canyon
#

yeah gulid is supposed to be guild

solemn latch
#

force: true should only get stuff from the api, if the api says that the user is in the guild, i am not sure how you solve that

#

@drowsy kite depends on how you host it. whatever command you do to run your bot, you ran it 4 times without closing the other ones more than likely

fiery canyon
#

if the user doesn't exist, does .catch(x => work

solemn latch
#

catching the error when it doesnt?

fiery canyon
#

yeah

#

or is it not an error?

drowsy kite
#

@drowsy kite depends on how you host it. whatever command you do to run your bot, you ran it 4 times without closing the other ones more than likely
@solemn latch i don't have my bot in a host, he is vs code in terminal 😂

solemn latch
#

yes, but you really should try and have as few of those errors as possible @fiery canyon

#

the proper way is the intents

fiery canyon
#

i mean i already emailed them about it

drowsy kite
#

can you recommend one for free?

#

one host

solemn latch
#

this just being a bandaid till you can get that intent

fiery canyon
#

yeah

solemn latch
#

@drowsy kite if you're hosting locally, you need to stop the other 3 processes

#

or, if you restart your pc and only open one, and close it before launching another

drowsy kite
clever dust
#
app.post('/webhook/dblwebhook', (req, res) => {


    const message = req.body;
    const headers = req.headers;

    if (headers && headers.authorization === token) {

        res.status(200).send(); 
        console.log(message)
        client.user.fetch(message.user).then(e => {

            const voteembd = new MessageEmbed()
            .setAuthor(e.tag || '', e.displayAvatarURL() || '')
            .setTitle("Someone just voted")
            .setDescription(`${e.tag} Just Voted :love:\nThanks for Voting! You can also vote me on https://top.gg/bot/BotID/vote`)
            .setColor("YELLOW")

            client.channels.cache.get('773326789837586432').send(voteembd)

            const dmvote = new MessageEmbed()
            .setTitle("Thank you vor voting White Cat :love~1:")
            .setDescription("We really appreciate your vote :love~1:")
            .setColor("RANDOM")
            e.send(dmvote)
            .catch(er => {

            })

            const support = client.guilds.cache.get("742313007681634344")
            if(support.member(e)){
                support.member(e).roles.add("771458666318397440")
            }
        })
  

    } else {
   
        res.status(403).send();

    }

});


Why does when someone votes, then i fetch it, it returns the bot itself? but when i log message.user, its the user?

solemn latch
#

where are you getting message?

#

oh

#

i see

#

not sure why body is named message, kinda confusing

normal sage
#

Anyone know how to make a bot DM people a certain thing when they react to a message?

solemn latch
clever dust
#

seems like you pinged the wrong person

solemn latch
#

what

#

ah

#

🤷‍♂️

clever dust
#

oh wait.... yeah, i just realized, its client.users, not client.user

weary socket
#

I ve heard a lot about a Content Management System for Discord Bots.....For what do they need that?

#

I mean like Mee6 does have one

#

But for what?

solemn latch
#

cms does a handful of things.
it makes big projects with a dev team easier mainly afaik.

sudden geyser
#

You mean a mod mail bot?

weary socket
#

?

sudden geyser
#

Oh I read it wrong, thought that said "Contact Management System"

normal sage
#

uh am I allowed to repeat my question?

quartz kindle
#

@lyric mountain cpu is dope, but those disk speeds are a no from me unfortuntely

weary socket
#

I mean I’m updating my Bot every day.....And I saw some bots have a cms....And I want to know what it does because if it’s good I will Programm that

sudden geyser
#

Elf do you want it to be on every reaction or on a certain occasion, like after a user runs a command.

solemn latch
#

if its just you, i dont see why you need cms

quartz kindle
normal sage
#

Elf do you want it to be on every reaction or on a certain occasion, like after a user runs a command.
@sudden geyser after a user runs a command

weary socket
#

if its just you, i dont see why you need cms
@solemn latch because I want the best for my Bot....And I don’t know what a cms is bringing the bot to get better....

#

And if it’s helping my bot....I am doing this

solemn latch
#

it makes development easier for large developer teams

weary socket
#

LOL

sudden geyser
weary socket
#

it makes development easier for large developer teams
@solemn latch only That? Nothing more?

normal sage
#

alright I will check that out, thanks!

solemn latch
#

not that i know of

weary socket
#

Ah ok

#

Nah it’s only me every hour lol....So ez

hollow sedge
#

@weary socket what is a content management system

solemn latch
#

A content management system (CMS)[1][2][3] is a computer software used to manage the creation and modification of digital content.

CMSs are typically used for enterprise content management (ECM) and web content management (WCM).

ECM typically supports multiple users in a collaborative environment[4] by integrating document management, digital asset management and record retention.[5]

hollow sedge
#

So git?

solemn latch
#

yeah, pretty much

worn shard
#

Yeah

#

But, use git instead of making your own.

#

👏

lyric mountain
#

since my bot is mostly heavy processing (games, image manipulation, yugioh, etc) I kinda like those specs

worn shard
#

I self-host

lyric mountain
#

but as you said, depends on your use-case

worn shard
#

I only get up to like 15% RAM at most

solemn latch
#

one day, ill get a dedi ryzen system pogey

#

and itll make me happy

solemn latch
#

for the one month i can afford it

hollow sedge
#

yeah classic yugioh heavy processing

worn shard
#

rpi 4 Friend^

lyric mountain
#

yeah classic yugioh heavy processing
@hollow sedge fully simulated table + deck + cards effects + fields + whatever

#

all this having computer generated graphics

#

so yeah, heavy processing

solemn latch
#

oo

hollow sedge
#

Epic

worn shard
#

Why not an api or something?

solemn latch
#

i am about to move to opengl

lyric mountain
#

opengl is dope IF you can understand it

worn shard
#

yea

solemn latch
#

its not that bad

hollow sedge
#

Why would you get an rpi instead of a vps

lyric mountain
#

I gave it a glance and BOI does it look like binary-puke

worn shard
#

Why would you get an rpi instead of a vps
@hollow sedge Personal preference

#

AWS is unstable

#

For me at least.

hollow sedge
#

What

worn shard
#

And I already had one(rpi)

hollow sedge
#

Tons of companies use aws

worn shard
#

Yeah

hollow sedge
#

It's not unstable

worn shard
#

For me my bot went offline 2 to 3 times a day

hollow sedge
#

I host my bot on AWS

worn shard
#

And I got emails

#

Saying

hollow sedge
#

It's never down

worn shard
#

"You reached your ratelimit"

hollow sedge
#

Wth

worn shard
#

When my bot didnt have commands

hollow sedge
#

That's not aws

solemn latch
#

hecking sick

worn shard
#

☕ imagine copying a status

solemn latch
#

my status

#

didnt copy it

worn shard
#

I did

solemn latch
#

so did i pandasad

worn shard
hollow sedge
worn shard
#

Nothing, I guess.

#

Personal opinion

#

Thats why I host on an rpi

hollow sedge
#

No but what were you saying

worn shard
#

Nevermind, please.

quartz kindle
#

whats your point, he literally doesnt do anything (you probably wont get the reference)

hollow sedge
#

Wdym please

#

You're confusing me

worn shard
#

I just don't pay for whats not exactly necessary.

#

If I have an open server why not use it.

hollow sedge
#

Are you saying you don't like the OS options

worn shard
#

Huh, No?

#

Um I like linux

#

So no.

hollow sedge
#

Ok

worn shard
#

It gets good performance.

quartz kindle
#

amazon is expensive once your free trial runs out

worn shard
#

It doesn't really matter.

quartz kindle
#

there are plenty of better options

hollow sedge
#

I mean any VPS

#

He just specifically said AWS

#

Also is it expensive?

solemn latch
#

kinda yeah

hollow sedge
#

Like how much tho

worn shard
#

|| Why don't people just drop it lmao, its not like I said anything hateful||

hollow sedge
#

We aren't talking about what you said anymore

#

At least I am not

worn shard
#

No offense if you work for AWS

#

Sorry in advance.

hollow sedge
#

I'm sure they don't take offense

#

It's more geared towards companies ig

prime cliff
#

Imo digital ocean and aws are too expensive better to get a host from galaxygate/servercheap if you want to run a bot

worn shard
#

Heroku dabhype

prime cliff
#

Contabo is meh for performance but has lots of storage for website stuff

hollow sedge
#

Heroku is joke right

worn shard
#

Yes

solemn latch
#

heroku is 24 days a month now free right?

worn shard
#

Of course

solemn latch
#

then like super expensive to buy 6 more days

worn shard
#

Idk or care

solemn latch
hollow sedge
#

That's honestly a good idea tho

#

Like just make it less than a month to stop people from doing that

quartz kindle
#

amazon's cheapest plan is about 3 bucks a month

#

for 500mb ram

solemn latch
#

yeah

hollow sedge
#

Wait no

solemn latch
#

took too long for me to find it

prime cliff
#

500mb ram for $3 oh god

hollow sedge
#

You can get 1000 hours per month on heroku

prime cliff
#

Most other hosts do $3 for 1GB at least

solemn latch
#

its 550 hours to 1000

#

correct?

prime cliff
hollow sedge
#

Yes

solemn latch
#

if you use more cpu you get less hours

hollow sedge
#

Oh

solemn latch
#

or something

#

more ram?

#

what was it

#

🤷‍♂️

hollow sedge
#

That just throws out the whole point of hours

solemn latch
#

does aws not even give you the cpu info

quartz kindle
#

@prime cliff which one s that?

hollow sedge
#

Aws gives you all the info

#

That's something they do really well

solemn latch
#

i cant find the lightsail cpu model

#

info

hollow sedge
#

Oh you mean like that

prime cliff
hollow sedge
#

I thought you meant cpu usage

solemn latch
#

every vps gives you cpu usage info

prime cliff
#

$3 for 500mb ram on amazon is bad compared to other hosts that have less infastructure

faint prism
#

I sure hope so

solemn latch
#

lool

#

aws over here getting terrible raitings

solemn latch
worn shard
#

Who would pay that

hollow sedge
#

This might be a dumb question but can you setup deploying from GitHub on a VPS/DigitalOcean

solemn latch
#

sure

faint prism
#

CD Pipeline

quartz kindle
#

anyone uses servercheap? would like to see benchmarks

worn shard
#

Nop

prime cliff
#

It gets good performance.
@worn shard If you want to brag about good performance how about a 72k server bot with guild members cached using 1.7 GB ram 🙃

hollow sedge
#

Yeah CD Pipeline, is that limited to some hosts?

solemn latch
#

on the $3 tier @quartz kindle ?

quartz kindle
#

ye

worn shard
#

@worn shard If you want to brag about good performance how about a 72k server bot with guild members cached using 1.7 GB ram 🙃
@prime cliff k cool

solemn latch
#

oh wth

#

server cheap $4.50 for 2gb 2 core

prime cliff
#

Js would hog 4 GB for that

solemn latch
quartz kindle
#

ye not bad

prime cliff
#

Yea servercheap is pretty good even though galaxygates network is nice i have a servercheap vps 12 GB ram 6 core cpu for $19.20 atm

opal plank
#

they say unmetered untill i start fucking with it

#

then they add a star on the end

quartz kindle
#

lmfao

#

@prime cliff care to run a benchmark?

opal plank
#

cant think anywhere else anyone would put a QT process mmulu

worn shard
#

\🍪

prime cliff
#

Probably would not be best to run a benchmark as i'm running a bunch of bots and api
on it atm

quartz kindle
#

likely wont matter much

#

im mostly interested in disk speeds

#

curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh

opal plank
#

it really scares me that tim either has that memorized or have that link handy

#

within second he pulled that link outta nowhere

quartz kindle
#

no, i always open a new tab, get it from autocomplete, open the page, copy and paste

opal plank
#

nice save, i still dont believe it though

quartz kindle
#

want a recording?

#

lmao

opal plank
#

its not even the grepo

#

repo*

#

its the full thing

quartz kindle
opal plank
#

i think it was a matter of a couple seconds before you sent that lol

#

oh

#

i though u only had the link

quartz kindle
#

no i go to the repo and copy the link from there

opal plank
#

im watching u tim

prime cliff
#

I'll test it on another servercheap vps hang on

quartz kindle
#

lmao

#

@prime cliff which tier?

opal plank
#

yo, im so bored i legit made a genshin bot

#

not even kidding

quartz kindle
#

whats genshin

opal plank
#

wot

#

erm, tim...

#

lets just say...

prime cliff
#

2 GB ram 60 GB storage and 2 cpu

quartz kindle
#

oh nice, thats the one im aiming for

opal plank
#

its something that exploded a month ago

#

a game

#

legit biggest discord server

worn shard
#

I have never heard of it lol

opal plank
#

pve, openworld, rpg, waifus, lots of waifus, lisa moaning while climbing walls, coop, and memes with paimon being food. That sums it

worn shard
prime cliff
#

Is it supposed to pause Tim?

#

Oh wait done

quartz kindle
#

it runs a few different tests

#

cpu, disk, network

#

@opal plank im a shitty league fanboy

opal plank
#

then you gonna love this game

#

they have characters n shit

#

and shooting people

#

its basically league

#

Fight? Check

#

its basically league of legends

#

cant believe im developing a bot for it

solemn latch
#

$3 plan

opal plank
#

i wonder if OCR is against their TOS

prime cliff
#

Network takes a while

opal plank
#

probably is

prime cliff
#

Also Woo is that amazons plan benchmark?

solemn latch
#

i dont have that one, but the website i was looking at said it was crap

#

until you start spending over $50

prime cliff
#

No the screenshot benchmark what host is that from?

solemn latch
#

servercheap

prime cliff
#

Wait what

solemn latch
#

I bought the $3 plan to see what it was like

prime cliff
#

The 1 GB plan?

solemn latch
#

ye

prime cliff
#

Oh

solemn latch
#

ima run an uptime test for a month and see how it goes

#

if its good i might swap hosts

prime cliff
#

2 GB one is this but disk read/writes are low probably cause i'm running a database on this with multiple services connected to it 🙃

quartz kindle
#

they dont give you cpu passthrough?

#

thats pretty bad

#

do they give refunds? if i get those speeds im gonna want a refund lmao

prime cliff
#

Wait the script is still running after host

quartz kindle
#

ye next is network test

#

its the last one

#

not worth it tbh

prime cliff
solemn latch
#

yikes the network

prime cliff
#

Yea not sure what's up with that thonk

quartz kindle
#

the results are fine

solemn latch
#

i upload like 20MB gifs regularly

quartz kindle
#

@solemn latch show your network test

solemn latch
#

still running

quartz kindle
#

lmao

#

do you have a proper cpu model? or do you have virtual QEMU?

solemn latch
#

oh wait

quartz kindle
#

ah so you have cpu passthrough

#

idk why @prime cliff doesnt

solemn latch
#

oop

prime cliff
#

Older vpses probably what does cpu passthrough basically do?

solemn latch
#

it gives more hardware level interaction iirc

quartz kindle
#

enables full cpu virtualization, gives you access to hardware features such as AES instructions

prime cliff
#

Ah ok

quartz kindle
#

you can request it

#

ask them about it in their support and they will enable it for you

#

i had to do that on galaxygate

prime cliff
#

Would that actually do much? considering i run a database on it too

quartz kindle
#

depends on how optimized your shit is

#

for example if you have anything that uses cryptography, then yes

#

cryptography is highly optimized to use low level cpu instructions

prime cliff
#

Wait lemme run htop

solemn latch
#

honestly, cpu score on mine was kinda terrible.
1487 servercheap $3
2465 galaxygate $3

quartz kindle
#

ye

prime cliff
#

About 2-3% cpu usage and 567mb ram usage

quartz kindle
#

i got this on mine

#

$3 galaxygate

#

network still loading

solemn latch
#

xeon e5-2650 @ 2.3GHz servercheap
xeon e5-2697 @ 2.7GHz galaxygate

#

well

prime cliff
#

Galaxygate probably has better hardware tbh than most older hosts

solemn latch
#

i got a server i dont want now

quartz kindle
#

lmao

solemn latch
#

oi @opal plank

#

no wait, you already got a sick ass server

#

hey tim, need a server for a side project

opal plank
#

lmao

prime cliff
#

I would switch to galaxy gate tbh but i'm pretty comfy with my 20% off 12 GB ram for $19.20 🙃

opal plank
#

a friend of mine managed to get a supercomputer through their company, and im on the verge of asking her if i could use it

solemn latch
#

honestly, really good platform if you dont depend on cpu speed

#

saddly everything right now to me is cpu speed

#

and internet

opal plank
#

can erwin fuckup a supercomputer? bets?

solemn latch
#

theres a company that was renting it out by the minute

opal plank
#

insert finally a worth opponent meme here

solemn latch
#

a super computer*

opal plank
#

i dont know how or why they renting it

#

she just told me they got one rn theya re using

quartz kindle
#

we really need to have a public vps benchmark

opal plank
#

do it

solemn latch
#

whos going to make the site for it

quartz kindle
#

just make a google sheets

opal plank
#

clearly not me

#

excel doc when?

#

anyhow, back to work

solemn latch
#

sadly, I suck at sheets

crimson vapor
#

wait for what?

solemn latch
#

documenting VPS's performance

crimson vapor
#

As in different companies and plans? and network cpu, ram and such?

solemn latch
#

yeah

#

using this command to test them
curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh

crimson vapor
#

cool concept and probably exists already but it would need to be popular or it would tell you stats of like 10-20 different VPSs max

quartz kindle
#

many similar things exist but they are all over the place

opal plank
#

adding another one would probably just bundle it to the mix

#

doubt it'd become an unified thing unless it suddenly grows or is very well done

#

preferrably both

crimson vapor
#

yeah

quartz kindle
#

yeah but it could be something like a comunity shared resource

#

instead of relying on unknown methodologies and stuff done by other people

blissful coral
#
const { ShardingManager } = require(`discord.js`)
const config = require(`../config`)
const manager = new ShardingManager(`./index.js`, {
    token: config.token,
    totalShards: 'auto'
})
manager.spawn()
manager.on('shardCreate', shard => console.log(`Starting Shard ${shard.id}`))
quartz kindle
#

kind of like a private list built by discord bot developers

blissful coral
#

This looks correct right?

#

Because my shard is dying before it connects

solemn latch
#

Heck, if everyone wants to send me their VPS's tested with what host and what plan it is, I can throw something together.

blissful coral
#
const Discord = require(`discord.js`)
const client = new Discord.Client({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'], ws: {intents: 14017}});



const eventhandler = require(`./events`)
const commandhandler = require(`./commands`)
console.log(`Starting Handlers...`)
eventhandler.run(client)
commandhandler.run(client)

Index.js

quartz kindle
#

if the shard is dying then the problem is in the shard

blissful coral
#

Uhhh

#

I totally...

#

Didn't

#

Forget to login...

quartz kindle
#

lmao

blissful coral
#

I hate remaking a discord bot

#

LMAO

quartz kindle
#

@solemn latch same lmao

#

i think a spreadsheet would be nice

crimson vapor
#

@solemn latch I would if other people do

quartz kindle
#

but im having a hard time trying to figure out how to format one in a way that looks nice

solemn latch
#

spreadsheets are hard

crimson vapor
#

to be honest, I have never made a real spreadsheet

quartz kindle
#

i've made several

solemn latch
#

okay good, we make tim do it

quartz kindle
#

lmao

crimson vapor
#

Tim already does so much for this channel tho

quartz kindle
#

i'll look into something

blissful coral
#

Thx tim

#

For like...

#

Reading my stupiditiy

#

LMAO

quartz kindle
#

but of course it only has the popular ones

#

we need a list with unpopular hosts, like stuff from lowendbox and lowendtalk

earnest phoenix
#
message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLowerCase().split("--test")) || message.member;

avatar username --test

not working. still sends my avatar.

crimson vapor
#

If you end up making a spreadsheet, you should get it pinned here

quartz kindle
#

could make a github repo as well

crimson vapor
#

so you are taking args (array) setting it to a string, then making it an array

#

and then comparing said array to a string

solemn latch
quartz kindle
#

could be easily tampered with

crimson vapor
#

It would be better as a github repo tbh

#

then use code to visualize it

solemn latch
#

well, just have a few of us manage it taking filling it in

#

and have them submit to us

quartz kindle
#

could make a github pages load the content for visualization and have people PR and post a pic of the benchmark for proof

crimson vapor
#

so then no one could make strange changes and it could look as you wanted it to

#

yeah that is a good idea

#

What would you store the data as? a json or something?

quartz kindle
#

either json or csv

#

json will probably be easier for people to pr

crimson vapor
#

tbh

#

make a command

#

and just ask for input

#

something small that just saves a string

solemn latch
#

did this just become a bot thing now

crimson vapor
#

That would make it easier for people to submit changes

quartz kindle
#

another thing is

#

how to handle ageing and multiple people testing the same service

#

how to handle variable results for the same service

solemn latch
#

average tests?

crimson vapor
#

not sure about ageing but we could save data as an array with objects and all of it would be averaged

quartz kindle
#

we could have an age field and if it gets too old it can be replaced by a newer test

crimson vapor
#

yeah

quartz kindle
#

or just keep it there

#

for history purposes

crimson vapor
#

yeah but at least mark it with an old tag or something so people would know it is wrong

quartz kindle
#

ye

crimson vapor
#

So is this something that will actually happen or are we just conceptualizing it?

quartz kindle
#

for now just conceptualizing

crimson vapor
#

ok

quartz kindle
#

digital ocean's disks are fucking 1200MB/s

#

but their cpu sucks

blissful coral
#

They want you to choose

#

lul

quartz kindle
#

im a perfectionist, so if im actually gonna do this, im not gonna use nixbench

#

i'd look into developing my own benchmarking tools

#

or throwing in my custom mix of existing tools

#

because there are also important things out there such as ram r/w speeds

sick cloud
#

trying to use pip

onyx summit
#

Your python file isn't where your system thinks it is

sick cloud
#

exactly where its checking too

onyx summit
#

Hm, python too?

sick cloud
#

its missing for some reason

onyx summit
#

Should be in the directory above

sick cloud
#

yea it isnt

#

just Lib, Scripts and share folders

onyx summit
#

I'm not that knowledgeable with python but I would guess reinstalling would help

sick cloud
#

ok did a quick reinstall but now a new error

#
Traceback (most recent call last):
  File "c:\python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python38\Scripts\pip.exe\__main__.py", line 5, in <module>
  File "c:\python38\lib\site-packages\pip\_internal\__init__.py", line 40, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "c:\python38\lib\site-packages\pip\_internal\cli\autocompletion.py", line 8, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "c:\python38\lib\site-packages\pip\_internal\cli\main_parser.py", line 11, in <module>
    from pip._internal.commands import (
  File "c:\python38\lib\site-packages\pip\_internal\commands\__init__.py", line 6, in <module>
    from pip._internal.commands.completion import CompletionCommand
  File "c:\python38\lib\site-packages\pip\_internal\commands\completion.py", line 6, in <module>
    from pip._internal.cli.base_command import Command
  File "c:\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 26, in <module>
    from pip._internal.index import PackageFinder
ImportError: cannot import name 'PackageFinder' from 'pip._internal.index' (c:\python38\lib\site-packages\pip\_internal\index\__init__.py)
opal plank
#

offtopic but, most recent call last, if its most recent, its also last, so whats up with that?

quartz kindle
#

py stack traces are upside down

#

because logic

drifting wedge
#

how do i run a function every like 1 min?

blissful coral
#

setInterval(function() {}, time)

#

In JavaScript

drifting wedge
#

im a snake boi

blissful coral
#

nvm can't help you

#

LMAO

#

look up setinterval python @drifting wedge

opal plank
#

error, 2nd parameter not provided @blissful coral

blissful coral
drifting wedge
#

is it possible to check & get the ids of everyone who has a role and run code>

#

is it right?

opal plank
#

yeah, of course

#

if you have the intents for it, that is

blissful coral
#

Yes

drifting wedge
#

ye

#

its for a support bot

#

like its for the premium

#

im making patreon give role

#

and i check for it etc

opal plank
#

if you got GUILD_MEMBER intents, yeah

drifting wedge
#

i can check who has a role?

opal plank
#

yeah

#

guild.<member>.roles.cache => map<id, roles>

#

actually

#

nah thats fine

#

iterate on guild.members though

#

run a reduce function or a for loop

thorny sand
#

someone help me with tracking used invitations?

sage bobcat
#

One message removed from a suspended account.

tame kestrel
#

Hi! In discord.js does .permissionsIn and like .hasPermissions account for admin and overwrites?

thorny sand
#

Thats kinda a uhhhh very odd thing to do as discord doesnt really track who made the invite in the api
@sage bobcat

is that I saw a code in github but it does not work for me, it gives me errors and I need help

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

pale vessel
#

@tame kestrel there is an option for it, i think it's true by default

thorny sand
#

I already know it

tame kestrel
#

@tame kestrel there is an option for it, i think it's true by default
@pale vessel weird ;/ It seems like my bot isn't functioning the way I want to

drowsy pumice
#

How would I make my bot send something after it gets a ping?

tame kestrel
#

I guess that's development but like I don't think I messed up anywhere

#

oh well

pale vessel
sharp pilot
#

@drowsy pumice check the received message for a ping to your bot
probably using String.startsWith()/lang equivalents or a regex method

drowsy pumice
#

k

drifting wedge
#

how can i schedule a task to happen even if i reset bot

#

python

sharp pilot
#

store the times things should happen at somewhere and then reschedule on restart

ornate tendon
#

I am Hosting my Bot in heroku and this is the Error2020-11-04T04:15:19.940570+00:00 app[web.1]: Error: Cannot find module 'dblapi.js' 2020-11-04T04:15:19.940570+00:00 app[web.1]: Require stack: 2020-11-04T04:15:19.940571+00:00 app[web.1]: - /app/index.js 2020-11-04T04:15:19.940571+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15) 2020-11-04T04:15:19.940572+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:687:27) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:903:19) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:74:18) 2020-11-04T04:15:19.940573+00:00 app[web.1]: at Object.<anonymous> (/app/index.js:4:13) 2020-11-04T04:15:19.940574+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1015:30) 2020-11-04T04:15:19.940574+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) 2020-11-04T04:15:19.940575+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:879:32) 2020-11-04T04:15:19.940575+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:724:14) 2020-11-04T04:15:19.940576+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) { 2020-11-04T04:15:19.940576+00:00 app[web.1]: code: 'MODULE_NOT_FOUND', 2020-11-04T04:15:19.940577+00:00 app[web.1]: requireStack: [ '/app/index.js' ]

pale vessel
#

add the module inside your package.json

ornate tendon
#

oh

#

i forgot everything

#

because i did not code for a month

#

Thank you

solemn latch
#

taking notes is amazing 😄

old cliff
#

Does enmap mongo db work without issues ?

earnest phoenix
#

anyone knows PHP?

pale vessel
#

just ask

earnest phoenix
#

i need a php dev

#

fix a bug

pale vessel
#

don't ask here for devs

earnest phoenix
#

where should I ask

#

that comes

earnest phoenix
#

anyone?

rocky hearth
#

My function accepts a array of string or parameters of all string.
How do I define its typing

old cliff
#

show code

#

I can help

rocky hearth
#

just a min

old cliff
#

@earnest phoenix you send code

rocky hearth
#

insult 😦

old cliff
#

no mate no

earnest phoenix
#

@old cliff Dms?

rocky hearth
#

What is the difference between using Array.from(array) and [...array]

#

I've read somewhere not to use built-in classes to define strings, arrays, integer etc

trim saddle
#

array from takes a function and runs anything in provided array through it before pushing it

#

...array just puts the contents of a different array into the current one

rocky hearth
#

So which is the better approach?

graceful dock
#

... deconstruct it, the [] puts it in a new array

trim saddle
#

what are you trying to do

rocky hearth
#

I'm trying to contruct a function that can accept both an array and parameters of any size.
Then I want to transform it into an array to loop through
What I did so far is....

function abc() {
  const array = [].concat(...arguments);
  return array;
}
abc(1,2,3); 
abc([1,2,3]);
// both returns [1,2,3]
trim saddle
#

array from seems like a better way to go

rocky hearth
#

But I've read that, we should not use js instances of Array, String etc

round wave
#

Can someone help me?

stark abyss
#

my bot doing things twice don't even have terminal on

sudden geyser
#

wot

ionic dawn
#

When a bot duplicates the output is probably a second console already opened at VSCode or something

sturdy gazelle
#

yeah how come sometimes when i terminate my bot in vscode and then rerun it there are two instances going?

sudden geyser
#

If you terminate your vscode terminal and try using and command on the bot, do you get a single response or no response.

solemn jolt
#

js v12```
const songInfo = await ytdl.getInfo(args[1])

Why i have a error in this code
#

In getInfo

restive furnace
#

it's not js v12, it's discord.js v12. also ytdl has nothing to do with discord.js or js.

surreal sage
#

If i use fs.readFileSyns(dir).then(file => {}) it reads the old version of the file. How do i refresh it?

crystal wigeon
#

can we send multiple images in embeds?

surreal sage
#

Author image, thumbnail, main image

crystal wigeon
#

not that

#

in the body

#

i need 3 images

surreal sage
#

1

crystal wigeon
#

inline

surreal sage
#

not more

trail orchid
#

hey I can't get the dbl webhook working when I try to host my bot on heroku

#

what should my procfile look like so I can setup the webserver?

crystal wigeon
#

So, if you can't embed multiple images in the body

#

How do you achieve something like this? I mean, you can't possibly go create images for all possible combinations

crisp fable
#

it's probably a script that generates those automatically

#

it's a single image

crystal wigeon
#

I see

#

Ahh more like a canvas

#

I forgot we can embed canvas

pale vessel
#

you can't

#

you can only embed images

crystal wigeon
#

i never tried it but i saw somewhere we could embed base64URI so thought maybe we could

#

i see

pale vessel
#

you need to upload the image as buffer and attach it in your embed

rocky hearth
#

does <Array>.flat() exist in node12??

pale vessel
#

read docs 4head

rocky hearth
#

Hey flaze, have you used typescript? Are you good in it?

static saffron
#
<div class="container px-lg-5" id="container">
  <div class="row mx-lg-n5">
    <div class="col py-3 px-lg-5">Thing</div>
  </div>
  <div class="row mx-lg-n5">
    <div class="col py-3 px-lg-5">Another Thing</div>
  </div>
</div>

``` turn into https://i.imgur.com/awfOPCa.png

how do i cut these https://i.imgur.com/7fGHz1W.png (im using bootstrap)
rocky hearth
#

try uploading direct images

static saffron
#

images?

rocky hearth
#

yeah, these imgur images. I can't see them

#

or are they the same u already uploaded?

static saffron
#

second pic isn't really necessary, i just want the right side to be like, shorter

gilded dawn
#

I want to code the number of servers the bot has

young flame
#

okay

#

what are you coding your bot in?

#

py, js, ts, lua, rust, ruby, c#

#

??

gilded dawn
#

Frankly, I do not know or understand programming

earnest phoenix
#

learn it

young flame
#

then how am i supposed to help

#

lmfao

gilded dawn
#

I tihk its Node.js

earnest phoenix
#

no one might paste the code for it

young flame
#

yes

#

is your bot using bot or client

#

like

umbral zealot
#

what language even

young flame
#
const bot = new Discord.Client();
earnest phoenix
#

lmao

gilded dawn
young flame
#

like that

#

okay

#

what languagegegeggege

gilded dawn
#

Arabick

young flame
#

@gilded dawn

#

alr

gilded dawn
#

I do not understand what you are saying

#

ur using repl.it right
@young flame Yes

young flame
#

like that

#

or a different one

#

send me a photo

gilded dawn
#

Give me one minute

#

Like that

young flame
#

okay

#

thats nodejs

neon heart
#

hi, i want to asking. can i use nekos.life endpoints and get aproved from top.gg?

gilded dawn
#

Yes

young flame
#

so in your command

#

hi, i want to asking. can i use nekos.life endpoints and get aproved from top.gg?
@neon heart no

#

nekos.life is a big no no

neon heart
#

ohh ok

young flame
#

your bot will get declined immedietly

#

@gilded dawn does it say

#

or bot

gilded dawn
#

What

young flame
#

totally didnt make a repl for you smhhh

#

hhhhhhhhhh

neon heart
#

can you give me other api can make action command like slap and other?

#

your bot will get declined immedietly
@young flame ok tq

young flame
#

yes

#

but you have to manually code it

#

make a var

gilded dawn
#

Are there Arabs here

young flame
#

with different slap gifs

#

and then make a random array to pull the gifs from

#

Are there Arabs here
@gilded dawn i know arabian

#

💀

neon heart
#

hmm ok

gilded dawn
#

طيب

young flame
#

i speak 8 languages

gilded dawn
#

تكلم

#

من اول

#

عربي

young flame
#

dont spam it

#

hhhhhhh

gilded dawn
#

انا ماسويت سبام

#

تحدث عربي ؟

young flame
#

حسنًا ، ماذا تحاول أن تفعل؟

gilded dawn
#

؟

#

انا

young flame
#

mhm

#

you are what

gilded dawn
#

أريد ان اعمل حالة البوت الخاص بي يظهر بها عدد السيرفرات المنظم اليها البوت

#

Did You understand

young flame
#

mhm

#

give me a minute

gilded dawn
#

Ok take your time

young flame
#

لذلك تريد استخدام هذا ، يجب أولاً أن أقوم بتصويره ، حسنًا؟

#

hh

gilded dawn
#

خذ راحتك

#

take your time

young flame
#

that should work

gilded dawn
#

تحدث بالعربية

young flame
#

التي يجب أن تعمل

gilded dawn
#

ماذا

#

You are using google translate right?

young flame
#

نسيت التحدث باللغة العربية lmao

#

nah

#

probally spelt something wrong

#

i woke up like 15 minutes ago

gilded dawn
#

good morning

young flame
#

and it isn't something i speak very often

gilded dawn
#

and

#

no probelm

young flame
#

thanks and gm to you to

gilded dawn
#

welcome

young flame
#

if i dont respond alot it's cause i'm building a support server to

gilded dawn
#

Can the method be completed

#

اها

rustic nova
#

Stop writing right, my thumb is in the way

neon heart
#

what do you want ?@gilded dawn maybe i can help you

gilded dawn
#

Ok @neon heart

#

You Can Speak Arabic ?

neon heart
#

nope

gilded dawn
#

I want to create the state of my bot showing the number of servers the bot is organized into

neon heart
#

ah, like total guild join?

gilded dawn
#

I translated it from google translate

#

Yes Yes*

rustic nova
#

I want to create the state of my bot showing the number of servers the bot is organized into
@gilded dawn look through setting your bots activity and gettingn the guild count

gilded dawn
#

@neon heart You can help me ?

neon heart
#

in djs v11
client.guilds.size
in djs v12
client.guilds.cache.size

gilded dawn
#

ok plese wait me

#

i make a test

#

not working ?

#

@neon heart

rustic nova
#

Look through the d.js documentation

neon heart
#

what version of discord.js?

boreal iron
#

setPresence is the magical keyword

gilded dawn
#

@neon heart How do I get that I don't know

rustic nova
#

PogU 🪄

neon heart
#

bruh

gilded dawn
#

hhhh

neon heart
#

go to package.json and see djs version

gilded dawn
#

I got that 11.3.2

#

@neon heart

earnest phoenix
#

eh

umbral zealot
#

time to update! v11 is broken

earnest phoenix
#

update what

gilded dawn
#

How can I update

#

@umbral zealot

umbral zealot
#

npm i discord.js@latest

gilded dawn
#

im

#

tyaping

#

npm i discord.js@latest

#

in here

umbral zealot
#

... no, in your bot's folder MarioFP

gilded dawn
earnest phoenix
#

every time I come to ask bout something everyone uses discord.js so sad

gilded dawn
#

@umbral zealot like that

#

?

umbral zealot
ionic dawn
gilded dawn
#

Yes

ionic dawn
umbral zealot
#

y'know what I'm not even sure how to do that in repl.it, something about going in the "packages" and updating from there, I have no idea

ionic dawn
#

VPS goes brrr

#

whats wrong with vscode and the remote ssh connection

earnest phoenix
#

linux Eyes

ionic dawn
#

jesus

earnest phoenix
#

htop

#

vo1d bashtop is way nicer looking

neon heart
#

open your terminal in repl.it, and run npm i -s discord.js@latest

gilded dawn
#

@umbral zealot oh no,

#

@neon heart ok i make it

earnest phoenix
gilded dawn
#

npm i -s discord.js@latest

#

npm should be run outside of the node repl, in your normal shell.
(Press Control-D to exit.)

(To exit, press ^C again or ^D or type .exit)

#

@neon heart

earnest phoenix
#

Right do any of you have any recommendations for sharding

rustic nova
#

Repl

#

Say less

earnest phoenix
#

as in what type is the best, for this purpose my previous experience with sharding has been purely databases

#

@gilded dawn You have to install packages on repl.it through it's package manager

#

and I'm going to guess this isn't about Primary keys, Hash's and Clusters