#development

1 messages ยท Page 1584 of 1

lyric mountain
#

doubles your available RAM and removes viruses from your battery

#

and find hot ladies in your area

crimson vapor
#

what

#

oh

#

good

#

on it

eternal osprey
#

anyone that knows what i even mean by this?

opal plank
#

dunno, i already sent, too drunk now to be able to think properly, and i got a chick coming.
so, bye, good luck
kvaleuthxbyefuifalou

crimson vapor
#

ty

zenith terrace
#

u alive @unkempt ocean ?

unkempt ocean
#

ofc

zenith terrace
#

ok good

unkempt ocean
#

what's up?

zenith terrace
#

I'll send the css here now

unkempt ocean
#

what css

zenith terrace
#

bot

#

description

#

background no work

#

remember

unkempt ocean
#

oohh right aight

zenith terrace
#
.entity-wrapper {
  background-image: url('workingLink') !important;
  }```
#

is what I have

unkempt ocean
#

give me a min pls

unkempt ocean
zenith terrace
#

sure

unkempt ocean
#

entity-wrapper just works fine for me

zenith terrace
#

oh it works if I remove every other css I have, guess I just gotta recode every css lol

unkempt ocean
#

something might overwrites is I guess

#

you can check it with element inspector

zenith terrace
#

yea I got 2 tabs open now to help

earnest phoenix
#

bot

#

lobby bot

#

bot

tight plinth
#

if a bot is kicked and then re added to a server, does the server stay inside the same shard?

boreal iron
#

@zenith terrace Use background not background-image as attribute. It should work.

#

For example background: url('...') no-repeat center !important;

earnest phoenix
#

bot

boreal iron
#

And donโ€™t forget to force reload the cached top.gg page using CTRL + F5 in most of the browsers

quaint wasp
earnest phoenix
#

bot psl

#

pls

vocal sluice
#
zenith terrace
quaint wasp
#

where?

#

OOOOOH

#

LMAO

#

i just read what is said on the line..

zenith terrace
#

lol

quaint wasp
#

bra

#

how do I deffine roles?

#

is that even possable?

unkempt ocean
#

language?

quaint wasp
#

d.js

unkempt ocean
#

Guild class has roles property

quaint wasp
#

oh...

#

ok...

earnest phoenix
quaint wasp
#

#oles

near ether
#

why is my bot duplicating responses? it just started happening out of nowhere with no code changes

#

it sends duplicate responses that total the amount of shards i have
ie 2 shards = 2 responses, 5 shards = 5 responses

#

restarted the process, my terminal window, my laptop, everything
still doesnt make a difference

#

ive even reverted to an old commit where i can confirm it works perfectly and its still getting dupe responses when i run that commit right now

#

i started logging in the message listener and it seems like every message is being picked up by every shard

#

even on the same server

modest crane
near ether
#

phew

#

thank you lmao

#

i was going crazy for the last 2 hours trying to figure out what was wrong

quaint wasp
#

uhh

#

I litilary had to define each word in there...

#

why?

#

I defined member..

#

message...

#

Why?

#

or do I just have to?

glossy spoke
#

hey

quaint wasp
#

hi..

glossy spoke
#
let logc = client.channels.fetch(cua.get(`Servidor_${member.guild.id}.logs`));
#

when i try to send something

#

to that channel

#

it says logc.send(); isn't a function

ruby dust
#

What do you think is a good way to "simulate" a large package update on Linux? My idea was to get a fresh minimalistic Manjaro installation, or are there better methods?

glossy spoke
#

Tim, can you help me?

toxic jolt
#

hello

#

i using discord.js v11
i using shard.js
but i have a this problem

#
const { ShardingManager } = require('discord.js');
const settings = require('./ayarlar.json');
const db = require('quick.db')
const manager = new ShardingManager('./bot.js', { token: settings.token, totalShards: "auto"});
     manager.spawn();
     manager.on('launch', shard => console.log(`Launched shard ${shard.id}`));


glossy spoke
#

v11?

toxic jolt
#

its a my shard.js

#

yes im using v11

glossy spoke
#

and why are you using v11?

toxic jolt
#

I've been having problems for days, not interested, normally I would migrate to v12 today.

modest crane
glossy spoke
#

ok so now write on your console npm i discord.js

#

to update it

#

if you wanna to.

toxic jolt
#

YEAAHH

#

Hey all. Known issue going on right now with sharding errors when starting your bots. It's been escalated and we're looking into it.

#

v11 โค๏ธ UwU

#

I was afraid that v11 was closed

glossy spoke
#

what the hell is going on with this guy

quartz kindle
#

v11 will stop working in the future lol

toxic jolt
glossy spoke
#

oh god he said butt

#

lmao

toxic jolt
kind crescent
#

Good luck xD

quartz kindle
toxic jolt
#

For example, I have to prepare for the university exam. I have 2 months left, but I cannot work and win on the last day. Welcome to my future.

glossy spoke
#

it's as easy as write npm i discord.js in your console/powershell/cmd

toxic jolt
quartz kindle
#

moving from v11 to v12 requires a major rewrite

#

because many things changed

glossy spoke
#

oh ya

toxic jolt
#

Is there a converter for v11 to v12?

quartz kindle
#

no

glossy spoke
#

no

kind crescent
#

Yeah. Its called time and effort

toxic jolt
#

my friend made

glossy spoke
toxic jolt
#

the site also made

glossy spoke
#

hmm?

toxic jolt
#

But there is a 250 character limit, I cannot pass bot.js.

kind crescent
#

pastebin

glossy spoke
#

yep

toxic jolt
#

I don't know how to make it easy v11 to v12

glossy spoke
#

you'll nerver find a easy way

toxic jolt
#

It means 10 thousand lines of code! omg...

glossy spoke
#

the unique and effective way is rewriting all

earnest phoenix
#

Bro wtf

quartz kindle
#

well, its also not that hard lol

earnest phoenix
#

i am using d.js v12

toxic jolt
kind crescent
toxic jolt
#

bruh i using d.js v11

quartz kindle
toxic jolt
#

v11 is best

kind crescent
#

How is it the best when its deprecated? ๐Ÿ˜‰

mellow kelp
#

how to start a civil war in one simple step

toxic jolt
#

but
dying like windows 7

glossy spoke
#

that's not the same case

#

windows 7 is still one of the bests OS

earnest phoenix
#

I switched 200 command from v11 to v12

quartz kindle
#

no v13

earnest phoenix
glossy spoke
#

lmao

#

can someone help me?

let logc = client.channels.fetch(cua.get(`Servidor_${member.guild.id}.logs`));
toxic jolt
#

@quartz kindle I have a question,
It was 1 year ago when I came to Top.gg. When I wrote here, you and someone else was looking. What happened to that other person?

glossy spoke
#

it says logc.send isn't a function

quartz kindle
#

who was the other person?

glossy spoke
#

THE AWAIT

toxic jolt
#

@quartz kindle 1 year ago you were always helping me ๐Ÿ˜„

glossy spoke
#

I ALWAYS FORGOT THAT

#

thx lol

toxic jolt
#

I didn't know much discord.js for 1 years ago

glossy spoke
#

wut

toxic jolt
#

2019

glossy spoke
#

it looks like he's using translator

toxic jolt
#

wow

#

im 2019 you 2018 UwU

zenith terrace
quartz kindle
#

.then().then().then().then().then()

toxic jolt
#

@quartz kindle when to fix shard.js UwU

quartz kindle
#

ask discord lul

toxic jolt
#

uuuu

#

discord

zenith terrace
toxic jolt
#

Discord: hi

#

@quartz kindle i have a question; my bot uses too much ram, discord.js-light i checked your npm but i failed

quartz kindle
#

failure

toxic jolt
drifting wedge
#
        <div class="sidebar">

            <div class="sidebtn"><i class="fas fa-plus"></i> <a class="sidebartext">Projects</a></div>

            <div class="sidebtn"><i class="fas fa-terminal"></i> <a class="sidebartext">API</a></div>

            <div class="sidebtn"><i class="fab fa-github"></i> <a class="sidebartext">GitHub</a></div>

            <div class="sidebtn"><i class="fas fa-home"></i> <a class="sidebartext">0Exe.tk</a></div>

        </div>``` i wanna make it like when u hover the sidebar, the sidebar text becomes visible ```css
.sidebar {
    overflow: hidden;
    border-radius: 20px;
    display: flex;
    color: white;
    padding-left: 20px;
    padding-right: 20px;
    font-weight: 700;
    flex-direction: column;
    flex-wrap: wrap;
    position: absolute;
    background-color: #2d3638ad;
}

.sidebar:hover {
    overflow: hidden;
    border-radius: 20px;
    display: flex;
    padding-left: 20px;
    padding-right: 20px;
    font-weight: 700;
    flex-direction: column;
    flex-wrap: wrap;
    position: absolute;
    background-color: #6ce4ffad;
}

.sidebartext {
    padding-right: 40px;
    display: none;
}

#sidebar:hover .sidebartext {
    display: block;
    color: #b30f0f;
}```
half lodge
toxic jolt
#

im tim hello

#

UwU

half lodge
#

Hahahahah that good ๐Ÿ˜‚

quartz kindle
#

your sidebar uses class, not id

drifting wedge
#

i think i got it

#

oh alr

#

ty

toxic jolt
#

@quartz kindle I'm going thanks for your help, you're loved

#

good bye sir

quartz kindle
#

bye :)

toxic jolt
quaint wasp
#

lol

toxic jolt
#

the top person is using the logo of my bot

#

I said how my bot sent 3 messages

#

I scared omg

#

I said exploded bot xd

quaint wasp
#
    bot.muted[toMute.id] = {
        guild: message.guild.id,
        time: Date.now() + parseInt(args[1]) * 1000
    }
``` is my code... how do I deffine what "muted" means? I mean...
earnest phoenix
#

Shard has too many guilds (>2500)
anyone encounter this problem in eris?

wheat jewel
#

none of my bots images are loading

#

is it a discord issue

#

Im sending them in embeds

opal plank
quartz kindle
#

discord is broken

opal plank
#

ik[

quartz kindle
#

its giving that error to everyone

opal plank
#

had to send the message 4 times

#

before it went through

#

discord is always broken

quartz kindle
#

ye

opal plank
quartz kindle
#

luckily my bots are fine

opal plank
#

let me try mine

#

yeah, its fine

quartz kindle
quaint wasp
#

๐Ÿ˜

quartz kindle
#

dafuq is that

opal plank
quartz kindle
#

no i mean

opal plank
#

thats what happens when idiots remove my embeds and its tied to a setTimeout

quartz kindle
#

that code

quaint wasp
#

I got this.. : ```js
module.exports = {
name: 'mute',
execute: async (message, args, bot) => {

if(!message.member.hasPermission("MUTE_MEMBERS")) return message.channel.send("You do not have Permission to mute!");
let toMute = message.mentions.members.first() || message.guild.members.cache.get(args[0]);
if(!toMute) return message.channel.send("You did not specify a user mention or ID!");
if(toMute.id === message.author.id) return message.channel.send("You can not mute yourself!");
if(toMute.roles.highest.position >= message.member.roles.highest.position) return message.channel.send("You can not mute a member that is equal to or higher than yourself!");

let mutedRole = message.guild.roles.cache.filter(mR => mR.name === "Muted");

if(!mutedRole) {
    try {
        mutedRole = await message.guild.createRole({
            name: "Muted",
            color: "#000000",
            permissions: []
        });

        message.guild.channels.forEach(async (channel, id) => {
            await channel.overwritePermissions(mutedRole, {
                SEND_MESSAGES: false,
                ADD_REACTIONS: false
            })
        });

    } catch(e) {
        console.log(e.stack);
    }
}

if(toMute.roles.cache.has(mutedRole.id)) return message.channel.send("This user is already muted!");

bot.muted[toMute.id] === {
    guild: message.guild.id,
    time: Date.now() + parseInt(args[1]) * 1000
}

await toMute.addRole(mutedRole);


    message.channel.send(`I have muted ${toMute.user.tag}!`);
});

}
};```

opal plank
#

YIKES

quartz kindle
#

dafuq is this

opal plank
#

tim

#

we got different priorities

quartz kindle
#

mine are more important

opal plank
#

im concerned about the json db they are doing

#

bot.muted[123455] = {}

quartz kindle
#

strict equality comparison to an object literal

#

100% sense

quaint wasp
#

?

crimson vapor
#

bro

#

learn js

quaint wasp
#

im

#

trying

#

to.

quartz kindle
#

a = b (a becomes b)
a == b (a is equal value to b)
a === b (a is equal value and type to b)

quaint wasp
#

I studid half of the discord docs today...

earnest phoenix
#

help

opal plank
#

let me slap them with n.tag learn first

earnest phoenix
#
        let marox2 = message.content.split(' ').slice(1)['join']('');
        let marox3 = [`https://image.thum.io/get/width/1920/crop/675/noanimate/${marox2}`];
         if (message.content.startsWith(prefix + `ss`)) {
                if (!marox2) {
                        return
                };
                                let marox5 = new Discord.MessageEmbed()
                                .setTitle(`(>>> Link)[${marox3}]`)
                                                                .setImage(`${marox3}`)
                                .setThumbnail(message.author.displayAvatarURL())
                                .setColor(`BLUE`)
                                .setFooter(`Developer : message.reply('</MarO>')#6666`);
                message.channel.send(marox5)
        };
        
})
opal plank
#

@quaint wasp Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:

  • proper syntax
  • debuging code
  • basic features (vars, arrays, objects, functions)
  • read and understand docs
  • nodejs module system

As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.

Here are good resources to learn both Javascript and NodeJS:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/

Please take a couple of weeks/months to get acquainted with the language before trying to make bots!

quartz kindle
#

you're doing a comparison

#

===

quaint wasp
#

alr. I'll change that to =.

opal plank
#

you should learn a bit more of js before doing a discord bot

quaint wasp
#

==?

quaint wasp
#

alr.

opal plank
#

check the last link from what i sent

#

@umbral zealot yw with the plug mmulu

valid chasm
#
const manager = new ShardingManager(path.join(__dirname, 'bot.js'),
                                    {
                                        token: configs.token,
                                        totalShards: TOTAL_SHARDS,
                                        shardList: SHARD_LIST
                                    });

manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
manager.spawn();

I just restarted the bot and now i'm getting this error. Do you have any idea of what this could be?

Launched shard 0
Webhook running at http://0.0.0.0:5555/dblwebhook
(node:14) UnhandledPromiseRejectionWarning: Error [SHARDING_REQUIRED]: This session would have handled too many guilds - Sharding is required.
    at WebSocketManager.createShards (/node_modules/discord.js/src/client/websocket/WebSocketManager.js:258:15)
    at async CommandoClient.login (/node_modules/discord.js/src/client/Client.js:223:7)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:1) UnhandledPromiseRejectionWarning: Error [SHARDING_READY_TIMEOUT]: Shard 0's Client took too long to become ready.
    at Timeout.onTimeout (/node_modules/discord.js/src/sharding/Shard.js:163:16)
    at listOnTimeout (internal/timers.js:551:17)
    at processTimers (internal/timers.js:494:7)
earnest phoenix
#
        let marox2 = message.content.split(' ').slice(1)['join']('');
        let marox3 = [`https://image.thum.io/get/width/1920/crop/675/noanimate/${marox2}`];
         if (message.content.startsWith(prefix + `ss`)) {
                if (!marox2) {
                        return
                };
                                let marox5 = new Discord.MessageEmbed()
                                .setTitle(`(>>> Link)[${marox3}]`)
                                                                .setImage(`${marox3}`)
                                .setThumbnail(message.author.displayAvatarURL())
                                .setColor(`BLUE`)
                                .setFooter(`Developer : message.reply('</MarO>')#6666`);
                message.channel.send(marox5)
        };
        
})

First time work but second didn't work why
https://media.discordapp.net/attachments/808221230930722847/809945719678697472/unknown.png?width=521&height=519

opal plank
mental oracle
#

Do any of you use kurasuta?

opal plank
opal plank
mental oracle
#

ah

opal plank
#

wasnt that the sharding thing?

mental oracle
#

well, I made a bot in discord.js, and I'm using kurasuta for sharding

#

yeah

opal plank
#

i recall someone mentioning it this monring

#

though i've heard quite a few bad things about it

#

and that people should stay away

mental oracle
#

well, it's saying "This session would have handled too many guilds - Sharding is required."

opal plank
#

something about negative ratelimits

#

and some weird shit

mental oracle
#

I literally copy and pasted the example code

#

from their github

quartz kindle
#

discord is having issues

mental oracle
#

and put my bots token into it

opal plank
#

that

valid chasm
#

The bot is in 5.7k servers and i'm using 8 shards

quartz kindle
crimson vapor
opal plank
mental oracle
#

oh

opal plank
#

WHY EVERYONE DOING SHARDING NOW

valid chasm
#

i'm using custom

opal plank
mental oracle
#

mine is using 9 shards and its in 10k servers

quartz kindle
#

5.7k requires 3 shards not 2

opal plank
#

correct

#

im drunk

crimson vapor
#

Tim what do you think about my logs?

opal plank
#

ignore me

quartz kindle
#

looks good

crimson vapor
#

ty

#

maximum

#

most people do 1.2k to 1.8k

opal plank
#

THOUGH

#

in fairness

#

its good to have multiple shards like that

#

since they are assigned based on id

#

you always want have some gap between them

crimson vapor
#

and it could be stacked weirly

#

yea

opal plank
#

and not cluster shards

quartz kindle
#

wut

opal plank
#

shards are assigned based on timestamp id

crimson vapor
#

if you have like 4.5k servers, its likely you will error

#

since its a function thats "random"

#

not really

#

but kinda

quartz kindle
#

wut

#

dafuq u on about

opal plank
#

me or zero?

quartz kindle
#

both

#

lmao

crimson vapor
#

bro

opal plank
#

million*

crimson vapor
#

ty

#

anyway

opal plank
#

you know how ids are assigned tim?

#

its based on guild id timestamp

quartz kindle
#

via modulo

crimson vapor
#

meaning

opal plank
#

no, via timestamp id

crimson vapor
#

if you have weird stacked ids

quartz kindle
#

with modulo

opal plank
#

(id >> 22) % shardCount

quartz kindle
#

yes

#

% shardCount

opal plank
#

thats timestamp id

quartz kindle
#

modulo

opal plank
#

id >> 22

crimson vapor
#

if you have similar ones tho

#

or they fall in the same category

quartz kindle
#

yes

#

timestamp into modulo

opal plank
#

thats what i said

quartz kindle
#

as did i

opal plank
#

squints

crimson vapor
#

bro

#

should I do

opal plank
crimson vapor
#

Cluster # | LOG | msg
LOG | Cluster # | msg

#

which one?

opal plank
#

just console.log()

#

problem solved

crimson vapor
#

worker.logger.log() > console.log

opal plank
#

why do you even log Cluster?

#

there should only be one cluster

#

shards is the one that change

crimson vapor
#

5 shards per cluster

opal plank
#

unless you got clusterper thread

crimson vapor
#

idk

mental oracle
#

is it an issue with discord or discord.js? their post was really vague

crimson vapor
#

I could do C# T#

mental oracle
#

I'm assuming it's discord itself

crimson vapor
#

but that would be effort and idk if I can do that

quartz kindle
#

discord itself

mental oracle
#

damnnn

#

that sucks

crimson vapor
#

hi evie

umbral zealot
opal plank
#

discord being discord, as usual

mental oracle
#

if it were discord.js, I'd just find the part of the code where that error is handled

#

and comment it out

quartz kindle
#

LOL

mental oracle
#

and then undo that once they fix it

opal plank
#

the only reason i recommeded it is because i took a look at it myseklf

crimson vapor
#

idk if my current logging method can take shard

opal plank
#

good guide

crimson vapor
#

since I log through the cluster not the shard

mental oracle
#

I had to do that once, and it was literally recommended to me by people here

#

but it was a discord.js issue

#

for me

#

my bot got ratelimited

opal plank
mental oracle
#

and I had to comment out the line that errors saying that it can't log in due to being ratelimited

crimson vapor
#

the library defaults to clustering

mental oracle
#

and once doing that

opal plank
#

are you splitting them by threads?

mental oracle
#

it attempted login

#

and my token was reset

quartz kindle
#

people should stop talking about clusters and just say processes or threads lmao

opal plank
#

no libs should be splitting it by clusters

mental oracle
crimson vapor
#

worker threads yes

opal plank
#

you should only have one cluster realistically

mental oracle
#

js developers love to talk about clusters

crimson vapor
#

idk man ask berry

opal plank
#

and multiple shards, with them being assigned to different threads

mental oracle
#

I mean, clusters are very important in js though lol

opal plank
#

@slim heart million talking shit bout you

mental oracle
#

because js is not multithreaded

crimson vapor
#

imo that seems inefficient

#

thread per shard

#

I could do 1 shard per cluster

opal plank
#

wot

#

thread per shard?

#

other way around mate

#

shard per thread

crimson vapor
#

bro

#

1:1 = 1:1

mental oracle
#

^

quartz kindle
#

1 shard per cluster? wtf does that mean

mental oracle
#

they both make sense

crimson vapor
#

LOL

opal plank
#

if you have 2 threads, how you gonna have 3 shards?

slim heart
#

beuh

crimson vapor
#

bro

slim heart
#

i have 5 shards a worker

#

it's a cluster

crimson vapor
#

im being attacked

slim heart
#

erwin help with ts

#

gr

opal plank
#

i shouldnt even be on discord

quartz kindle
#

a cluster is literally a group of things

opal plank
#

im waiting for the hoe to get off the bathroom

crimson vapor
#

cluster = 5 shards

opal plank
#

she been stuck there for the past 30 minutes

slim heart
#

a cluster is a group of shards in this case

quartz kindle
#

you cannot have a "cluster" with only 1 thing in it, its not even a cluster at that point

mental oracle
#

that's why they call it "clustering"

opal plank
#

no u

mental oracle
#

what

crimson vapor
#

an array with 1 element is still an array @quartz kindle

#

its just

#

dumb

mental oracle
#

no, that's not the point

slim heart
#

array !== cluster

mental oracle
#

a cluster is a group of shards

crimson vapor
#

I made an analogy

mental oracle
#

a shard by itself is just a shard

crimson vapor
#

fuck you

slim heart
#

an array is any list

opal plank
#

frick all of u

crimson vapor
#

but still an analogy

mental oracle
#

a shard == a shard
a cluster !== a shard

slim heart
#

a false equivalence

quartz kindle
#

an array is an array, but a cluster is not a cluster, unless its actually filled with items

#

because like

slim heart
#

tim help with ts

crimson vapor
#

brb

opal plank
#

HAHHAHAHA

#

tim and ts?

slim heart
#

๐Ÿ˜”

quartz kindle
#

the word "cluster" is used to describe the group of items themselves, not the thing that contains them

mental oracle
#

yeah

opal plank
#

tim hates ts more than i hate embed builders

mental oracle
#

an array is a class, so that's different

opal plank
#

and THATS saying something

mental oracle
#

I don't like typescript

opal plank
#

if it has embed builder, i'll burn them all to dust

slim heart
#

imagine not liking embed builders

#

poopy

mental oracle
#

I use javascript because i don't like typechecking

opal plank
#

i'll personally turn my bot into a ddos for every jda lib out there

quartz kindle
#
let embed = new Erwin().setDescription("yes")
slim heart
#

ctx
.title('poop')
.description('erwin succs')
.send()
pog

opal plank
#

imagine not having a method for sending raw api data

mental oracle
#

what's the point of using a library if you're just gonna send raw api data smh

#

a library is an api wrapper

#

well

#

not always but

#

in this case it is lol

slim heart
#

client.api.channels[channel_id].messages.post({
data: { content: 'erwin smells' }
})

opal plank
#

10/10

#

5 star review on google eats

slim heart
#

what's wrong with an embed builder

#

smfh

opal plank
#

4.5 star on uber

#

literally read

#

if zoom isnt enough

quartz kindle
#

buider

opal plank
#

sssh

#

constructors

#

classes

#

tons of methos

#

memory

#

fuck everything

slim heart
#

if it takes that long ur computer sucks

mental oracle
#

lol

slim heart
#

it's just slow at that point

mental oracle
#

^^^

opal plank
#

lets just make fucking builders for a small object

slim heart
#

all an embed builder does it set values to an object

opal plank
#

whats the point?

slim heart
#

if it takes 700ms to do that your computer is dogwater

mental oracle
#

if discord.js is unoptimized, then just fix it smh

opal plank
#

you literally calling a method that does literally one property

#

the fuck is the point?

mental oracle
#

like no need to gatekeep

#

s m h

quartz kindle
#

lmao

slim heart
#

imo
ctx
.title('a')
.send()

looks better than

ctx.send({
embed: {
title: 'a'
}
})

quartz kindle
#

and js looks better than py

#

:^)

mental oracle
#

python is just bad

crimson vapor
#

thats js

opal plank
#

let embed = {}

embed.description = 'blah'

rather than
let embed = new (require('discord.js'').embedBuilder)().setDescription('blah')

#

fuck d.js

#

grabage

#

spit

slim heart
#

bruh

opal plank
#

trash

crimson vapor
#

erwin

mental oracle
#

@opal plank ok fix it then

slim umbra
#

hola skids

opal plank
#

i did

crimson vapor
#

what lib did you use for your bot @opal plank

slim heart
#

just cuz ur code is bad doesnt made embed builders bad lmao

opal plank
#

i DID fix it

#

by not using it

mental oracle
#

then push it

opal plank
#

fuck d.js

mental oracle
#

itso pen source dude

opal plank
#

not using d.js anym0ore

#

fuck that garbage

slim heart
#

use discord-rose

#

ez

mental oracle
#

it's open source

opal plank
#

spit

slim umbra
#

when ur a professional and make ur own libs and backend

slim heart
#

kekw

opal plank
slim umbra
#

rust microservices flush

slim heart
#

1wtf

#

๐Ÿ˜”

#

what's wrong with it

#

smh

slim umbra
#

the language its in

mental oracle
#

no need to

slim umbra
#

no its not lol

mental oracle
#

unless it's THAT bad

crimson vapor
#

it depends

slim umbra
#

the difference is using

#

under 1gb in ~385k servers to 60gb lol

#

and the cpu footprint is massively different

#

and proper orchestration and efficient structs

mental oracle
#

why does discord.js use 60gb of ram for that many servers

#

oh wait

opal plank
slim umbra
#

bc most devs suc and dont know how to make it decent & even then its not great

mental oracle
#

wait no, seriously

opal plank
#

YOU REALLY WANNA KNOW?!

slim heart
#

yes

crimson vapor
#

embed

#

thats it

mental oracle
#

I've never seen discord.js use that much ram

opal plank
slim umbra
#

and their sharding stuff was booped

opal plank
#

IMAGINE CACHING EVERY FUCKING EDIT

#

d.jsโ„ข๏ธ

quartz kindle
#

i've seen discord.js use 1gb+ at 300 servers

slim heart
#

iim talking abt discord-rose

slim umbra
#

^

slim heart
#

poopy head

mental oracle
#

I haven't

#

that's probably the code itself

#

not discord.js

slim umbra
#

yeah

crimson vapor
#

nah

slim umbra
#

but i was hired to rewrite the bot to be efficient and shit

#

so why would i use js anyways xd

crimson vapor
#

I was at 250mb at 50 servers

#

LOL

slim umbra
#

oof

mental oracle
#

im at like 250mb in 10k servers dude

#

are you hosting on windows or what

#

like wtf

crimson vapor
#

linux

mental oracle
#

good

slim heart
crimson vapor
#

discord js

slim umbra
#

even then

slim heart
#

give me f e e d b a ck

slim umbra
#

os doesnt change ur memory in any real way

#

and if u have any braincells u run in alpine docker containers/k8s

opal plank
mental oracle
#

linux is just more optimized in like, all ways

#

in terms of development

opal plank
#

its not ready for prod

mental oracle
#

some things still need work but

crimson vapor
#

bruh

opal plank
#

thats enough for me not to use it

slim heart
#

it's in it's final form

opal plank
crimson vapor
#

don't use it

slim heart
#

but yeah

mental oracle
#

I get 23k fps in minecraft with a gtx 950

opal plank
#

then why is that thing there?

mental oracle
#

and 12gb of ram

slim heart
#

it's nearly done doe

mental oracle
#

on linux

crimson vapor
#

but give f e e d b a c k

opal plank
#

let me know when its DONE, and i'll try it

mental oracle
#

on windows, using all the same settings

opal plank
#

i dont mind making a small bot for it to test it

slim heart
#

not try it just take a look at how it works

mental oracle
#

I get 100-200fps

crimson vapor
#

BERRY

slim heart
#

hwa t

crimson vapor
#

DON'T RUSH THE RELEASE

slim heart
#

im not gonna

crimson vapor
#

good

slim heart
#

it's still v0

mental oracle
#

oh, and my discord bot also uses more ram on windows

quartz kindle
crimson vapor
#

@opal plank you drunk still?

opal plank
mental oracle
#

overall @quartz kindle

quartz kindle
#

x doubt

opal plank
#

im drinking as we speak, actually

slim heart
#

@mental oracle eval process.memoryUsage().rss / 1024 / 1024

crimson vapor
mental oracle
#

well my bot's kinda down rn because of discord and their broken sharding

#

soooooooooooo

quartz kindle
#

xd

mental oracle
#

also

crimson vapor
#

no

#

now

mental oracle
#

the server that runs my bot

slim heart
crimson vapor
#

while you are still drunk

mental oracle
#

runs many other servers

#

it's a server i share with my friend

#

it's hosting a minecraft server

#

a fivem server

crimson vapor
#

bruh

mental oracle
#

3 databases

crimson vapor
#

my 2vcore vps

mental oracle
#

2 discord bots

crimson vapor
#

runs mc server and my bot

#

big deal

mental oracle
#

it's a full mc server

#

with lots of plugins

#

and different worlds

crimson vapor
#

plugins don't mean much

mental oracle
#

it's a bungee network

crimson vapor
#

how many cores and ram?

mental oracle
#

and there's a massive survival world

#

8 cores

#

and

crimson vapor
#

bruh

mental oracle
#

12gb ram

crimson vapor
#

8 cores

#

no wonder

#

2vcore

mental oracle
#

it's self hosted

crimson vapor
#

4gb

mental oracle
#

it's not a vps

#

it's a dedicated server

crimson vapor
#

dedi

#

bruhh

slim heart
#

32 cores 128GiB gang

crimson vapor
#

-b @slim heart stinky

slim heart
#

๐Ÿ˜”

quartz kindle
#

xD

slim heart
#

@opal plank like see how the general creation of a bot would work and judge it

quartz kindle
#

1 vcore 1gb gang

slim heart
#

u too tim

#

i want expert f e d back

mental oracle
#

yo does anyone wanna join a vc because I'm bored af waiting for discord to fix sharding

crimson vapor
#

just set your shards to 16

#

no?

mental oracle
#

wait what

opal plank
crimson vapor
#

just add more shards kekw @mental oracle

opal plank
#

im currently super busy, both irl and working on my own bot

#

i got a massive rewrite im doing

#

the issue is that im sharding it too

crimson vapor
#

poggers

#

what lib

#

eris?

slim heart
#

discord-rose?

quartz kindle
#

detritus

slim heart
#

jk dont

opal plank
#

fuck js libs

#

garbarbe js libs

#

pure ts lib

#

detritus

#

best lib

#

10/10

#

except docs

#

9/10

quartz kindle
#

lmao

crimson vapor
#

wait

slim heart
#

erwin hel pwith my namepsaces pp

opal plank
#

too drunk for thinking

crimson vapor
#

its literally a basic ws connection but typed?

opal plank
#

maybe tomorrow

quartz kindle
#

peepee

quartz kindle
#

detritus is a fully featured lib

opal plank
#

better than d.js and eris togetherโ„ข๏ธ

quartz kindle
#

they have a raw socket client if you want

#

but they have a fully featured client as well

opal plank
#

if eris and d.js merged, i dont think it'd be as much effort as that lib is

#

sharding is amazing

#

the lib is amazing

#

the support is amazing

#

literally everything is great

#

except the docs

#

you'd probably spend 80% of ur time digging thru their code to find shit

#

since the docs are just a blurp of things auto-generated

crimson vapor
#

lmao

#

its like

#

5k lines client

opal plank
#

tldr; if you like d.js, you wont handle detritus

#

detritus a lot of stuff you have to code yourself

#

i had to make my own reaction and message collectors

crimson vapor
#

ik a bit with discord api

#

enough

opal plank
#

theres a bunch of things it doesnt have from d.js, but the ram usage and the lib itself is worth it imo

crimson vapor
#

how little is it?

opal plank
#

wdym how little?

#

i showed a while back, it used 1gb ram for 1800 servers, while djs is currelty at 3.5gb

#

its a 2gb reduction

crimson vapor
#

oh I didn't see that

#

kekw

opal plank
#

plus 10 secods less in startup time

crimson vapor
#

I wanna see what discord-rose would be

#

ngl

#

what did you test? full bot?

opal plank
#

i highly recommend, but its not for new people, at all

#

yeah, i fully ported my bot to detritus

crimson vapor
#

yikes

opal plank
#

im able to give some help about it

crimson vapor
#

pain and effort

opal plank
#

im not even kidding, you'll be spending HALF of your time digging the code to find shit

#

the docs are really not well made

#

since they are generated

#

but the lib is SOOOOOOO fucking worth it

crimson vapor
#

fuck docs

opal plank
#

if you knoew js and ts failry well, give it a try

#

otherwise, get acquainted first

#

you wont survive detritus without knowing js AND ts failr ywell

crimson vapor
#

ima continue rewriting my bot in discord-rose

opal plank
#

im struggling, and i know a fair bit

crimson vapor
#

but it would be nice to see the memory usage

quartz kindle
#

i mean

#

memory usage is more about how much you cache than anything else

opal plank
#

indeed, but im caching ALL

#

and you saw the difference

quartz kindle
#

even if you use different methods for caching, the difference wont be as much as how much you're caching

opal plank
#

same bot, same features, same commands

#

2gb reduction

#

i actually still have both of them on if you wanna check it

#

its on that NotADiscord server tim

quartz kindle
#

what is the difference in heap, not rss?

crimson vapor
#

does detritus create classes for shit?

#

or is it all weird

opal plank
quartz kindle
#

if discord even lets you login

#

lmao

opal plank
#

wdym?

#

it should

#

dont think theres an issue with multiple clients connected

quartz kindle
crimson vapor
#

LOL

quartz kindle
crimson vapor
#

what

quartz kindle
crimson vapor
#

oh

quartz kindle
crimson vapor
#

@slim heart yo

#

can you do something?

slim heart
#

what

opal plank
#

@quartz kindle spinning it up

crimson vapor
#

can you test how much memory discord-rose uses on censorbot?

#

so can you @slim heart ?

slim heart
#

i thought i did before didnt i

crimson vapor
#

no never on 50k servers

slim heart
#

40k* ๐Ÿ˜

crimson vapor
#

get fucked

quartz kindle
#

i'd like to see djs-light on 50k servers with internal sharding

#

xd

crimson vapor
#

LOL

#

40k ๐Ÿ˜‰

quartz kindle
#

get fucked

crimson vapor
#

LOL

quartz kindle
slim heart
#

im running it rn

#

with all the default cache

crimson vapor
#

all 40k ๐Ÿ˜‰ servers?

opal plank
#

let me eval it rq

slim heart
#

fucking

#

sharding is down nvrm

quartz kindle
#

xDDD

crimson vapor
#

LOL

opal plank
#

yeah sharding taking a bit hit

slim heart
opal plank
#

getting those too

crimson vapor
#

LOL

slim heart
#

my main bot is fine unless i restart

quartz kindle
#

told ya

#

if discord even lets you log in

#

xD

slim heart
#

existing connections seem to be fine

quartz kindle
#

ye

opal plank
#

its letting me login on 1 shard, then all others fail

slim heart
#

lets just hope no fatal close codes come through blob_sweat

quartz kindle
#

xD

crimson vapor
#

lol

#

imagine

#

imagine sharding

opal plank
#

but still, 2gb reduction

slim heart
#

one shard going out in this would end up fucking the whole thing

crimson vapor
#

this post was made by under 100 server gang

slim heart
#

f

opal plank
#

imagine not having enough servers to shard

crimson vapor
#

I can shard

slim heart
#

million isnt terano 500 serves

crimson vapor
#

but its useless

slim heart
#

smh

crimson vapor
#

no

#

terano in jpbbots

#

when?

slim heart
#

wati

#

i thought it

#

had 500 server

#

what does it have

crimson vapor
#

73

slim heart
#

wh

#

why the fuck are u using my lib

crimson vapor
#

cuz epic

slim heart
#

you skipped a few steps

crimson vapor
#

I wouldn't test on prod if I had 500

slim heart
#

you're already clustering and you're not even verified yet

crimson vapor
#

steps?

#

no im verified

#

-3 a week gang

slim heart
#

is bot selling not allowed?

opal plank
#

i can login with shard 0, but nothing past that

slim heart
#

its allowed right

quartz kindle
#

cluster at 73 servers

crimson vapor
#

its not not allowed

crimson vapor
quartz kindle
#

make it 10 shards as well

crimson vapor
lyric mountain
#

Well, you can sell the code tho

slim heart
#

shardOffset: 10

lyric mountain
#

But not the account

opal plank
slim heart
#

do shardOffset

#

just add 1 shard to the auto

#

then bam 2 shards

quartz kindle
opal plank
#

discord gateway goes brrrrr

quartz kindle
#

yes

slim heart
#

caps at 1000 servers pog

quartz kindle
#

would be a fun test tho

opal plank
#

indeed

#

i still wanna get my tv bot going on

crimson vapor
#

it wouldn't work

#

Tim

quartz kindle
#

it would

#

for a while at least

crimson vapor
#

nah you would get shards with 2 guilds

#

unless you use like

#

1000 shards

quartz kindle
#

highly unlikely

slim heart
#

if you shard enough you will

#

no its super likely actually

crimson vapor
#

yeah

slim heart
#

cuz its an equation not auto distributed

#

i made a function before that calculated how many shards to get each server on its own

#

my 30k bot would have to spawn 712,204 shards

quartz kindle
#

if you shard enough you wont get collisions

opal plank
#

id >> 2 % shardCount

slim heart
#

90% of the shards wont have servers lmao

crimson vapor
opal plank
#

thats the formula

slim heart
#

i ran the calc when in 30k

#

so

quartz kindle
#

:^)

slim heart
#

true

#

actually

opal plank
#

(idn >>22n) % Shardsn

crimson vapor
#

wait

#

fetch all guilds

slim heart
#

u only would have to spawn the shards with servers

crimson vapor
#

then make a function

#

to only connect those shards

#

bruh

#

thats like

quartz kindle
crimson vapor
#

yikes

quartz kindle
#

thats my idea

slim heart
#

i wonder if it would error

opal plank
#

aparently discord is fine now

slim heart
#

there ought to be some max on total shards

opal plank
#

they "resolved" the issue

quartz kindle
#

xD

crimson vapor
#

berry find out now

slim heart
crimson vapor
#

restart it

#

or did you

slim heart
#

i did

crimson vapor
#

oh

#

nvm then

opal plank
#

about right

slim heart
opal plank
#

ykes

#

i was checking on the portal

#

actually

#

hmmm

#

nvm wont work

sage bobcat
#

One message removed from a suspended account.

crimson vapor
mellow kelp
#

n0

green kestrel
#

anyone else kind of pissed off that discord didnt even bother to update their status page for this outage of theirs

wet scroll
#

Yes

#

I updated my statuspage lol

#

Apparently thats too much work for Discord

green kestrel
#

according to discordstatus, everything is fine!

#

it got my bot looping till my token reset

#

and its 2am

wet scroll
#

I will call them out ๐Ÿคฃ

green kestrel
#

so im really REALLY pissed off

wet scroll
#

I was about to go to bed when this happened

#

Now I gotta stay up to disable maintenance mode when they fix it ๐Ÿ™„

green kestrel
#

same

#

i took down all my clusters to stop the boot loop

wet scroll
#

Thats a rip

#

You had the boot loop and I got the message for every shard

green kestrel
#
2021-02-13 02:21:22.731 [D] [th#6847] : Shards to connect : 4
2021-02-13 02:21:22.731 [D] [th#6847] : Shard#0: connecting
2021-02-13 02:21:22.882 [D] [th#6853] : Shard#0: connection established
2021-02-13 02:21:29.606 [D] [th#6847] : Shard#0: disconnected. lastheartbeat(6874) lastwsevent(6723) lastheartbeatack(6723) ms ago
#

still down

slim umbra
#

vibe

quartz kindle
#

rip

wet scroll
#
[WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
[WS => Shard 0] Heartbeat acknowledged, latency of 42ms.
[WS => Shard 1] [HeartbeatTimer] Sending a heartbeat.
[WS => Shard 1] Heartbeat acknowledged, latency of 46ms.
[WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
[WS => Shard 0] Heartbeat acknowledged, latency of 43ms.
[WS => Shard 1] [HeartbeatTimer] Sending a heartbeat.
[WS => Shard 1] Heartbeat acknowledged, latency of 43ms.```
#

No boot loop xD

lyric mountain
#

That's called fibrillation

#

Maybe cardiac arrest

wet scroll
#

๐Ÿคฃ

#

42-46ms between heartbeats, I am pretty sure thats death ๐Ÿคฃ

slim heart
#

that's normal

wet scroll
lament rock
#

Is the current Discord issues causing every shard to receive messages from other shards or something?

slim heart
#

its causing the inability to shard which causes an error if u NEED to shard

lament rock
#

Ah. I see. Was getting multiple responses based on how many shards I've had so just wanted to clarify. Guess I need to wait to push changes to gateway workers :/

grizzled raven
#

shard 9 is simply built different

slim heart
#

i would stop it

#

cuz itll reset ur token

grizzled raven
#

hm

slim heart
#

but if ur bot was already online its fine

slim heart
#

unless it ges a fatal error

grizzled raven
#

yeah it was always online lmao

slim heart
#

then itll loop breaking

#

so shard 9 prolly got a fatal close code

lament rock
#

Good thing resume doesn't go toward identify limit

slim heart
#

and now its booped

#

yeah resumes also resume fine

#

but the second a shard goes out u need to stop it

zenith terrace
#
.entity-content__description {
  color: #0C3CCC;
  }``` 
am I missing something here cause its not changing colour
slim heart
#

.entity-content__description > .content {
color: #0C3CCC;
}

grizzled raven
#

yeah maybe i should kill it mmLol

nimble kiln
#

Remaining: 814 - Naaah you still have time mmLol

grizzled raven
#

oh so thats what thats for

nimble kiln
#

Umm, yes ๐Ÿ˜ฎ

slim heart
#

try adding !important maybe

zenith terrace
#

color: #0C3CCC !important; yea?

grizzled raven
#

yeah

#

also