#development

1 messages Β· Page 29 of 1

civic scroll
#

so why even make your life harder

ancient nova
#

comments don't really bother me

#

even somewhat make it look better for some reason

#

but ig it's only me that thinks like this weirdsip

civic scroll
#

across my project there are only 5 comments

civic scroll
#

it's not like your users are seeing the source code and neither would they care anyway

#

just mark it as concise as possible

#

only you maintain it

ancient nova
civic scroll
#

so comment in a way you understand on where you like it

solemn latch
#

Just don't be like me.

Hard to read code and no comments

civic scroll
#

are inefficient

#

and confusing as fuck

boreal iron
#

Finally sayuri experiencing Bae

ancient nova
#

but they work so I don't see the problem

boreal iron
civic scroll
#

you asking for help and at the same time you make your code harder to read

ancient nova
civic scroll
ancient nova
#

fair

civic scroll
#

in order to help we must understand your problem

sharp geyser
#

This guy would fail at getting any programming related job

ancient nova
#

I'm actually taking an IT major hoping to get an IT job in a couple years πŸ˜…

sharp geyser
#

Unless he applied at oracle

solemn latch
#

Honestly, I feel like this is the same conversation has happened enough times.

sharp geyser
#

only they would accept people with no style at all

ancient nova
#

maybe also get a job at game development tbh I'm better at that than any JS related thing

civic scroll
sharp geyser
#

Debatable

civic scroll
#

so ima just go around it

ancient nova
sharp geyser
#

But i've seen the code

#

and while it isn't yandere dev level it is still pretty horrendous

sudden geyser
ancient nova
sharp geyser
#

This guy doesn't accept helpful advice and hardly listens

ancient nova
#

I do listen

civic scroll
#

while waiting this angular project to index i will watch this chat Trolled

sharp geyser
#

yes and it goes in one ear and out the other

#

πŸ˜”

ancient nova
sharp geyser
#

Especially if its massive

civic scroll
civic scroll
#

πŸ’€

ancient nova
#

πŸ’€

#

some dude from here just called me

civic scroll
#

@sharp geyser this will be alot of work

civic scroll
ancient nova
civic scroll
#

what website

#

technically they are from the same domain

ancient nova
#

the one with the really impressice css animations

civic scroll
#

both have css animations 😭

ancient nova
civic scroll
#

BOTH ARE GAME THEMED

ancient nova
#

OMFG😭

civic scroll
#

hhh

ancient nova
#

the one with the animation at the start

#

oh ik

#

the mobile killer one

civic scroll
#

so

ancient nova
civic scroll
#

i didn't get your opinion

civic scroll
#

one is a wiki
another one is game introduction

ancient nova
#

the ONE that starts with a black screen and white text and a glitchy logo at the start

civic scroll
#

both start with a black screen with white text

ancient nova
#

the one with the circle animation thingy that u use mouse to move

civic scroll
#

i already implemented it

#

so both are technically

#

the same traits

civic scroll
ancient nova
ancient nova
#

you sent me the link like a week ago

#

I forgot the domain PG_Sadge

civic scroll
#

the domain?

ancient nova
#

I think this is it

civic scroll
#

replace "endfield" with "beta"

#

and you have another one

ancient nova
#

do you own the prts.tech domain?

civic scroll
#

that list of todos are from prts

civic scroll
ancient nova
#

I don't own a domain

civic scroll
#

πŸ‘΄

#

your issue

ancient nova
#

I have like 3 subdomains of a paid domain tho

civic scroll
#

that's fine

#

whatever works

ancient nova
#

I want a custom domain soon but idk where to look for it

civic scroll
#

i technically have 2 domains

#

so i'm pushing myself to build those things asap to deploy them on

ancient nova
#

what's the other one?

civic scroll
#

wait lemme fetch project-domain map

#
         prts.tech -> prts (main)
    beta.          -> prts (beta)
endfield.          -> endfield (main)
  sayuri.          -> redirect(sayuriu.me)
      
   sayuriu.me -> portfolio (main)
os.           -> os concept (main)

those are the projects i have deployed

#

both i got for free

#

perhaps i was lucky

ancient nova
#

damnpepeStraightFace

#

no thanks broπŸ˜‚

civic scroll
#

@solemn latch

#

@ancient nova i just can't imagine how long it would be if i use english to describe this

sudden geyser
#

I love how they bothered to include the footnotes at the bottom

solemn latch
#

@untold ridge no ads please

sharp geyser
#

Wanna know what ima learn

#

ruby

civic scroll
#

get back to angular

sharp geyser
#

but I don't get web dev

#

so

#

why try

#

😎

#

Nah ima eventually get back to it

sudden geyser
#

should've picked clojure

sharp geyser
#

I just don't know how the animations in angular work as I have yet to get it to work

ancient nova
sharp geyser
#

and I was joking about learnng ruby

civic scroll
#

hope you come back during the time i'm rewriting prts

sharp geyser
#

I'd rather not

civic scroll
#

:ttro

ancient nova
#

why notpepeStraightFace

civic scroll
civic scroll
sharp geyser
#

If you can teach me how animations work in angular

sharp geyser
#

then I will gladly pick it back up again

#

but I just can't get it to work

#

πŸ˜”

civic scroll
#

we shall learn animations in angular

#

after i finish endfield

ancient nova
#

I shall not learn animations in angular

#

gn

sharp geyser
#

2040

civic scroll
#

nah

#

it won't be long as cyberpunk

#

i hope

sharp geyser
#

Well I will be waiting until 2040

civic scroll
#

why

sharp geyser
#

Cause it will take you that long

civic scroll
sharp geyser
#

I will just youtube

civic scroll
sharp geyser
#

Well I can't figure it out on my own

#

so

ancient nova
#

WHAT THE FUCK

#

I want to grab a bottle of water

#

there was a big ass spider on it

#

I killed it

#

one of the lags that fell of it is still fucking moving

#

WHA THE DUCK

#

I heavily dislike spiders now

civic scroll
lament rock
#

@quartz kindle do you know any really light weight websocket server implementations

#

Need to interact with browser ws

quartz kindle
#

nop, but uwebsockets is pretty cool

lament rock
#

Guess I'll just use the standard ws lib

#

I tried to make my own implementation, but I'm not reading the entire RFC for implementing

sharp geyser
#

@quartz kindle didn't you read the entire RFC?

quartz kindle
#

kinda

#

didnt read all of it

#

just the important/useful parts

sharp geyser
#

so you read like half?

quartz kindle
#

i guess

#

the websocket format itself is not hard, once you figure out the scheme its easy to implement

#

the annoying part is reading all of the "should" "should not" parts of the spec

#

like what error code to send when

#

in which order to disconnect properly

#

and dumb shit like that

#

all stuff that is not actually required for it to work, only to make it "spec compliant"

neat ingot
#

any yall know if its possible to get the spotify track/album url from presence data?

#

or: how tf to join a presence 'party' using discord js?

ancient nova
#

what even is that

neat ingot
#

those buttons join a 'party' which basically triggers loading the page/url on spotify for the user

#

some games have buttons for like, joining their actual game party etc

#

well, one button is for join and one for spectate

#

but yea

round cove
civic scroll
#

jk

round cove
#

:((

civic scroll
#

it's still a bit confusing for me

#

so it will take me some time to study them

#

@round cove CDCpat

round cove
#

Yes?

civic scroll
slim stag
#

ok

last tapir
#
app.get('/', (req, res) => {
    const count = readFileSync('./count.txt', 'utf-8');
    console.log(`The current count is now ${count}`);

    const newCount = parseInt(count) + 1;

    console.log(newCount)

    writeFileSync('./count.txt', newCount);
});
#
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (NaN)
civic scroll
#

readFileSync returns a string

iron crescent
#

Lmao

civic scroll
#

so is writeFileSync

#

it also expects a string

#

at least convert it to a string

#

<Number>.toString()

#
//...
writeFileSync('./count.txt', newCount.toString());
last tapir
#

alr thanks

civic scroll
#

it's clear

last tapir
#

also, do people use ipify to view their current ip or something

#

like in express apps where it mentions down, your current IPV4 ip and such, do they use ipify for that

round cove
#

no clue, why would you want to?

last tapir
#

no, im just trying to replicate a website that does so, lemme try finding a website

sharp geyser
#

uh

#

you can get the current visitors ip

#

by doing req.ip iirc

feral aspen
#

I think it's: ```js
req.headers['x-forwarded-for'] || req.connection.remoteAddress;

sharp geyser
#

ah yea

#

that

feral aspen
sharp geyser
#

x-forwarded-for is for those cases where the user is going through a proxy when connecting iirc

sharp geyser
#

Wdym

#

What exactly are you trying to accomplish

stiff dust
#

Hello I was host my bot on heroku and for webhook url I use this now my bot is host in my VPS (windows) how can I get a link for webhook

sharp geyser
#

usually you'd end up making your own server with a webhook endpoint

stiff dust
drifting cairn
stiff dust
drifting cairn
#

then make a webhook on ur vps and use that

stiff dust
#

well this is my question

#

how

#

πŸ˜„

drifting cairn
stiff dust
#

node js

drifting cairn
#

then use express

sharp geyser
#

you can make an express server that handles the post request and does something with it

drifting cairn
iron crescent
#

Express good

sharp geyser
#
const express = require('express')

const app = express()

app.post('/webhook', (req, res) => {
  // do something with the data you get from it
})

app.listen(port)
#

all the sdk is, just combining an express server with a ready made handler function with vote as the data returned

drifting cairn
#

yeah i was just recommending it since they have no experience with express s_duck_shrug

stiff dust
#
const express = require("express");
const app = express();

app.get("/webhook", (request, response) => {
  console.log("Ping received!");
});

const listener = app.listen(process.env.PORT, function() {
  console.log('Your app is listening on port ' + listener.address().port);
});
sharp geyser
#

you could easily accomplish this without the sdk

#

and I personally recommend it

stiff dust
#

just a question what should I use for PORT?

iron crescent
#

anything you want

#

3000

sharp geyser
sharp geyser
stiff dust
sharp geyser
#

what system

#

windows or linux

stiff dust
#

windows

stiff dust
sharp geyser
#

netstat -a

stiff dust
#

in terminal?

sharp geyser
#

yea

#

it shows all the currently used ports

#

look for the 0.0.0.0 ones

#

everything else is external apps

stiff dust
#

can I send a pic from them here or I shouldnt?

sharp geyser
#

interesting, it seems it doesn't show all used ports

#

πŸ€”

#

I just tested and looks like a application I currently have running isn't showing up in the list

stiff dust
#

is there any different or I can use anyone?

drifting cairn
#

yes

iron crescent
#

just use port 3000

#

its common

sharp geyser
#

So apparently that doesn't show all used ports

#

It seems only the ones opened on the firewall level

#

:p

iron crescent
#

but why list all the ports...

sharp geyser
#

You don't want two applications using the same port no?

iron crescent
#

Use a very uncommon port then

#

69421

sharp geyser
#

Its better to know what ports are being used

#

so you don't use those ports

iron crescent
#

wasting time

sharp geyser
#

Im not going to take advice from a child

iron crescent
#

okay

drifting cairn
#

if the ports already in use it'll throw an error no?

sharp geyser
#

Also it is common practice either way. Typically when exposing something to the internet you wanna open a port and if you open a port something already uses on your machine well, gl

sharp geyser
drifting cairn
#

ah

sharp geyser
#

Typically though it should

#

but its always that edge case you wanna look out for

civic scroll
#

edge cases where hacker on your computer IreneGasp

sharp geyser
#

But nah seriously sometimes I have had it where it wouldn't even error

rigid maple
#

Doesn't canvas support node v18+?

sharp geyser
#

πŸ€”

#

I don't see why not?

iron crescent
sharp geyser
#

πŸ‘€

#

it aint that serious calm down

iron crescent
#

damn caps by mistake sorry lmao

stiff dust
#
const express = require('express')

const app = express()

app.post('/webhook', (req, res) => {

})

app.listen(3000)

this is my server.js which I require it in index.js

sharp geyser
#

for one, you want to have some way of being able to access that externally from your vps or whatever

#

it isn't worthwhile if it can only be accessed locally

stiff dust
#

so what should I do?

sharp geyser
#

Im too tired to really help right now.

#

All I can say is find a way to expose it externally so other services can access it as well

stiff dust
#

ok tnx

eternal osprey
#
    interaction.reply({embeds: [embed], content: `:Commendation: <@&${progress.id}>`})```why doesn't my code ping the actual role?
#

I mean,it displays the role name but doesn't necessarily ping the role

#
let progress = interaction.guild.roles.cache.find(r => r.id ===  '1007367176732278855');```this is how i am getting the cached role
sharp geyser
#

Uh

#

if...you already have the id

#

why are you finding it

#

just to get the id again

#

πŸ€”

#

Just ping the role with the id?

eternal osprey
#

I know but it still doesn't actually ping the role

stiff dust
eternal osprey
#

it only displays it

stiff dust
#

you mean no one mention but it show the role?

eternal osprey
#

So i tried several ways around it to basically get the same thing, ping the role

eternal osprey
stiff dust
#

show your index.js

eternal osprey
stiff dust
#

in client options

stiff dust
#

I know

eternal osprey
stiff dust
#

just show your client options in index.js

eternal osprey
#
const client = new Client({   intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_BANS, Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS, Intents.FLAGS.GUILD_INTEGRATIONS, Intents.FLAGS.GUILD_WEBHOOKS, Intents.FLAGS.GUILD_INVITES, Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_PRESENCES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MESSAGE_REACTIONS, Intents.FLAGS.GUILD_MESSAGE_TYPING, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.DIRECT_MESSAGE_REACTIONS, Intents.FLAGS.DIRECT_MESSAGE_TYPING] });```
stiff dust
#

hmmmm weird

#

tbh I don't know

sharp geyser
#

wtf

eternal osprey
#

Shouldn't we allow role mentioning maybe?

sharp geyser
#

Might as well just enable all intents at this point

#

tf are you using all those intents for

eternal osprey
#

Misty you are constantly trying to notify me of other issues that are not the main reason of me asking for help. So either help me with this issue i am having or just don't help at all. Thanks!

sharp geyser
#

I wasn't notifying you of any issues

#

I am just genuinely shocked

#

As for your issue, the only thing I can think of is the role doesn't exist or discord isn't accepting pinging the role in a webhook (assuming oyu are using interactions based on what I saw in the image)

eternal osprey
#

That's so strange

sharp geyser
#

I really see no other way, but again that last one is not right either as I have seen and done it myself so

#

also fake is replying with a long reply so he might be able ot help better

eternal osprey
#

I hope so, but thanks for helping misty!

#

I now just made the bot ping the role instead of creating an embed and thread etc

#
return interaction.reply({content: `${progress}`}```doesn't discord allow role pings inside content tags?
boreal iron
# iron crescent Use a very uncommon port then

The ports for the TCP/IP suite are unsigned 16bit integers
Thus ports above 65535 aren’t valid ports anymore

Suggested port ranges for (already registered to ephemeral ports) are: 1024–65535

IANA however suggests 49152–65535 as range for private/dynamic ports

If you wanna know more about port assignments and recommendations, read RFC 6056, RFC 6335

boreal iron
sharp geyser
eternal osprey
#

Why isn't it working then?

#

So strange

boreal iron
eternal osprey
#

yeah

boreal iron
#

Check if the role is mentionable

eternal osprey
#

how?

boreal iron
#

In the role settings

#

There’s a switch saying like, β€œrole mentionable for users” or something like that

sharp geyser
#

yknow

boreal iron
#

i was close

sharp geyser
#

that is a thing I forgot about

boreal iron
#

That’s the reason you can mention @viral brookerators but they won’t get a ping

#

lmao

sharp geyser
#

poor Mod

boreal iron
#

worked pretty well KEKW

fervent moss
#

Adding this doesn

context.beginPath();
        context.arc(125, 125, 100, 0, Math.PI * 2, true);
        context.closePath();
        context.clip();

Adding this thing into canvas doesn't seem to make all things drawn on canvas circular.

What should I do to make it circular if you want code then just say me i will provide weirdsip

eternal osprey
#

but it still doesn't ping

#

I don't think that's possible in v13 then?

#

wtff

boreal iron
#

Weird

eternal osprey
#

It also doesn't ping the role in my other server

#

Just for testing purposes

boreal iron
#

Almost looks like an accurate mention

#

What you can do is to use the mention options to ping the role

#

Sometimes people disabled all mentioned for the bot when initiating it

sharp geyser
#

fake what time is it for u my g

boreal iron
#

1 PM

eternal osprey
#

it looks like a normal ping but it doesn't ping lol

sharp geyser
#

are you European as well

eternal osprey
sharp geyser
#

πŸ˜”

#

I am surrounded by bri'ish people

boreal iron
sharp geyser
#

as if I know what that is

#

but ok

#

gn guys

eternal osprey
#
  allowedMentions: { users: [interaction.member.id]},```Like this?
boreal iron
#

(role ID)

boreal iron
#

gn Misty boy, sweet and dirty dreams

sharp geyser
#

Okay the more you talk the scarier you get

boreal iron
#

Ik ik…

eternal osprey
#

what the actual fuck

#
  if(interaction.options.getString('datacenter') === 'Light'){
                    const embed = new MessageEmbed()
                    .setColor("#9b59b6")
                    .setAuthor({ name: '< Light DC >', iconURL: 'https://cdn.discordapp.com/emojis/993989723104223305.webp?size=96&quality=lossless' })
                    .addField('Message', `${interaction.options.getString('recruitment-text')}`, true)
                    .addField('Ping', `${interaction.member}`, true)
                    .setThumbnail(interaction.member.user.avatarURL())
                    .setImage(interaction.options.getAttachment('pf-screenshot').url)
                
                    interaction.reply({embeds: [embed],  allowedMentions: { users: [ultimate.id]}, content: `:Ultimate: <@&${ultimate.id}>`})
                    let r = await interaction.fetchReply()
                    const thread = await r.startThread({
                        name: `${interaction.member.user.username}-UltimateLight`,
                        autoArchiveDuration: 60,
                        reason: 'Needed a separate thread for UltimateLight',
                    });
                    
                    console.log(`Created thread: ${thread.name}`);
                      const row1 =  new MessageActionRow()
                      .addComponents(
                          new MessageButton()
                              .setLabel('Jump to Ping')
                              .setStyle('LINK')
                              .setURL(`https://discord.com/channels/${interaction.guild.id}/${r.channel.id}/${r.id}`),
                          
                      );
                      interaction.followUp({ephemeral: true, components: [row1], content : `:white_check_mark: **Successfully sent your community ping! Check it using the button below.**`})
                      }
                    ```This is my full code
civic scroll
#

looks pretty on mobile

eternal osprey
#

I am pretty sure i must have a certain client property enables

#

intent*

#

interaction.reply({content: ${role}}) just doesn't work

boreal iron
#

allowed mentions includes ultimate.id as user ID… a few chars later you pass the ID as role mention <@&<role ID>>

#

So… you’re doing something wrong

boreal iron
eternal osprey
#

I got it working

#

my god

boreal iron
#

It’s either a role ID or user ID

eternal osprey
#
    interaction.reply({embeds: [embed], allowedMentions: { parse: ['roles'], repliedUser: false} , content: `:Ultimate: <@&${ultimate.id}>`})```this worked
#

in the parse, you must enter roles instead of the roleid/object

iron crescent
#

The 69420 port was a joke

boreal iron
#

Don’t do Mr Bae things ignoring the replies

eternal osprey
#

awhahhaha sorry, and thankyou

#

who the fuck is mr bae

boreal iron
#

ItsOkayBae

eternal osprey
#

@ancient nova

#

oowh

boreal iron
#

lmao

eternal osprey
#

i remember him/her

#

But i am superior to mr bae

#

is it a mister

civic scroll
#

you are both dummies

stiff dust
#

any idea why I cant install canvas?

sharp geyser
#

typical node-gyp issue

iron crescent
#

I think it's a node-gyp error

stiff dust
#

what should I do for it?

iron crescent
sharp geyser
#

before you could fix it by installing the windows build tools but now I think there is a better way to fix it

#

let me find the docs real quick

iron crescent
#

Oh?

#

I never got one of these errors

sharp geyser
#

Its a common error for a lot of people

iron crescent
#

Yeah

stiff dust
#

okay...

sharp geyser
#

Usually I'd build from sources when working with node-canvas (I don't know of any other way)

By default, binaries for macOS, Linux and Windows will be downloaded. If you want to build from source, use npm install --build-from-source and see the Compiling section below.
https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

GitHub

Node canvas is a Cairo backed Canvas implementation for NodeJS. - Installation: Windows Β· Automattic/node-canvas Wiki

#

This is one option

#

another option is to wait and see if anyone else knows a different solution

stiff dust
#

hmmm

#

so just use npm install --build-from-source ?

iron crescent
#

Are you using it in a bot?

stiff dust
iron crescent
sharp geyser
#

oh right napi-rs has a canvas implementation as well

iron crescent
#

Yeah

sharp geyser
#

canvas made in rust

#

😎

#

good option

iron crescent
#

Lol

#

I've used it in my bit aswell

#

Bot*

stiff dust
#

so install the napi-rs and just instead of const Canvas = require('canvas'); use const Canvas = require('@napi-rs/canvas');

#

?

quartz kindle
stiff dust
#

Hi Tim

eternal osprey
iron crescent
stiff dust
#

btw what is napi-rs

quartz kindle
#

napi is a compatibility layer to run C/C++ code in node

sharp geyser
#

napi-rs is a project that was created to help make npm packages but in rust

quartz kindle
#

napi-rs is the same thing but for Rust instead of C/C++

sharp geyser
#

^

iron crescent
#

yes

stiff dust
#

ok tnx <3

#

also another question what can I do to manage my memory usage better?

quartz kindle
#

dont use discord.js

#

:^)

stiff dust
#

so use what?

#

just the api?

quartz kindle
#

if you can yes

sharp geyser
#

πŸ‘€

quartz kindle
#

using the api directly is always better, just harder

stiff dust
#

it will be so painful ;-;

sharp geyser
#

but it is fun ngl

#

I thought it'd be painful at first as well but after a while it got fun also I know this sounds bad but shut up fake

quartz kindle
#

lmao

sharp geyser
#

only fake would make that weird

#

πŸ˜”

#

Anyway I actually do gotta sleep now

#

cya guys

quartz kindle
#

c

#

my left elbow ha been devoured by mosquitoes

stiff dust
#

well what if I want to use discord.js? is there any way to manage memory better?

quartz kindle
#

configure your caching options

stiff dust
#

how?

#

also is there any different in handlers?

#

@quartz kindle I didnt want to mention you that time cause you were offline but check this out

ancient nova
#

who pongedpepeStraightFace

quartz kindle
#

why do you immediately delete it from the require cache?

stiff dust
iron crescent
#

I needa try using the api directly then

quartz kindle
#

a few months ago is too old?

#

i have 5 year old code running on my bot

stiff dust
#

πŸ˜„ well don't compare yourself to me

#

I start coding last year

boreal iron
quartz kindle
#

at least you didnt import files using eval like i did :^)

boreal iron
#

Or the updated version using websockets being started and running in my browser window

ancient nova
#

is my help commans this badweirdsip

quartz kindle
#

xD

boreal iron
#

Well tbh worked quite well

quartz kindle
#

i even made a chat UI

#

so i could talk with people through my bot

#

and yes i used to log every single message from everyone

boreal iron
#

Yeah made two buttons for a gateway connection and disconnection and a text field to evaluate some code

iron crescent
#

Damn

#

I made that too

#

although I didn't log every single msg...

quartz kindle
#

xD

civic scroll
#

me when tim's bot's main process is google chrome

iron crescent
#

lmao

quartz kindle
#

xD

stiff dust
#

@quartz kindle can u help plz πŸ‘€

civic scroll
#

with what

#

javascript?

boreal iron
civic scroll
iron crescent
#

Yeah xD

civic scroll
#

nah

stiff dust
civic scroll
#

Sayumi runs on DJS and she consumes 2gb of ram

civic scroll
quartz kindle
#

big djs bots use 50gb ram

iron crescent
#

damn

boreal iron
iron crescent
#

Sharding

civic scroll
#

Sayumi was handling like 50 servers at the time

quartz kindle
#

i just need to refresh the discord tab

civic scroll
#

10 playing music

#

it spiked

quartz kindle
#

its the only tab that leaks ram

#

xD

iron crescent
#

lmao

stiff dust
civic scroll
#

tim with questionablr design decisions

quartz kindle
iron crescent
#

yeah

stiff dust
civic scroll
#

do you have the struct

quartz kindle
#

i said to check your djs caching options

civic scroll
stiff dust
quartz kindle
#

heres an example

#
const client = new Discord.Client({
    // default caching options, feel free to copy and modify. more info on caching options below.
    makeCache: Discord.Options.cacheWithLimits({
        ApplicationCommandManager: 0, // guild.commands
        BaseGuildEmojiManager: 0, // guild.emojis
        ChannelManager: 0, // client.channels
        GuildChannelManager: 0, // guild.channels
        GuildBanManager: 0, // guild.bans
        GuildInviteManager: 0, // guild.invites
        GuildManager: Infinity, // client.guilds
        GuildMemberManager: 0, // guild.members
        GuildStickerManager: 0, // guild.stickers
        GuildScheduledEventManager: 0, // guild.scheduledEvents
        MessageManager: 0, // channel.messages
        PermissionOverwriteManager: 0, // channel.permissionOverwrites
        PresenceManager: 0, // guild.presences
        ReactionManager: 0, // message.reactions
        ReactionUserManager: 0, // reaction.users
        RoleManager: 0, // guild.roles
        StageInstanceManager: 0, // guild.stageInstances
        ThreadManager: 0, // channel.threads
        ThreadMemberManager: 0, // threadchannel.members
        UserManager: 0, // client.users
        VoiceStateManager: 0 // guild.voiceStates
    }),
    intents: [ /* your intents here */ ],
});
civic scroll
stiff dust
civic scroll
#

you can free up the cache to save memory

quartz kindle
#

the options above are for djsl, some of them are not supported by djs

stiff dust
boreal iron
# stiff dust

Why do you delete the cached files after requiring them and not before?

quartz kindle
#

and presences if you have the intent

stiff dust
#

well what will happen if I use MessageManager: 0

quartz kindle
#

your bot will stop caching messages

#

meaning you cant use channel.messages.cache.X anymore

boreal iron
#

_djs exploding immediately _

stiff dust
quartz kindle
#

so then it wont affect you, you can safely set it to 0

raw nest
#

I'm creating a devcontainer and the build fails at the last line down πŸ‘‡.

FROM node:16 AS node_base
FROM php:8-apache-buster
...
&& docker-php-ext-install mysqli pdo pdo_mysql ldap zip \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \

Error:

error: Cannot find ldap libraries in /usr//lib/x86_64-linux-gnu/.
spark flint
quartz kindle
#

lmao

spark flint
#

it runs on a 128 gb ram one

quartz kindle
#

my mc server was deleted

#

oracle deleted my vm for no reason

spark flint
#

turns out using /reload just piles up more and more ram lmao

#

its Β£40 a month to run

#

but someone funds it

boreal iron
spark flint
#

on an average day its ~30gb ram

boreal iron
#

No empty MC server for Tim anymore

quartz kindle
#

thats like what

#

100 players?

stiff dust
#

amm for channels users members and even messages I use fetch and didnt use channels.cache or ... so put all of them to 0?

spark flint
#

no

#

thats with like 5 players active

#

idk why

quartz kindle
#

for channels you might have issues in djs

spark flint
#

but we've tested and it goes up to roughly 40gb ram for 250~ players at once

quartz kindle
#

because disabling channels is not officially supported in djs

stiff dust
quartz kindle
#

we already talked about messages

stiff dust
#

ok

quartz kindle
#

you can try setting the channels to 0, but you have to test and see what happens

stiff dust
#

XD

quartz kindle
#

because without channels there is no channel permission overwrites

#

so you cant check permissions

stiff dust
#

oh

quartz kindle
#

unless you fetch the channel

stiff dust
#

gotcha

boreal iron
stiff dust
#

wait without members and users, mentioned member will cached?

quartz kindle
#

if you set the cache to 0, no, nothing will ever be cached

#

mentioned members are included in the message payload

#

so you can still access it from received messages

#

but otherwise no, you have to fetch every time

stiff dust
#

so if someone mention the member in command or select it in interaction the code will run but I cant use client/guild.members.cache client.users.cache and channel.messages.cache am I right?

quartz kindle
#

yes

stiff dust
#

but for example in events when member left/join that member will cached am I right?

quartz kindle
#

no

stiff dust
#

oh

#

...

quartz kindle
#

for member join, you will have the full member

#

because its included in the payload

#

but for leave you only get an ID

#

and you need to enable partials in djs options otherwise the event will not work

stiff dust
#

I have the partials

quartz kindle
#

πŸ‘

stiff dust
#

and I didnt use something in my code but they are cached for example guild.commands can I set them 0?

quartz kindle
#

you can try

#

it will probably work

boreal iron
#

Well the cached command app data ain’t much anyways

stiff dust
#

and what is the meaning of GuildManager: Infinity,

quartz kindle
#

its basically dont disable

#

you can also remove it from the options

#

same thing

stiff dust
#

hmmm okay

#

reaction manager need reaction intent or message ?

graceful cobalt
#

Can anyone help me make a good and appealing description for my bot please

#

I don't know html or css

quartz kindle
#

you dont need reaction manager to receive reaction events, but you need the reactions intent

#

also without the reaction manager, you cannot know the total number of reactions

#

you have to count them yourself with a collector

stiff dust
#

I mean I dont have reaction intent should I use ReactionManager: 0 and ReactionUserManager: 0 or because I dont have the intent there is no difference

civic scroll
graceful cobalt
civic scroll
boreal iron
#

Then use basic markdown formatting to style it accurately

#

Less is sometimes more

quartz kindle
stiff dust
#

@quartz kindle well I write this

quartz kindle
civic scroll
boreal iron
#

lmao

quartz kindle
#

dont disable voice states if you need it

boreal iron
iron crescent
civic scroll
#

you want me to build you a portfolio tim?

quartz kindle
#

i want you to make me a website

civic scroll
#

as long as you pay something

boreal iron
#

LOL

quartz kindle
#

depends how much

boreal iron
#

Tim poor boy

civic scroll
#

i can make something

boreal iron
#

Unless he sells his body

civic scroll
#

i can give a discount

quartz kindle
#

i can make an onlyfans

stiff dust
civic scroll
#

that requires tim to on the whole time and watch me work

#

oh

#

πŸ’€

#

tim no 😭

stiff dust
quartz kindle
#

lmao

stiff dust
#

timfans

boreal iron
iron crescent
#

Lmao

iron crescent
stiff dust
#

OnlyTim

civic scroll
quartz kindle
boreal iron
civic scroll
#

tim

stiff dust
civic scroll
#

i thought of a template

quartz kindle
#

a template of time

iron crescent
#

Template if what

#

of*

ancient nova
#

poggers

civic scroll
#

the amount of animations in this one

#

is simple

ancient nova
#

I hate this emoji

civic scroll
#

suggestions: nextjs, react, framer-motion, chakra

quartz kindle
#

my website gonna be svelte + raw js/css

stiff dust
civic scroll
#

> sayuri create model "web:svelte"

quartz kindle
#

naisu

civic scroll
#

maybe tho

#

i don't wanna overload myself with frameworks

quartz kindle
#

xD

civic scroll
#

create it

quartz kindle
#

i need to finish my api first

#

but i need to port my bot first

civic scroll
#

me and you are gonna do it together

stiff dust
#

any idea?

quartz kindle
quartz kindle
#

check install instructions

#

make sure you have all the requirements

stiff dust
#

how ?

#

wait am I need to require Canvas in index.js or no only in files that want to use Canvas?

iron crescent
#

Only in the files its required in

stiff dust
#

is there any way to just use Canvas instead of napi-rs

quartz kindle
quartz kindle
iron crescent
#

and your having issues with it too

stiff dust
stiff dust
iron crescent
stiff dust
quartz kindle
#

then why is it looking for the 32bit version

iron crescent
#

hmm

stiff dust
#

idk 0.0

civic scroll
#

be a chad and recompile them

ancient nova
#

I'm bored

#

anyone else bored

#

:pepeStraightFace: :weirdsip:

civic scroll
#

i'm bored too

#

so ima animate a logo in css

ancient nova
#

animate a logo for my bot πŸ€”

boreal iron
#

Attention

#

Sayuri being a capitalist

stiff dust
boreal iron
#

Want money for anything she does

quartz kindle
#

finally fake got off my back

quartz kindle
boreal iron
#

xD

quartz kindle
#

did you check the install instructions?

stiff dust
stiff dust
civic scroll
quartz kindle
iron crescent
#

How much for my bot?

civic scroll
#

as little as 5 dollars

iron crescent
#

damn

#

I could just use a software and animate it myself

civic scroll
#

maybe for free, depends on prestige level

civic scroll
iron crescent
#

Bye

stiff dust
civic scroll
#

it takes time to code those animations you know

boreal iron
iron crescent
#

Just realised my bots logo can't be animated :')

quartz kindle
iron crescent
ancient nova
civic scroll
ancient nova
#

I have

#

5$

civic scroll
#

but

iron crescent
#

sayuri check prestige-level Kingerious

civic scroll
#

i would only ask after i actually done it

stiff dust
quartz kindle
civic scroll
iron crescent
#

lol

civic scroll
quartz kindle
#

:(

ancient nova
#

sayuri check prestige-level Itsokaybae

boreal iron
#

Expecting -1

quartz kindle
#

> sayui shop prestige-booster

ancient nova
boreal iron
civic scroll
boreal iron
#

you can’t pay it anyways

ancient nova
civic scroll
#

just finish the bot port

quartz kindle
#

:^)

iron crescent
#

Lmao

civic scroll
#

jk

#

i don't ask for payment

#

but if costs more it's negotiable

ancient nova
iron crescent
#

you ask for kidneys?

stiff dust
#

why I can't uninstall this?

quartz kindle
#

because it wasnt installed

ancient nova
#

d

boreal iron
#

@civic scroll Do you actually need a SVG to animate stuff or can I pass you a PNG and you recreate the vectors yourself (again)?

ancient nova
#

can u not just conveet a png to a svg

#

there are converters online

quartz kindle
#

path tracers are garbage

civic scroll
#

if i have the svg it would be easier

stiff dust
#

so why I cant install it

civic scroll
#

otherwise we gotta recreate them from scratch

ancient nova
civic scroll
quartz kindle
civic scroll
#

πŸ’€

ancient nova
boreal iron
civic scroll
#

hashtag?

quartz kindle
boreal iron
#

Yeah hashtag, it’s part of the logo

civic scroll
#

i can

boreal iron
#

Sounds good

civic scroll
#

it's just 4 paths

boreal iron
#

I’m gonna head out to you in DMs later that day

quartz kindle
#

make it one path

#

:^)

civic scroll
#

nah

#

actually depends

boreal iron
#

Tim stop interrupting our business contract

civic scroll
boreal iron
quartz kindle
#

where is speedy to talk about interrupts

boreal iron
#

Somewhere among us

#

probably

quartz kindle
#

probably watching us

#

hiding from the mods

boreal iron
#

Poor boy

civic scroll
#

most of svg tools are really terrible

#

at manipulating path commands

quartz kindle
#

i cant even use that svg plugin since im building it programmatically from strings and vars in js

#

rip

civic scroll
#

it works in html and svg tho

quartz kindle
#

but not in js strings =X

boreal iron
#

Can bots even have an animated logo?

ancient nova
#

nop

quartz kindle
#

not afaik

boreal iron
#

Hmm

#

Regardless, I want it

ancient nova
#

me too, me too

boreal iron
#

No no

#

FakE first

ancient nova
#

yes yes

boreal iron
#

FakE paying muuuuch

ancient nova
#

cash_count I pay more

boreal iron
#

I doubt

civic scroll
quartz kindle
#

a whole 5 bucks

civic scroll
#

to

ancient nova
#

yessir

boreal iron
#

I’m paying 6

civic scroll
#

huh

quartz kindle
#

ill pay 7

civic scroll
#

you trust me that much?

#

πŸ’€

boreal iron
#

Shut up, Tim

ancient nova
boreal iron
#

You don’t even have 7

quartz kindle
#

lmao

#

i will when patreon pays me

quartz kindle
#

lmao

ancient nova
quartz kindle
#

owo?

civic scroll
#

tim

boreal iron
#

Spam -> Ban

civic scroll
#

actually you can

ancient nova
civic scroll
#

@quartz kindle syntax highlighting works

boreal iron
#

First payed job, sayuri asking if the customer trusts her pandasad

ancient nova
#

I just had the greatest idea in my life

civic scroll
#

i mean

#

i don't trust myself

boreal iron
#

you gotta send me over the 10k bucks, I will do the job then (maybe)

civic scroll
#

πŸ’€

ancient nova
#

setvaluetrue why not use this as treue and the other as false

ancient nova
#

basically have toggles

civic scroll
#

color works

#

green = on, red = off

#

you can't mistake those

ancient nova
#

how tho

#

u can't have colors on mobile, ascii only works on pc

civic scroll
#

huh

#

insert the icon in code embed

ancient nova
#

ascii highlight only works on pc

civic scroll
#
βœ… this works
stiff dust
#

@quartz kindle well I install everything again and still I have this err

ancient nova
#

what I meant

quartz kindle
quartz kindle
civic scroll
#

you want the svg plugin for help right

ancient nova
#

my vps has syntax highight for different languages in one

civic scroll
#

i suggest the workaround is to open an boilerplate svg file

#

then infer help from there

quartz kindle
#

yeah

civic scroll
#

the intellisense only works in svg files

#

maybe it will work better if i open it in webstorm

stiff dust
graceful cobalt
civic scroll
#

no

#

not your bot

#

the complexity of the logo

graceful cobalt
#

I don't have logo

#

I want a bot description

civic scroll
#

i forgot

#

i mean how much content to put on the website

#

also who's gonna host it

graceful cobalt
#

Not on my website, on the top.gg page

#

1sec

civic scroll
graceful cobalt
#

I want to make my bot description more attractive and cooler

#

@civic scroll

#

Can u do that?

civic scroll
#

my writing skill is not really good

#

all i can write is basic boilerplate

graceful cobalt
#

What is boilerplate

civic scroll
#

some basic stuffs

#

so if you look for "attractiveness", i'm not the person for it

random snow
#

how is the search on the website so awful? 🀣

quartz kindle
#

after you eat

boreal iron
#

smh

iron crescent
white hornet
#

is there a way to change prototype for Interaction? like:

const { Interaction } = require("discord.js");
Interaction.prototype.error = function(key, args) {
  key.reply("β›”" + key)
}
//This one is not work

bec there is a way prototype for message Example:

const { Message } = require("discord.js");
Message.prototype.error = function(key, args) {
  key.reply("β›”" + key)
}
//This one is work
boreal iron
#

just fyi, once an interaction has been deferred, you can't use the reply() method anymore

#

make sure to check that before responding

white hornet
boreal iron
#

v14?

#

class has been renamed

#

class BaseInteraction extends Base

#

not Interaction anymore

white hornet
white hornet
#

thx it work

boreal iron
#

np

wooden ember
#

bruh they are on v14 now?

#

oof

#

not updating only just got my head around v13

white hornet
#

why this code have error in has?

if (!interaction.channel.permissionsFor(interaction.guild.me).has("EMBED_LINKS")) return

wooden ember
#

what is the error....

#

ive never used interactions so i probably cant help unless its something obvious

boreal iron
#

you can't simply pass string as permission names anymore

lyric mountain
civic scroll
#

me omw to clip studio paint

white hornet
civic scroll
#

it's null

#

so

#

handle it

civic scroll
#

check it it's null or not

#

you didn't even do a if (interaction instance of Interaction)