#development

1 messages · Page 1766 of 1

woeful pike
#

there's no point in doing reviews in the first place if product owners are allowed to control how many reviews there are or their rating

crimson trellis
#

Then why do other bots do that

#

ive seen other people make thir bots do that

woeful pike
#

dont know, I don't moderate bots

#

just telling you how it works

craggy pine
#

I don’t do this with my bot regardless but just for clarification

woeful pike
#

GreenTick If you like the bot make sure to leave it a review
GreenTick If you like the bot give it a 5 star review
RedTick If you leave the bot a 5 star review you'll get game currency
RedTick If you leave the bot a review you'll get to use this command again before 12 hours

craggy pine
#

Tyty

vivid fulcrum
#

you should pin that btw

woeful pike
#

should all be explained in how reviews on zendesk work but okay

earnest phoenix
torn robin
#

Is it related to discord bots or is it a different system?

zealous trellis
#

Can I put buttons in embeds?

sudden geyser
#

I've seen that error occur when someone tries migrating their bot from one platform to another but keeps stuff like node_modules the same

#

rather than rebuilding it on the native platform

copper cradle
#

^ yeah, you gotta rebuild your node_modules folder whenever you migrate platform

quartz kindle
zealous trellis
#

well that sucks

#

so much for my hopes and dreams

#

:3

cinder patio
#

hmmm I remember in one of the discord previews for these featurea there were buttons in embeds

#

and dropdowns too

zealous trellis
#

too bad

#

we cant use it

#

actually

#

I wonder

earnest phoenix
#

Try sending raw request

quartz kindle
#

maybe they will add it in a future update

#

apparently theres more stuff coming, like dropdown menus

zealous trellis
#

since its already technically supported

vivid fulcrum
#

i'm hoping they're going to add input fields soon

zealous trellis
#

lemme try manually added a components list

vivid fulcrum
#

you can't have message components in embeds

zealous trellis
#

¯_(ツ)_/¯

quartz kindle
#

but for now they always appear outside the embed

zealous trellis
pale vessel
#

they're also really big

#

especially when you're using just icons

zealous trellis
#

yeah

#

Ugly

sudden geyser
#

the buttons look ugly in general

#

the whole thing

pale vessel
#

but it's still new

zealous trellis
#

Whoever designed them is an idiot

#

like

pale vessel
#

give it some time for them to polish it

vivid fulcrum
#

the whole rebrand is ugly

zealous trellis
#

CSS flexbox is perfect for this

#

auto adjusting button sizes

#

grids

#

sad they dont even use it

vivid fulcrum
#

they saturated all colors and it hurts to look at them, especially the new blurple

#

oh also, no support for outlined buttons

zealous trellis
#

but

#

that cringe text logo

#

was horrid

vivid fulcrum
#

they cheap out on the developers

#

wouldn't be surprised if they took a hobo and said "you'll be our new team manager"

zealous trellis
#

people with specific conditions couldnt read it or something

#

Im probably way off

#

idk

vivid fulcrum
#

yeah it was kinda hard to read but that could've been fixed by using an alternate text color

#

but the new blurple is heavily saturated to the point your eyes physically hurt when you look at it

zealous trellis
#

¯_(ツ)_/¯

pale vessel
zealous trellis
#

NGL, the saturated color is a little refreshing

#

maybe Im just getting used to it

#

but

#

the old blurple

quartz kindle
zealous trellis
#

its kinda bland

#

like

#

it feels dead

#

gray

pale vessel
vivid fulcrum
#

people are storing full blown b64 data in buttons

#

lol

pale vessel
#

wait where

#

custom ids?

vivid fulcrum
#

yup

quartz kindle
#

wat

#

LOL

pale vessel
#

lmao

vivid fulcrum
#

it's kinda a smart thing to do

quartz kindle
#

theres no length limit to them?

vivid fulcrum
#

100chars iirc

#

but that's plenty

quartz kindle
#

what kind of b64 data can you store in 100 chars?

#

i was thinking like b64 images lol

vivid fulcrum
#

🤷‍♂️

#

sec

quartz kindle
#

my custom ids are like "0" or "0112" or "024"

#

lmao

vivid fulcrum
#

from ddevs

quartz kindle
#

true that i used to store the data in the footer before

#

but yeah if the custom id uses utf16 then you could technically store data in base64k

#

or just binary/blob in utf8

#

honestly the best thing about buttons is that you can directly reply to them instead of going through the rest of the api

visual goblet
#

thoughts?

vivid fulcrum
#

it's uh

#

not pleasant to look at

#

don't make the fields inline

#

or paginate them

#

or link to an external website

torpid otter
#

callback(new MongooseError(message));
^

MongooseError: Operation prefixes.findOne() buffering timed out after 10000ms

#

got this error message

prime mist
prime mist
earnest phoenix
#

Time out

prime mist
#

Learn to Google, you will become a better person :)

torpid otter
#

there are lot link

prime mist
#

Just read through them one at a time, until you find your answer.

sudden geyser
#

[PostgreSQL] I'm designing my database to be completely immutable—no UPDATE or DELETE allowed. Mutability is the enemy.

Although this is an issue that may only effect me slightly, I'm a bit concerned about it since a lot of duplication can go into each revision (I call them assets) and data integrity. Take the two tables attached for example.

An asset can include one or more of the following tags:

  • Addition (a null column got data added)
  • Deletion (a column with data was reset to null)
  • Modification (a column with data got replaced with some other data)

If I want to modify the media table, I need to add a new row to the media_assets table. It looks like I'm forced to mark each column as nullable to represent deletion. I'm currently limited to:

  • Mark every column as nullable and treat null columns as deleted (current implementation).
  • Mark every column as nullable holding another nullable value (Nullable<Nullable<T>>).

The advantage to the first implementation is it's simple and is a full copy from an asset. The disadvantage is I'm storing more data than I actually need. The advantage to the second implementation is it only stores as much as it needs, but I'm unsure how to model it. So, for my question, how can I model a Nullable<Nullable<T>> type in SQL? The first nullable can be implicit (aka not supplied). The second nullable can be explicit (deleted).

zealous trellis
#

why is it that when I send an embed and a button at the same time... the embed turns into an "[object Object]" string

#

its very annoyying

pale vessel
#

discord-buttons is honestly trash

#

you're better off making requests to the API without a wrapper

zealous trellis
zealous trellis
#

thats

#

um

#

no

pale vessel
#

this is in their FAQ

#

i don't know how they thought that was a solution

#

and i don't think they have support for emojis

#

and their typings suck

#

someone needs to make a better wrapper

zealous trellis
vivid fulcrum
#

dont trust people with butchered english

zealous trellis
#

what do you expect me to do

vivid fulcrum
#

just do raw requests

sudden geyser
#

It can suffer

vivid fulcrum
#

js is not typed so you can easily send buttons without modifying djs

pale vessel
pale vessel
#

last time I tried passing message_reference and it didn't work

vivid fulcrum
#

it shouldn't

#

tim got it working iirc

#

idk i never used djs

quartz kindle
#

.send(content, options)
or
.send(options)

#

if you pass a second argument, the first one is treated as text only

#

so .send(embed, options) causes object object because it tries to use the embed as content

quartz kindle
pale vessel
#

oh that's what i use

zealous trellis
#

so I went onto their server... and yeah... their library sucks

#

and their community sucks too

#

instead of fixing things

#

I kid you not

#

he said "you get what you get and you dont make a fit"

#

like

#

Wtf

quartz kindle
#

i mean, they're not wrong

pale vessel
#

lul

zealous trellis
#

but its an API

#

you dont just say "im not going to fix it"

#

and tell people to suck it up

quartz kindle
#

its not like you purchased a service, you're using a free open source code, no guarantees

pale vessel
#

they don't have full coverage either

#

does it allow you to have more than one ActionRow?

zealous trellis
#

Yeah, its garbage... I think Id rather write my own

zealous trellis
pale vessel
#

those do

quartz kindle
#

buttons are inside action rows

pale vessel
#

people even made a gameboy emulator using multiple of them

vivid fulcrum
#

people created tictactoe

#

with buttons

zealous trellis
#

not sure

#

doesnt say anything about it in the api's docs

quartz kindle
#

message has components, component has action rows, action row has buttons

pale vessel
#

i'm guessing they use one ActionRow only

#

that sucks

quartz kindle
#

one action row can have up to 5 buttons

#

buttons have to be inside an action row component

vivid fulcrum
#

basically a flexbox without the flex part

quartz kindle
#

a fekbox

vivid fulcrum
#

oh nevermind they actually do use flex

#

that's a new

prime mist
sudden geyser
#

CRUD can burn in hell

quartz kindle
#

cRUDE

zealous trellis
#

cuz they dont appear to size very well

#

or they have bad margins

vivid fulcrum
#

that's because the front devs have autism

zealous trellis
#

fr.

#

its mentally painful looking at sometimes

quartz kindle
#

guilded > discord incoming

pale vessel
#

guilded still has long ways to go

vivid fulcrum
#

and it looks ugly

quartz kindle
#

i've been getting messages about guilded recently

#

people saying its 1000x better than discord

#

and asking me to port my bot there

#

lul

zealous trellis
#

wasnt guilded that crappy discord clone?

#

dont tell me its still alive..

quartz kindle
#

ye

pale vessel
#

i wouldn't say crappy

quartz kindle
#

alive and kicking and apparently better than discord

pale vessel
#

but it's still worse

zealous trellis
#

it literally looks like discord

#

like they copied everything

#

icons, font, appearance

#

wtf

quartz kindle
#

guilded has a built-in basic bot functionality

#

you can go in the guild settings and create a basic bot

#

with built-in functions and commands

woeful pike
#

discord copied slack shrug

woeful pike
#

it was basically a full on clone at first

quartz kindle
#

every thing on the internet is a copy of something else

pale vessel
#

you know the rule, the most known one is always the "original" one

quartz kindle
#

keydb is a copy of redis

woeful pike
#

remixing is a part of creating new art

quartz kindle
#

postgres is a copy of mysql

zealous trellis
#

Remixing.. its getting to the point that its just straight up copying

pale vessel
#

ejs is a copy of php!

zealous trellis
#

like

quartz kindle
#

chrome is a copy of internet explorer

#

:^)

zealous trellis
#

to the pixel.. copying

woeful pike
#

except it's not and you're being completely disingenuous

zealous trellis
#

as a... painfully admitted webdev... I can admit Ive wished IE didnt exist

#

Ive always wished it would just rot in hell

quartz kindle
#

now it isnt

#

but go back 15 years

vivid fulcrum
#

well ms is finally dropping support for it

zealous trellis
#

dont even start about DirectX Objects

#

blegh

quartz kindle
#

it was a competing product

zealous trellis
#

sure

quartz kindle
#

competing products are always somewhat copies of each other

zealous trellis
#

but it was never the same

#

not even close

quartz kindle
#

i didnt say they were the same, just that chrome was a copy

#

to compete with something first you have to copy it

#

in terms of functionality at least

sudden geyser
#

Almost everything you interact with is a copy or based on something else

#

That meme you saw 2 hours ago? Probably a repost

quartz kindle
#

ye

unique magnet
#

fuck

unique magnet
#

fucking

pale vessel
#

when and where

sudden geyser
#

yes it is

#

it just borrows other atoms

#

hold on I need that one fullmetal alchemist quote

#

"In order for something to be obtained, something of equal value must be lost."

lyric mountain
#

so, I want to obtain the destruction of world

quartz kindle
#

occasional sudden exit from his chair to do a quick ten pushups. He explained this last one as "Compiler found error in code. This is punishment"

lyric mountain
#

will I get another world?

sudden geyser
#

silly human

#

thinking in terms of objects

#

rethink abstract

lyric mountain
#

rethink.db

quartz kindle
#

what happened with rethink db?

#

2-3 years ago everyone was talking about it and using it

sudden geyser
#

It was deprecated then it got undeprecated.

quartz kindle
#

never heard anyone mention it again

sudden geyser
#

NoSQL has kind of phased out

#

Though it's still super popular

quartz kindle
#

how to make nosql good: give it sql syntax compatibility

#

:^)

sudden geyser
#

orms walk in

quartz kindle
#

orms, aka how to make a database slow

#

:^)

vivid fulcrum
#

second level cache!!

#

ever since i discovered the use of second level cache, i don't use orms without it

sudden geyser
#

I like the idea of ORMs but never get far with them

#

SQL is already a declarative abstraction

patent light
#

buttons are super cool

#

~ buttons ~

sudden geyser
#

and trying to abstract it again with an ORM doesn't go well further

quartz kindle
#

dafuq is a second level cache

#

a cache for the cache?

near tulip
#

Hi

quartz kindle
#

lmao

near tulip
#

Bay

quartz kindle
#

what bay? hudson bay?

#

bay watch?

pale vessel
#

hdd bay

prime mist
#

Especially if you want good typescript support.

earnest phoenix
#

Hi guys. I host my BOT in my friends server and we noticed that it uses lots of memory, do you guys know if there's a lighter way to make it run 24/7, even without vs? thanks

onyx zealot
#

what is better

#

AWS, Google or Azure

modern moon
#

Anoye know any coding or programming server

#

if yes pls dm me

earnest phoenix
prime mist
sudden geyser
eternal osprey
#
| Require stack:
0|index    | - /root/moderation/index.js
0|index    |     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
0|index    |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
0|index    |     at require (node:internal/modules/cjs/helpers:93:18)
0|index    |     at Object.<anonymous> (/root/moderationeconomy/index.js:2:17)
0|index    |     at Module._compile (node:internal/modules/cjs/loader:1109:14)
0|index    |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
0|index    |     at Module.load (node:internal/modules/cjs/loader:989:32)
0|index    |     at Function.Module._load (node:internal/modules/cjs/loader:829:14)
0|index    |     at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|index    |     at Module._compile (node:internal/modules/cjs/loader:1109:14) {
0|index    |   code: 'MODULE_NOT_FOUND',
0|index    |   requireStack: [ '/root/moderation/index.js' ]
0|index    | }
``` why is this error occuring
#

when trying to start my bot

zenith terrace
#

moderationy ?

eternal osprey
#

no my bad i changed the dir name

sudden geyser
#

is there a moderation directory in your root folder

eternal osprey
#

yeah of course

prime mist
#

Especially if you have GUILD_MEMBERS intent turned on.

eternal osprey
#

it happened after i updated my node to v16

prime mist
#

What does ls -la /root/moderation output?

eternal osprey
#

drwxr-xr-x 7 root root 4096 May 30 01:31 . drwx------ 11 root root 4096 May 30 00:08 .. drwxr-xr-x 2 root root 4096 May 29 12:30 commands drwxr-xr-x 2 root root 4096 May 29 12:30 events -rw-r--r-- 1 root root 2563 May 30 01:44 index.js -rw-r--r-- 1 root root 0 May 4 14:31 json.sqlite -rw-r--r-- 1 root root 391 May 22 15:32 mongo.js -rw-r--r-- 1 root root 185 May 28 23:55 n.json drwxr-xr-x 3 root root 20480 May 30 01:44 node_modules -rw-r--r-- 1 root root 1402 May 28 23:51 package.json -rw-r--r-- 1 root root 228685 May 30 01:25 package-lock.json drwxr-xr-x 2 root root 4096 May 29 13:41 schemas -rw-r--r-- 1 root root 57671680 May 30 01:31 thLogs.sqlite drwxr-xr-x 2 root root 4096 May 29 13:44 util -rw-r--r-- 1 root root 34 May 29 00:11 warnings.json

prime mist
#

If you updated to node v16, you will probably need to reinstall node_modules 🙂

pale vessel
#

reinstall? rebuild?

prime mist
#

Just remove the directory and re-run npm install

#

Eh, same thing kinda. My OCD likes removing the directory first lol.

pale vessel
#

i think rebuild only affects native modules

#

so it's faster

prime mist
#

Probably. It makes me sleep better starting from a clean slate for some reason.

pale vessel
#

yeah i'd reinstall everything too

#

just in case

torpid otter
#

Do Mongoose come with Schema

earnest phoenix
#

What am i doing wrong?

clear marlin
#

why the whole code

earnest phoenix
#

I'm having errors with this

clear marlin
#

just show us the error

earnest phoenix
#

Ok

clear marlin
#

this here is legit spamming lmfao

earnest phoenix
#

Sorry

#

Wait imma send the error

clear marlin
#

yep

earnest phoenix
#

There

clear marlin
#

npm install atob

#

you didn't install the module

earnest phoenix
#

oo

#

Ohhh

earnest phoenix
#

Console right?

clear marlin
#

yeah

earnest phoenix
#

Ok

rare granite
#

[VOICE (715707547247575122:2)]: Authenticate failed - VOICE_CONNECTION_TIMEOUT``` I get this right after my bot connects a vc
earnest phoenix
#

It works thanks

clear marlin
#

cool

rare granite
#

Yes it has admin

clear marlin
#

try finding out the issue by debugging ws
client.on('debug', console.log)

clear marlin
rare granite
#

Well that's the debug, u want more of it?

#

Ok

#

Above it is Authenticated as sessionID undefined

clear marlin
#

you could maybe be, try changing voice regions

#

so, the client hasn't logged in?

rare granite
#

Client joins but doesn't authenticates

rare granite
#

Joins*

clear marlin
rare granite
#

Lol ye

#

It's a bug ig in master

clear marlin
#

yes

rare granite
#

Ee and I can't join stage channels without master lmao

clear marlin
#

lol

#

kinda messed up issue and no one to resolve it lol

rare granite
#

Ye

#

Ig I'll just wait for updated stable version

clear marlin
#

I wonder if you try debugging the client, you'll find out the problem's core

rare granite
#

Ye I tried debugging and I just got the things that I told u

#

Ig cuz sessionID is undefined

#

Or idk

clear marlin
#

sessionID?

clear marlin
#

could you show me the debug screen?

untold token
#

im trying to create a "login with discord" but im getting a 400 when trying to use the token url, could anyone help me out?

#
<?php
    $code = $_GET['code']; // works fine

    $clientID = '468138032680402944';
    $clientSecret = 'REDACTED';
    $grantType = 'authorization_code';
    $redirectURI = 'http://localhost/(REDACTED)/identify.php'; // correct URL

    $tokenURL = 'https://discord.com/api/oauth2/token'; // plucked straight from the docs

    $dataArr = array(
        'code' => $code,
        'client_id' => $clientID,
        'client_secret' => $clientSecret,
        'grant_type' => $grantType,
        'redirect_uri' => $redirectURI
    ); // all of the params (it says that) it needs

    $options = array(
        'http' => array(
            'header' => 'Content-Type: application/x-www-form-urlencoded', // same content type (it says that) it needs
            'method' => 'POST',
            'content' => http_build_query($dataArr)
        )
    );

    $context = stream_context_create($options);
    file_get_contents($tokenURL, false, $context);
?>```
low river
#

@near stratus issue solved

#
.catch(() => {
                message.channel.send("Coundn't fetch response!");
            })```
near stratus
clear marlin
untold token
clear marlin
#

so, basically the discord oauth works but it doesn't redirect to the dashboard?

#

the session expires before you reach the dashboard

untold token
#

the error doesn't give me any details in browser but it seems that insomnia does. im gonna try it again from there and see what it says

untold token
#

bad data somewhere i guess

#

or just something missing

#

are codes one-time use?

clear marlin
#

after clicking login with discord, do you see this page(please fuck the bot you see there its just a test app)

untold token
#

seems codes are one-time use

untold token
#

its for a dashboard not to add a bot

#

i authorize

clear marlin
#

yeah, but

untold token
#

it gets the code and redirects to the page im trying to call the token url from

#

and then from that page, when it tries to send the post to the token url, all i get is a 400

clear marlin
#

when you click the login. It must direct you to the oauth2 page?

untold token
#

well yes

#

i go to my login.php

#

it goes to discord's thing

#

i authorize

#

it brings me to my auth.php where i post the code to the token url

clear marlin
#

I don't think there's something wrong with the discord oauth then

untold token
#

right now it's looking like discord api doesn't want localhost as a redirect uri

clear marlin
#

but I'm surely thing there's something wrong with you choosing php, don't get me wrong.

untold token
#

at least that's what i can tell from insomnia

near stratus
clear marlin
#

or maybe cache the session with redis

untold token
#

session != cookie

#

what do you want me to do lol

#

cookies are client-side, sessions are server-side with a cookie that has the session id

untold token
#

anyway

#

insomnia is telling me invalid redirect uri

#

http://localhost/(REDACTED)/identify.php

#

this is what im using

#

with (REDACTED) being something i took out for here

clear marlin
#

so

#

basically there's nothing

#

called

#

indentify

untold token
#

yes there is

#

lol

#
<!DOCTYPE html>
<html>
    <body>
        test
    </body>
</html>```
#

for the time being this is my identify.php

clear marlin
#

why don't you use js instead

untold token
#

unless it's erroring out trying to post something?

clear marlin
#

kthx

untold token
#

well im not doing that but ty for the input

clear marlin
#

does discord have a php oauth2 lib?

#
untold token
#

i got it

#

idk what happened

#

i think it has something to do with the fact i didn't have anything handling post in the identify.php

#

i changed the redirect_uri to my auth.php instead and it worked

#

or get? idk, i'll figure it out

#

thanks for the assistance

latent heron
#

that's some pretty bad php

#

cURL should not be a relied method for OAuth2 access, simply put.

#

that oauth2 script follows a few good vulnerabilities that can be exploited 😬

untold token
#

i figured out exactly what the issue was

#

two different redirect_uri cannot be used

#

i was using one to get the code

#

but then trying to use a different one to get the token

#

it won't let you do that, the code is directly reliant on the redirect_uri you initially specified

latent heron
#

if you guys want, I'll write a PHP class that handles OAuth2 connections completely with Discord

#

I don't mind making it public for use

untold token
#

i used all my own code - except the stream thing, i got that from an example somewhere

#

all i did was use plain php, no curl or anything extra

clear marlin
#

what are you doing btw

untold token
#

me?

clear marlin
#

yes you

untold token
#

dashboard for a bot

clear marlin
#

oo

latent heron
#

you should use the php lib while you're at it

clear marlin
#

bot with djs?

latent heron
#

indirect flex

clear marlin
#

or php

#

lol

untold token
#

i would but i felt it would be more fun to learn all of it in-depth

#

bot with djs of course lol

latent heron
#

don't reinvent the wheel like i did with top.gg api in php angryrage

untold token
#

im only using php for web because i know it better for that purpose

clear marlin
#

there is a discordphp though too

untold token
#

bleh

#

i'd rather keep php for web use

#

i've tried javascript (web) frameworks, they aren't as familiar to me as php is

latent heron
#

i mean if you wanna get bot stats and stuff use the lib

untold token
latent heron
untold token
#

ah

latent heron
untold token
#

noted

#

for now im just working on the basics first

#

mainly getting basic user info via identify endpoint

clear marlin
#

cool, good luck

untold token
#

thank you both frens 02lovelove

clear marlin
#

I'ma stick to doing shit and nothing productive lmfao

untold token
#

for a while that's what i did too

#

but this college semester i finally learned php from one of my classes, which i was really excited for

#

and it was pretty fun

clear marlin
#

cool

untold token
#

so i decided i'd use it for my bot's dash instead of a js framework

latent heron
#

oh that's awesome man

#

i'm making a video about how shit PHP is actually

clear marlin
#

yeah good, express is shite

untold token
#

lol

clear marlin
#

you could though have used nestjs Hmm

untold token
#

like i said, i tried js web frameworks

#

didn't like them much

#

php works with my tiny brain better for now

latent heron
#

PHP is a really good language to begin learning a lot about OOP design imo

#

it's a good entry level

clear marlin
#

yeah, don't mind. Good luck with php.

untold token
#

being able to put the server-side code directly into the pages makes php easier for me to get used to

#

later on once im more familiar i'll probably look into a js solution

untold token
latent heron
#

i used to make account systems in PHP

#

was pretty fun

#

i might try doing it again

untold token
#

i did that for my group project

#

led my group actually

#

cause i already had a lot of background with databases and coding

#

we got full marks in the code ;>

#

and it was pretty

clear marlin
#

I'm waiting for the bot to finish KEKWait

untold token
#

the bot?

clear marlin
#

the bot and dashb

#

your bot

untold token
#

oh

#

i mean technically my bot is finished, been in use for a while, i just haven't pushed it cause it doesn't have much

#

it's just xp for now

#

i figured before i added more stuff (esp flexible customizable things) i should write a dash first

#

only thing is i didn't have the know-how

#

now i do

#

and i also didn't have much patience for the many many quirks of web design

#

now i have a tiny bit more patience

clear marlin
#

So, its a levelling bot?

#

cool

untold token
#

yeah

#

that's it for now

#

gonna add a lot more stuff once web is ready for it

clear marlin
#

hmm, ggs

untold token
#

ty

#

if u want an invite i can send one over

clear marlin
#

I'ma do animation with an empty canvas by then lmfao

untold token
#

animation seems fun

#

i learned the minimal basics of video editing

clear marlin
#

meh, I don't know where to start

untold token
#

premiere pro is fun

#

i also learned why you need a good pc to do it

#

mine is p decent but still struggled with a couple hundred small things i put in the timeline

clear marlin
#

also, lets move this to general

#

lol

untold token
#

kk

#

ima be working on stuff now anyway

#

so thank you

clear marlin
#

bye, also slip invite in dms if want

#

😉

near stratus
#

How do I get rid of this warning ?

(node:15049) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.

I'm using it as

const MongoClient = require('mongodb').MongoClient;
#

nvm goggled it out

pulsar needle
#

would anyone out there have a responsive iframe code?

copper cradle
#

it's the same you already have, but looks nicer

lusty quest
#

he just needed to add useInifiedTopology:true to the client configs

copper cradle
#

I know

#

And they also said they already did that, that's why I suggested them to use object destructuring

willow mirage
#

just simple create Schema and using it like a simple database?

woeful pike
#

mongoose is shit

lusty quest
#

also still needs the same client option to not get the same error

novel jetty
#

Can someone help me with this error please

#

Im not sure what to do

lusty quest
#

did you try to do somewith with the Discord Class before its initialited?

novel jetty
#

No?

wary flame
#

Show the code causing the error

novel jetty
#

Sure

wary flame
#

(hide your token)

novel jetty
#

The line 20 is the 1st line in the code

earnest phoenix
#

ok

novel jetty
#

client.commands = new Discord.Collection();

wary flame
#

Where do you define Discord

novel jetty
#

Isn't discord already defined?

wary flame
#

No

novel jetty
#

That might be why its not working right?

wary flame
#

You need to require it

wary flame
novel jetty
#

After defining Discord, it says that it is already declared

Identifier 'Discord' has already been declared

formal pulsar
#

Hi I have a vps on which I am hosting a bot in node js that generates a .txt file with data to do it temporarily saves it on the vps and then retrieves it and send it in a chat on su discord but the problem arises in the deletion of the file as it does not happen causing errors, on( local windows 10) everything worked fine maybe and ubuntu that does not allow this type of action (I have little experience in the linux world)

  const headers = {
              "Authorization": `Bot ${config.BOT_TOKEN}`
}
 fetch(`https://discordapp.com/api/channels/${msg.channel.id}/messages?limit=100`, { headers: headers })
              .then(res => res.json())
              .then(json => {

 json.forEach(async function (obj) {
                  await fs.appendFile('msg.txt', `${obj.author.username}-${obj.content}\n`, function (err, files) { if (err) throw err; });
 })

                forcecloselog.send("", {
                  files: [
                    "msg.txt"

                  ]
                });

                setTimeout(() => {
                  fs.unlink('msg.txt', function (err) {
                    if (err) throw err;

                  });


                }, 3000);

})// fine then json
lusty quest
#

sounds like file permission issues

#

does the user who manages the files have access to delete the files?

wary flame
formal pulsar
#

from the terminal I can delete files

near stratus
formal pulsar
wary flame
#

@novel jetty you're requiring discord.js three times. Line 1, 19 and 70. (line 1 is without capital first letter so doesn't cause issue but it's still a bad practice) you need to remove the require at line 19 and 70 (requiring is generally done at top of the file) and make sure your casing of the Discord module is consistent throughout the file since variables are case sensitive

#

@formal pulsar Are you sure this is a permissions issue? What is the error? Because if I remember correctly on Linux a user has access to delete all files it creates

formal pulsar
#

ok this should be it

formal pulsar
prime mist
# formal pulsar Hi I have a vps on which I am hosting a bot in node js that generates a .txt fil...

Just going to reformat your code so it doesn't hurt my eyes 🙂

const headers = {
  Authorization: `Bot ${config.BOT_TOKEN}`,
};

fetch(
  `https://discordapp.com/api/channels/${msg.channel.id}/messages?limit=100`,
  { headers: headers }
)
  .then((res) => res.json())
  .then((json) => {
    json.forEach(async function (obj) {
      await fs.appendFile(
        "msg.txt",
        `${obj.author.username}-${obj.content}\n`,
        function (err, files) {
          if (err) throw err;
        }
      );
    });

    forcecloselog.send("", {
      files: ["msg.txt"],
    });

    setTimeout(() => {
      fs.unlink("msg.txt", function (err) {
        if (err) throw err;
      });
    }, 3000);
  });
wary flame
formal pulsar
#

if I put the part that deals with this thing in the comment the bot works without problems

wary flame
#

Ok, just making sure

prime mist
#

Your json.forEach call isn't actually waiting for the appendFile op's to finish. Needs to be something like:

// At the top of your file
const fs = require("fs/promises");

await Promise.all(
  json.map(function (obj) {
    return fs.appendFile("msg.txt", `${obj.author.username}-${obj.content}\n`);
  })
);
woeful pike
#

you also don't need to do any of this at all

#
    forcecloselog.send("", {
      files: [{ attachment: Buffer.from(`${obj.author.username}-${obj.content}\n`), name: "msg.txt" }],
    });
#

no file writing/deleting needed

formal pulsar
#

you say that I don't need to save it on the vps, recover it, send it to discord etc etc

prime mist
woeful pike
#

you're writing to disk, reading the data from disk and then deleting a file when you could just send the data you have in memory to discord directly without any IO

formal pulsar
copper cradle
#

aka

console.log(x);

let x = 4;
formal pulsar
#

ok bot you're kidding right

earnest phoenix
#

In this case: { animated: false, name: '🎉🚓', id: null }, how can i get only first emote (🎉)

#

please*

clear marlin
earnest phoenix
#

only 🎉

#

not 🎉🚓

near stratus
#

this would break with grapheme clusters, or emoji sequences

woeful pike
#

imagine representing strings as an array of characters TeaElixir

quartz kindle
#

you can access characters directly by index

#

no need to array them

near stratus
#

I thought they were unicode 16 or something

quartz kindle
#

true

#

but there should be a better way than that

near stratus
# quartz kindle but there should be a better way than that

Glad you asked
(?:[\uD83C\uDF00-\uD83D\uDDFF]|[\uD83E\uDD00-\uD83E\uDDFF]|[\uD83D\uDE00-\uD83D\uDE4F]|[\uD83D\uDE80-\uD83D\uDEFF]|[\u2600-\u26FF]\uFE0F?|[\u2700-\u27BF]\uFE0F?|\u24C2\uFE0F?|[\uD83C\uDDE6-\uD83C\uDDFF]{1,2}|[\uD83C\uDD70\uD83C\uDD71\uD83C\uDD7E\uD83C\uDD7F\uD83C\uDD8E\uD83C\uDD91-\uD83C\uDD9A]\uFE0F?|[\u0023\u002A\u0030-\u0039]\uFE0F?\u20E3|[\u2194-\u2199\u21A9-\u21AA]\uFE0F?|[\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55]\uFE0F?|[\u2934\u2935]\uFE0F?|[\u3030\u303D]\uFE0F?|[\u3297\u3299]\uFE0F?|[\uD83C\uDE01\uD83C\uDE02\uD83C\uDE1A\uD83C\uDE2F\uD83C\uDE32-\uD83C\uDE3A\uD83C\uDE50\uD83C\uDE51]\uFE0F?|[\u203C\u2049]\uFE0F?|[\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE]\uFE0F?|[\u00A9\u00AE]\uFE0F?|[\u2122\u2139]\uFE0F?|\uD83C\uDC04\uFE0F?|\uD83C\uDCCF\uFE0F?|[\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA]\uFE0F?)

quartz kindle
#

lmao

near stratus
#

w h y
d o
I
g e t
a l l
f e m b o y s ?

quartz kindle
#

why not?

formal pulsar
#

this new system seems to work thanks to everyone

waxen bough
#

box box

near stratus
opal plank
long crow
#

Already use dropdown button erwin

main trench
#

Being stung in the webbing of your fingers is better daniSquare

opal plank
#

from what i got, only 4 or 5 people got whitelisted to the private beta before staff left for the weekend

long crow
#

Look more useful than the clicky one

#

heh

opal plank
#

it is

#

cake just added it to detritus

long crow
#

Erwin and detritus ads

#

run

opal plank
#

meanwhile d.js still adding slash commands that were introduced 7 months ago

blissful valley
#

What do i do if i forgot the bot prefix? i added a new one and can't remember

earnest phoenix
#

Ping it

blissful valley
#

Did nothing happend

onyx hare
#

as im still working on the website desktop to mobile redirect this goes in the header or body?

        if (screen.width <= 699) {
        document.location = "mobile/index.html";
        }
        </script>```
blissful valley
onyx hare
#

@blissful valley dont you have a Config.prefix? in your config file if you have one

undone swallow
#

Is there any way to receive these updates in my own server?

quartz kindle
#

make an announcement channel

#

and connect it

#

actually, you dont even need to make one

#

just open the original announcement channel and click follow

royal island
#
const { AutoPoster } = require('topgg-autoposter')

const poster = AutoPoster('token', shards)
poster.on('posted', (stats) => { 
    console.log(`Posted stats to Top.gg | ${stats.serverCount} servers`)
  })

so i jxt do this in my shard file so it post server stats on site?

onyx hare
opal plank
near stratus
quartz kindle
#

its discord developers, not bug hunters

long crow
#

If I'm confident enough to make my own wrappers, I not even need to wait. But that's that.

novel jetty
tacit sequoia
#

Look at the error?

novel jetty
#

Yea

tacit sequoia
#

No, I mean you should read what it's saying

opal plank
novel jetty
#

existing data was supposed to be a number but it got string

opal plank
novel jetty
#

And i did look in my code but can't find any string

opal plank
#

i assume you arent searching for string

#

cuz if u do, i got bad news for you @novel jetty

novel jetty
#

Whats up

opal plank
#

pls tell me you arent looking for string

novel jetty
#

Im not

opal plank
#

okay good

novel jetty
#

Im trying to find the sting and fix it but i can't find

opal plank
#

let me help you

novel jetty
#

Sure

opal plank
#

read that

#

breakpoints will show u the way

novel jetty
#

Uh...

novel jetty
opal plank
#

there are

#

you need to add them, of course

#

it doesnt magically add them in ur code

novel jetty
#

This debuging thing is too complicated..

#

Nvm

#

Thanks for your time

quartz kindle
opal plank
quartz kindle
#

fine whatever

#

lmao

#

how should i procrastinate today?

opal plank
#

by finishing my bot

earnest phoenix
#

How do i disconnect the github on the version control? (Idk if this off topic)

opal plank
feral perch
#

Does anyone how can we add reactions to a particular number of messages after we execute a command

earnest phoenix
#

is there any other way to get guildsCount other than client.guilds.cache.size

earnest phoenix
opal plank
earnest phoenix
#

ah i thought message

#

my bad

opal plank
#

the reason for fetching 100 is so you dont have to fetch multiple times

#

fetching 1 or 100 will still be a single request

opal plank
earnest phoenix
#

i heard after sharding there'll be problems

opal plank
#

there wont

#

shards dont contain repeated guilds

earnest phoenix
#

yes but will bot cache read all servers in all shards?

opal plank
#

my bot is at 6 shards rn, and as you can see by clicking me, works absolutely fine

#

d.js you'd likely have to reduce() broadcastEval(0

earnest phoenix
#

i mean updating server_count is vc is my task iam using cache and to get guilds count. will i get problems when bot gets sharded?

opal plank
#

read what i said

feral aspen
#

Heyo.

#

What's the appropriate amount of properties a model can have in MongoDB?

eternal osprey
#

hey

#

does anyone know why there is no node_modules folder inside my projectory

#

when i use npm install on my vps

#

like the node_modules is fucking empty

lavish bramble
#

Ping me if you got it

vivid fulcrum
#

??

#

oh nvm firefox was blocking loading the site for whatever reason

#

god damn that's a mess

lavish bramble
#

But the code was too long to send here

vivid fulcrum
#

you have so much repetition in your code

lavish bramble
#

5 rounds

#

So ye

vivid fulcrum
#

your comparisons can be abstracted to a single method

lavish bramble
#

Do you know why its not sending second part?

feral perch
vivid fulcrum
#

your code is more than likely erroring

#

where do you define x

opal plank
lavish bramble
#

Line 20

opal plank
#

or wait x amount of time and react to the messages collected

eternal osprey
#

Error: Cannot find module 'sqlite' 1|index | Require stack: 1|index | - /root/moderationeconomy/index.js 1|index | at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1014:15) 1|index | at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29) 1|index | at require (internal/modules/cjs/helpers.js:72:18) 1|index | at Object.<anonymous> (/root/moderationeconomy/index.js:8:13) 1|index | at Module._compile (internal/modules/cjs/loader.js:1185:30) 1|index | at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10) 1|index | at Module.load (internal/modules/cjs/loader.js:1034:32) 1|index | at Function.Module._load (internal/modules/cjs/loader.js:923:14) 1|index | at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23) 1|index | at Module._compile (internal/modules/cjs/loader.js:1185:30) { 1|index | code: 'MODULE_NOT_FOUND', 1|index | requireStack: [ '/root/moderationeconomy/index.js' ] 1|index | } I have ran npm i sqlite a fucking million times

#

it still returns me this

vivid fulcrum
#

well did sqlite install successfully lol

eternal osprey
#

no i don't think so

#

otherwise it wouldmn't give this error

#

one secpond

vivid fulcrum
#

status is always going to be a truthy value

eternal osprey
#

ake: *** [binding.target.mk:111: Release/obj.target/binding/src/binding.o] Error 1 make: Leaving directory '/root/moderationeconomy/node_modules/ref/build' gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12) gyp ERR! System Linux 5.4.0-42-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /root/moderationeconomy/node_modules/ref gyp ERR! node -v v14.0.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok first error in the line

#

should io rebuild the npm?

vivid fulcrum
quartz kindle
#

install build tools

lavish bramble
vivid fulcrum
#

it's your code and a very simple logical fix

eternal osprey
vivid fulcrum
#

think about it for a second

eternal osprey
#

How do i do that?

#

I forgot

vivid fulcrum
#

if you're checking whether status is a truthy value and it returns, what do you need to do for it to check that it's a falsey value

quartz kindle
#

apt install build-essential

eternal osprey
#

root@UmbralSkies:~/moderationeconomy# apt install build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version (12.8ubuntu1.1). build-essential set to manually installed.

vivid fulcrum
#

put words in an array and then iterate over the array

quartz kindle
eternal osprey
#

ran the command

#

it showed nothing in my terminal tho

#

like no logs or something

quartz kindle
#

and still doesnt work?

eternal osprey
#

nope

quartz kindle
#

do npm uninstall sqlite

#

then npm install sqlite

eternal osprey
#

i hate galaxygate so much as their vps needs so much updates etc

#

it worked, thanks tim,

pale vessel
quartz kindle
#

lmao

#

all linuxes are like that

#

open source moves fast, so every day you login and you see "XX updates are available"

#

if you dont like seeing that then use something like unattended-updates

feral perch
#
let registrations = args[0]
    let teamName = args.slice(0).join(' ');
 
    const filter = m => m.content.includes('!join ' + teamName);
    const collector = message.channel.createMessageCollector(filter, { max: registrations});
#

can someone tell me why does this does not work

#

only talking about the collector

earnest phoenix
#

Hi, I now want to fix the error when I write the bot commands on the server, everything is fine, and when I write in a personal message, they give an error, you can fix it so that there is no error when writing

feral perch
#

if i just use a number in max it works, but does not work with args[0] which is a number

quartz kindle
#

args[0] is not a number

#

its a string

feral perch
#

f

#

I am stupid sorry

earnest phoenix
#
/home/runner/sdsad/index.js:48
     ${message.member.joinedAt.toLocaleDateString()}
                      ^

TypeError: Cannot read property 'joinedAt' of null
    at Client.<anonymous> (/home/runner/sdsad/index.js:48:23)
    at Client.emit (events.js:326:22)
    at Client.EventEmitter.emit (domain.js:483:12)
    at MessageCreateAction.handle (/home/runner/sdsad/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (/home/runner/sdsad/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (/home/runner/sdsad/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (/home/runner/sdsad/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/runner/sdsad/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/runner/sdsad/node_modules/ws/lib/event-target.js:132:16)
    at WebSocket.emit (events.js:314:20)
#

error

sudden geyser
#

.member is null

earnest phoenix
#
client.on('message', message => {
  if (message.author.bot) return;
  if (message.content == '!профиль') { 
    let embed = new Discord.MessageEmbed() 
      .setTitle(message.author.username) 
      .setURL("https://discordapp.com/channels/561512048811442198/607586745269354526/607838205479485464")
    let status = ''
    switch (message.author.presence.status) { 
      case 'online':
        status = 'онлайн'; break;
      case 'idle':
        status = ':orange_circle:нет на месте'; break;
      case 'offline':
        status = 'нет в сети'; break;
      case 'dnd':
        status = ':red_circle:не беспокоить'; break;
    }
    embed.setDescription(`**🛡️ ID пользователя
     ${message.author.id}
    🛡️ Присоединился к Discord
     ${message.author.createdAt.toLocaleDateString()}
    🛡️ Присоединился к серверу
     ${message.member.joinedAt.toLocaleDateString()}
    **`) 
      .setFooter(message.author.tag, message.author.avatarURL)
      .setColor('RANDOM') 
      .setThumbnail(message.author.avatarURL())   
    message.channel.send(embed)  
  }
});
#

code

vivid fulcrum
#

a member doesn't exist in a dm

earnest phoenix
#

Russian-speaking bot

#

If I sent the server chat, this command is ok. And if a person sends a private message, then the bot flies

vivid fulcrum
#

okay

#

read what we sent above

summer torrent
earnest phoenix
#

Yo anyone got python codes to make giveaways as I can't find any one

earnest phoenix
#

Yep none worked

quartz kindle
#

because you dont know how to use them

sly sierra
#

oh wait

#

py

#

but copy and pasting does nothing

earnest phoenix
#

Listen, I'm not super good on the coading side, can you explain in more detail

#

Pls assist

quartz kindle
#

you cant copy paste code

#

you have to learn how to code

earnest phoenix
#

I know a little bit on how to code and I have never copied and pasted

opal plank
latent heron
earnest phoenix
#

U can;t copy paste

#

exactly

latent heron
#

you can hypothetically learn programming by only copy pasting snippets

#

its a concept that involves guided learning

#

but that's only if you believe in that concept

earnest phoenix
#

If u dont learn and copy paste then when u want to modify stuff u wont be able too

opal plank
latent heron
#

i think the majority can

opal plank
#

they wont even bother reading what they are copying

earnest phoenix
#

I hate code snatchers

latent heron
#

look at block coding as a good example

#

you can convert block code to actual language code

#

that's arguably a form of copy pasting

#

under that logic it's feasible to learn from it

opal plank
#

like i said, the majority of people wont even bother reading what they are copying before using it

latent heron
#

i think that's an assumption of how people think in general

opal plank
#

u cant learn if you dont even know the contents of the snippet

latent heron
#

what validity do you have to that statement?

opal plank
#

you may know "okay, this works for this case" but not the reason it does

opal plank
latent heron
#

what can you use to prove that a majority of people cannot interpret coding by reading

#

literally everyone?

#

i doubt that

opal plank
#

they ask for either cogs/files or straight up whole snippets

earnest phoenix
opal plank
#

"someone give me giveaway code pls"

latent heron
#

that's more about spoonfeeding

quartz kindle
#

tbh i learned a lot from copying code

latent heron
#

not the ignorance of coding

#

I learned a shit ton from copying code as well

opal plank
#

they are correlated most of the times

latent heron
#

that's why i think the claim is really invalid because it is possible

opal plank
#

if you READ what you're copying, thats a thing

#

most people here just want functional code, pre digested for them

latent heron
#

right, but correlations between that behavior doesn't mean that's exactly what it is

#

you're making an assumption that people cannot interpret things properly for what they are, ie. code snippets and their purposes

opal plank
#

im assuming based on the bahavious they show here

#

yes

latent heron
#

i don't think the current observations you have here show the full spectrum

opal plank
#

specially due to the fact that if you EVEN GIVE THEM, they will still come back when something errors

latent heron
#

i believe you're broadly stroking over the whole group of people who are learning code and copy paste code for people wanting to be spoonfed due to laziness

#

yes, once again, that's pure laziness

opal plank
#

thats precisely what im doing

latent heron
#

that doesn't mean a majority of people can't learn though

opal plank
#

which is sad, because thats the majority you see here

quartz kindle
#

copy/pasting code can be very useful if you do it right, the difference is:

good:
copy paste code, didnt work? read error, check variables, check arguments, figure out what the code needs to work, change and adapt both the copied code and your code until it works.

bad:
copy paste code, didnt work? code is bad/broken, give up, look for a different code.
latent heron
#

i can agree with those sentiments

latent heron
#

is asking really that bad of a thing though

opal plank
#

when you dont even try urself, and go back to your argument of laziness, yes, it is

latent heron
#

i'd rather someone own up to their ignorance and be guided than make presumptions about programming and then give false advice/information to other programmers

#

i really hate people who give out the wrong advice to other coders

earnest phoenix
latent heron
#

that bothers me a lot

#

ok so

#

look at this dude for instance

#

it's about being spoonfed

#

i don't think it's really about not being able to understand the concept

#

because if anyone is dedicated, like you mentioned, they have the ability to learn

opal plank
#

if you want to become a developer, you NEED to create your own problem-solving skills as well as independence if you ever hope to get a job in this career. Not even trying to solve the problem and INSTANTLY relying on other devs to solve YOUR issue, without you even trying, is where i draw the line for not helping, and instead showing them the importance of "breaking your own legs"

latent heron
#

i'm not really arguing about the semantics of educating someone to become a developer though

#

i'm merely arguing the ability that learning can be possible through copy pasting code

earnest phoenix
#

LMFAO

opal plank
#

but thats what i mean, laziness stops people from doing that

#

theres good and bad laziness

latent heron
#

ok that's fair

opal plank
#

people often chose the bad

latent heron
#

i'll agree with you on that, laziness disables people from that proper learning state

opal plank
#

i'll just copy this and move along

quartz kindle
latent heron
#

didn'treadthedocs™️ moment

opal plank
#

pretty sure tim already had answered them

#

idk why i got that person blocked

#

but surely i had a reason

latent heron
#

last 5 replies?

#

which replies?

opal plank
#

tim and someone else already replied to them before

latent heron
#

oh pfft

opal plank
#

wdym someone still use that

#

ptb is the stable'st branch

#

everytime theres an outtage, the only one up most of the times is ptb

#

yeah

#

and i dont get bombared with updated(shitty one specially) like canary

#

bruh

#

theres no dev version

latent heron
#

im on canary, i live on the edge

opal plank
#

theres no such thing

#

its canaray

#

canary*

#

the development version is canary

#

its canary

#

also canary

#

if u even bothered looking at the files when it loads up development version you'd see its literally canary

oak cedar
#

how can i scrap the source code of a website with python?

opal plank
#

without any changes whatsoever

#

just makes u look dumb bragging about "oh look at me, im doctor lupo" with the development version

#

open that

#

ugh fine, here

#

download it

quartz kindle
#

im doctor uvuvwevwevwe

opal plank
#

right there

opal plank
#

pleasure to meet ya

#

now run it, and go to settings

quartz kindle
opal plank
#

oh wow, would u look at that

#

its just fucking canary with a fancy black icon that skids flex cuz it has 'development' in the name

#

good luck

compact quest
#

Hey what is the issue pls can anyone help

#

I cant host my bot anyway

round cove
#

better-sqlite3 takes 50 years to build on shit software btw.

#

So repl is probably taking forever to build it.

compact quest
earnest phoenix
#

i am guessing you use quick db which is bad idea

feral aspen
#

Heyo.

#

What is options.unique? Didn't understand...

rocky hearth
#

what is the meaning of the comment here
I didn't get it

zenith terrace
cinder patio
#

"so we don't swallow exceptions from actual bugs in components" doesn't make much sense to me

#

passing a second parameter in then is the same as using catch afaik

#

catch internally uses the then function too

rocky hearth
#

yes, so y r they saying to avoid a catch block

cinder patio
#

ask in the react server

#

or wherever you got that screenshot from

rocky hearth
#

do u hv the react server link?

opal plank
cinder patio
woeful pike
cinder patio
#

but it's saying "instead of catch"

woeful pike
#

doesn't make much sense in this context. Normally the point of using the second parameter instead of .catch() is to make sure you only handle errors originating from the promise you're attached to and not any of the errors that could be originating from .then() branch the catch is attached to

cinder patio
#

That's probably what the comment means, but that isn't really a good example

woeful pike
#

apparently it's just a copy paste mistake from a previous version of the docs lol

#

for class based components with this.setState yes it matters but hook setters can't throw

cinder patio
#

ah lol

pale vessel
feral aspen
#

It's in default false, right?

pale vessel
#

if true then it'll always create a new invite

feral aspen
#

Ohh.

pale vessel
#

default is false yeah

feral aspen
#

Ooo.. alright! Thanks! 👍

snow tartan
#

Does anyone know why my bot user count is always 1? ( I have SERVER MEMBERS INTENT and PRESENCE INTENT both enabled. I'm in discord.py.

clear marlin
woeful tendon
#

best hosting for discord bots?

#

that work with custom ipv6 blocks

clear marlin
#

or maybe azure if you're onto some very high level hosting

sudden geyser
snow tartan
last tapir
#

i want to add an if statement to check if the command is from a group of IDs or from users that have this role ID..

#

?

slender thistle
#

Who here has worked with slash subcommands?

near stratus
#

I ended up rewriting my whole bot

slender thistle
#

Do you have an example of the subcommands visuals on hand?

near stratus
slender thistle
#

Ah, that didn't come off as clear as I wanted it to, my bad. I meant how a subcommand looks client-side

#

I assume it's like this?

earnest phoenix
#

Anybody knows how to clean all the documents in a mongodb database?

near stratus
#

you mean options

#

?

torn mesa
#

Friends, I am getting such an error in the log record, how can I solve it?

slender thistle
#

What I meant is how they looked client-side with multiple subcommands (options with type = 1)

near stratus
sudden geyser
near stratus
#

@slender thistle Okay I tried a demo
and unless you use type 2 (Subcommand group) It'll come up as a list.
Like

/ping hello
/ping world
/ping beep
/ping boop

when you type /ping
Where hello, world, beep, boop options are type 1
I'm gonna try with type 2 and tell you later
||I'm on Ubuntu and IDK how to take screenshots||

earnest phoenix