#development

1 messages Β· Page 1281 of 1

faint prism
#

What's wrong with it?

honest perch
#

Show a screenshot

faint prism
#

I hope you aren't verbatim putting the < and >

honest perch
#

Of the code

faint prism
#

@narrow cloak send more code

narrow cloak
#

wait a minute please

earnest phoenix
#

An hour later I am still stuck trying to install MySQLi on repl.it

compact oriole
compact oriole
#

why the <>

earnest phoenix
#

@narrow cloak what do you need help with?

compact oriole
#

especially on the client

#

Auger I saw that lol

narrow cloak
#

i i want to remove that

earnest phoenix
#

i i want to remove that
@narrow cloak backspace exists....

narrow cloak
#

@narrow cloak what do you need help with?
@earnest phoenix why it shows error

faint prism
#

because you must use your variable names

earnest phoenix
#

@earnest phoenix why it shows error
@narrow cloak because you're trying to use javascript like a markup language with tags KEKW

faint prism
#

<client> is an example
You replace it with your client variable name

#

Same with the other <stuff>

narrow cloak
#

if i want to remove < > that for activity

faint prism
#

if i want to remove < > that for activity
@narrow cloak do it. You have to

earnest phoenix
#

if i want to remove < > that for activity
@narrow cloak do you know how to press backspace

faint prism
narrow cloak
#

yes yes dont anger

compact oriole
#

you're the one here being spoonfed

narrow cloak
#

now what to do

restive furnace
#

nice token leak

compact oriole
#

lmaoo

faint prism
#

oof

restive furnace
faint prism
#

^ this. That link is pretty good for beginners

Deleting it won't fix. Gotta regen

narrow cloak
#

why setactivity is having error

clever dust
#

because you are doing it wrong

faint prism
#

yeah

compact oriole
#

well you gotta regen it because I got it LUL

narrow cloak
#

what is the correct way

compact oriole
#

Im not gonna use it of course

placid iron
compact oriole
#

because it is against tos

clever dust
#

anyone know how to set the embeds color when a message includes a website link? like https://youtube.com is red

placid iron
#

=m/ snipe [#development](/guild/264445053596991498/channel/272764566411149314/)

#

😩

narrow cloak
#

what is the correct code for that

earnest phoenix
#

mta color?

forest mirage
#

@narrow cloak stop

compact oriole
#

@narrow cloak Read. The. Guide.

#

READ IT

#

and regen your token

narrow cloak
#

i want to read it from first 😩

#

and regen your token
@compact oriole why

clever dust
#

mta color?
wdym?

delicate zephyr
#

@clever dust <meta name="og:theme" content="#hexcode">

compact oriole
#

because I have it

clever dust
#

Thanks

compact oriole
#

nobody else should have it

#

so go regen it

#

as you posted a pick with it

placid iron
#

Shouldn't it be regened already now because you posted it here

compact oriole
#

probably

#

as it got deleted

narrow cloak
#

OMG i will regen

compact oriole
#

by Discord

placid iron
#

Ah

compact oriole
#

well good

restive furnace
#

and everyone can have it with sniper bots

narrow cloak
#

i changed

compact oriole
#

it was regenned

modern sable
#

discord doesnt delete tokens

compact oriole
#

it doesn't?

#

is Discord dumm dumm

placid iron
#

Let's test

delicate zephyr
#

I already tested

faint prism
#

Whatever Affax is posting is 401 anyways

delicate zephyr
#

theres a bot in here that posts all tokens to github

#

which means you get insta dm'd by discord

rare moss
#

Yo i'm looking for someone proficient in discord.py to work on a bot that I have been working on for a very long time. message me if you want to be apart of the project.

restive furnace
#

Whatever Affax is posting is 401 anyways
isnt 403 forbidden? not 401 or am I wrong?

modern sable
#

401 is unauthorized

faint prism
#

401: Unauthorized

compact oriole
#

but try to avoid leaking it in the future

#

especially clear as that

forest mirage
#

affax

compact oriole
#

what

forest mirage
#

you posted it here

#

twice

compact oriole
#

he regenned it

restive furnace
#

yep 403 is forbidden, 401 unauthorized

forest mirage
#

and you ask him to not leak it?

#

πŸ€”

compact oriole
restive furnace
#

he sent a pic

#

with it in the pic

forest mirage
#

and affax posted it here twice

compact oriole
#

We got him to regen

#

and I deleted it?

delicate zephyr
#

@forest mirage

theres a bot in here that posts all tokens to github
which means you get insta dm'd by discord

#

It doesnt matter

compact oriole
#

yea

#

so that would trigger too

delicate zephyr
#

affax was just trying to do some good

#

calm the heck down smh

forest mirage
#

πŸ™†β€β™‚οΈ

modern sable
compact oriole
#

I guess I was off by some though

faint prism
#

Pretty sure you typed it wrong though

delicate zephyr
#

@compact oriole the F's look like E's

#

so

compact oriole
#

as he didn't get dmed

narrow cloak
#

i regenerated if you wanna hack you f u k k e r s

faint prism
#

We are a free blue team

placid iron
restive furnace
#

yes

faint prism
#

||Fuckers||
@narrow cloak blue team

slate path
#

Hello

earnest phoenix
#

anyone know how to set the embeds color when a message includes a website link? like https://youtube.com is red
@clever dust add a meta tag in the HTML head of type og:color and the content should be a valid CSS color
example:

<head>
    <meta type="og:color" content="white" />
</head>
narrow cloak
#

@narrow cloak blue team
@faint prism what you saying

faint prism
clever dust
#

@clever dust add a meta tag in the HTML head of type og:color and the content should be a valid CSS color
example:

<head>
    <meta type="og:color" content="white" />
</head>

@earnest phoenix Thanks

earnest phoenix
#

i regenerated if you wanna hack you f u k k e r s
@narrow cloak if you call us fuckers we'll happily kick you out and/or never ever help you with anything again

faint prism
#

we'll

earnest phoenix
#

we'll
@faint prism well he called all of us fuckers he didn't specify who

narrow cloak
#

i dont tell you man i am telling the hackers

restive furnace
#

we r not hackersβ„’

#

we are programmers (or most of us)

narrow cloak
#

i am not telling any one or ia m not metioning

#

i am telling only hackers

faint prism
#

moving on, lol

#

Did you replace your token in the script after regenning it?

narrow cloak
#

yes man

earnest phoenix
#

@narrow cloak it is a better idea to store your token in a different file and get the token from it when needed. Atleast you won't accidentally leak your token when sending your code anywhere.

#

Plus most VPSs hide .env files from being viewable by anyone except the project owner(s) so you'll be 99% safe if you make your code public like me

faint prism
#

Most VPSs proactively hide files?? Since when?

narrow cloak
#

Plus most VPSs hide .env files from being viewable by anyone except the project owner so you'll be 99% safe if you make your code public like me
@earnest phoenix ok thanks man

clever dust
#

@clever dust add a meta tag in the HTML head of type og:color and the content should be a valid CSS color
example:

<head>
    <meta type="og:color" content="white" />
</head>

@earnest phoenix nope, didn't work

earnest phoenix
#

Most VPSs proactively hide files?? Since when?
@faint prism idk repl.it and firebase hide a fuckton of files iirc

#

@earnest phoenix nope, didn't work
@clever dust maybe the spelling if color is colour

clever dust
#

alright, i'll try

narrow cloak
#

i think @earnest phoenix is a best moderator

clever dust
#

he isn't even a moderator by the looks of role

earnest phoenix
#

i think @earnest phoenix is a best moderator
@narrow cloak what the fuck no i don't wanna be mod in the most cancer server on earth

faint prism
#

repl isn't a VPS. It'd argue it's more of a SaaS

earnest phoenix
#

he isn't even a moderator by the looks of role
@clever dust i have no roles

#

repl isn't a VPS. It'd argue it's more of a SaaS
@faint prism saas means mother-in-law in Hindi mmLol

faint prism
#

Exactly

earnest phoenix
#

lol

clever dust
#

@clever dust i have no roles
@earnest phoenix exactly, you only have @everyone role

narrow cloak
#

@narrow cloak what the fuck no i don't wanna be mod in the most cancer server on earth
@earnest phoenix watch your language

earnest phoenix
#

@earnest phoenix watch your language
@narrow cloak imagine saying watch your language on an app that is meant for teenagers and teenagers swear like hell

clever dust
#

@clever dust maybe the spelling if color is colour
@earnest phoenix nope, still doesn't work

earnest phoenix
#

smh

#

@earnest phoenix nope, still doesn't work
@clever dust can you send the code?

clever dust
#

oh wait....

#

i have a typo, sorry, i will try again lol

narrow cloak
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaa

earnest phoenix
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaa
@narrow cloak wow seems like you're having a hard time being underage and using discord
press this button: Fortnite_F

faint prism
#

ImPhinton What could you possibly be typing this long
Oh

earnest cloak
#

So im trying to make a mod mail feature and it works well but whenever the bot sends the embed to the mod mail channel it sends back a blank embed to the user. Is there a way i can make sure the bot only sends the messages that mods send to the channel?

elif channel is not None: 
                myEmbed = discord.Embed(title="Mod Mail", description=f'{message.content}', timestamp=datetime.datetime.utcnow(), color=0xa50eb9)
                myEmbed.set_author(name=f'{message.author.name}#{message.author.discriminator}')
                myEmbed.set_thumbnail(url=f'{message.author.avatar_url}')
                await channel.send(embed=myEmbed) 
    if message.channel.category == category: 
        TheID = message.channel.name 
        reporter = guild.get_member(int(TheID)) 
        print(TheID) 
        if reporter is None: 
            print("Member not found.")
        else:   
            myEmbed = discord.Embed(title='Mod Mail', description=f'{message.content}', timestamp=datetime.datetime.utcnow(), color=0xa50eb9)
            myEmbed.set_thumbnail(url=f'{message.author.avatar_url}')
            myEmbed.set_footer(text=f'Message sent by: {message.author.name}')
            await reporter.send(embed=myEmbed)```
#

it was copy and paste lmao

earnest phoenix
#

ImPhinton What could you possibly be typing this long
@faint prism he types his whole question in detail like a good boy so we don't die from weirdass zero-context questions

i like people like him

#

@earnest cloak elif???

onyx jungle
#

Um what website does everyone use to code?

pale vessel
#

else if in python

shrewd shore
#

I mean if one person joins a voice channel which bot give roles? And when the person leaves it takes the roles back?

faint prism
#

elif

earnest phoenix
#

Um what website does everyone use to code?
@onyx jungle there is no single website we use whatever we like

onyx jungle
#

I just wanna know which one is best because my bot is very glitchy and buggy

faint prism
#

I just wanna know which one is best because my bot is very glitchy and buggy
@onyx jungle I don't use a website

earnest phoenix
#

I just wanna know which one is best because my bot is very glitchy and buggy
@onyx jungle read pins of this channel first

earnest cloak
#

bruh i swear if its that one line im going to feel so slow

shrewd shore
#

I mean if one person joins a voice channel which bot give roles? And when the person leaves it takes the roles back?

faint prism
#

Copy
Paste

pale vessel
#

Delete

shrewd shore
#

Tell me please

earnest phoenix
#

I mean if one person joins a voice channel which bot give roles? And when the person leaves it takes the roles back?
@shrewd shore you can't just copy paste your question and call it a day also your question is making ZERO sense to us

shrewd shore
#

Which bot does voicelinks?

earnest phoenix
#

Which bot does voicelinks?
@shrewd shore search it on our website https://top.gg/search or try making the bot yourself

#

@clever dust try searching for Open Graph meta tags it'll show up with a lot of results that'll teach you how meta data with types like og:thing work. Also double-check your spelling of color HTML was invented in America and British English spells color slightly but significantly differently.

earnest cloak
#

yea my b

earnest phoenix
#

yea my b
@earnest cloak b stands for a lot of things choose one mmLol

azure fable
#

bad

earnest phoenix
#

bad
@azure fable i thought butt for some reason what the fuck is wrong with me

azure fable
#

Good to know where your head's at

#

:P

earnest phoenix
#

Good to know where your head's at
@azure fable i don't have a head i have a skull with no hair or skin or flesh or brain a head has all of that

#

||find da joke||

azure fable
#

Impressive

#

Im lookin

#

searchin

#

computin

earnest phoenix
#

so far no progress in installing MySQLi on repl.it

earnest cloak
#

how in the world do i use hastebin

#

been trying to figure this out for a minute now lmao

azure fable
earnest phoenix
#

how in the world do i use hastebin
@earnest cloak copy paste the code there and click save then share the link

azure fable
#

step 2 copy-paste code to there

#

step 3: ctrl + s

earnest phoenix
#

Uhm i doing uptime bot. Its approving top.gg?

#

step 4: flood chat with steps to use hastebin instead of just putting the steps on hastebin then sending the link here

#

I hope i not banned

azure fable
#

Actually

#

hastebin appears to be broken

#

for me at least

clever dust
#

@clever dust try searching for Open Graph meta tags it'll show up with a lot of results that'll teach you how meta data with types like og:thing work. Also double-check your spelling of color HTML was invented in America and British English spells color slightly but significantly differently.
@earnest phoenix alright, thanks

earnest cloak
#

yea i think its broken rn

#

wont let me save it for some reason

earnest phoenix
#

@earnest cloak nice pp

#

@clever dust when did i even help you with anything i just sent you off to google btw don't use duckduckgo it sucks

earnest cloak
#

@earnest phoenix dblWink

earnest phoenix
#

@earnest phoenix bro i doing uptime bot and this banned top .gg?

azure fable
#

if you have the file in VCS can you just link it from there @earnest cloak

earnest phoenix
#

OMG REALLY?

earnest cloak
#

how would i do that? sorry if i seem slow but i literally just started to learn to code like 2 days ago

azure fable
#

Well, is your code on GitHub?

faint prism
earnest cloak
#

yea

earnest phoenix
#

I am doing 5st bot lol

azure fable
#

ok, you can just open the file in the github repo

#

and then get the link from that page

#

from your url bar

slender thistle
#

@earnest phoenix define "uptime bot"

azure fable
#

Oh, I think your repo is private

#

er

slender thistle
#

Literally just ask a moderator if X is allowed for a better response

azure fable
#

actually

#

and share that

#

don't know why I didn't recommend that at start

strange mango
#

Hi, why is iframe not working on Chrome for my site?

earnest phoenix
azure fable
#

@strange mango How in the world are we supposed to know

pale vessel
#

jeez

faint prism
#

Hi, why is iframe not working on Chrome for my site?
@strange mango open chrome DevTools and see what the console error is

azure fable
#

you have given us 0 information

pale vessel
#

why are you like this

earnest phoenix
#

Hi, why is iframe not working on Chrome for my site?
@strange mango send the code please we can't help without knowing what you're doing

earnest cloak
azure fable
#

got it

#

remove embeds

#

:P

faint prism
#

Tfw nobody even watches my gif to the end mmLol

azure fable
#

(discord)

earnest phoenix
#

Tfw nobody even watches my gif to the end mmLol
@faint prism I did

earnest cloak
#

but embeds make it look "edgy"

azure fable
#

nono, that wasn't a suggestion for your code

#

for your message lol

opal plank
#

@faint prism i did

pale vessel
opal plank
#

veri gud indeed

leaden rover
#

Is mongodb the only database? Also what does db mean? ConfusedDog

opal plank
#

why the heck int the id?

faint prism
#

No

pale vessel
#

db means database 4heed

azure fable
#

@earnest cloak what is the error that occours w/ this code

pale vessel
#

you answered yourself

faint prism
#

You can easily find an answer if you Google that question @leaden rover

leaden rover
#

ok

faint prism
#

How many people here knew that precursor for databases was file cabinets

opal plank
#

though if you just search for what is db you might find yourself seeing gifs of Dancing Belugas

leaden rover
earnest phoenix
#

Is mongodb the only database? Also what does db mean? :ConfusedDog:
@leaden rover database are used to store information that can be accessed later by programs
why the hell will there NOT be multiple types of databased in the world like any other application the community has got a HELL TON of variety of stuff for everything including databases
my favourite is Firestore

opal plank
#

PostgreSQL

azure fable
#

tl;dr: No

opal plank
azure fable
#

lol

earnest cloak
#

so im not getting any errors, it works great the only problem is when the bot sends the embed with the message he got from the user to the mod mail channel it will send a blank embed back to the user because its picking up the embed as a message. im trying to make the bot stop sending the blank embed and only send embeds with the message he gets from the user in the mod mail channel.

azure fable
#

Ok, great explanation, will take a look

sacred cypress
#

Hi

#

I'm just leaving this here

azure fable
#

sh

#

its a discord bot The use case is a discord bot

#

begone

pale vessel
#

no it's a programming language

azure fable
#

..

sacred cypress
#

No, this is patrick!

earnest phoenix
#

https://discordgift.site

@clever dust Try looking at the source for this site it contains meta data for the link color. Goto view-source:https://discordgift.site in Chrome for the source code without getting redirected to YouTube

opal plank
#

Hmmm bulkdelete requires MANAGE_MESSAGES perm, if i want to delete my own messages in bulk is there a better way than just spamming the api with possibly 100 delete requests?

earnest phoenix
#

Hmmm bulkdelete requires MANAGE_MESSAGES perm, if i want to delete my own messages in bulk is there a better way than just spamming the api with possibly 100 delete requests?
@opal plank fetch the last 100 messages in the channel, filter it so you only get your messages then run a .forEach loop on the collection to delete them bigbrain

azure fable
#

@earnest cloak can you just put a conditional in the second bit like you did before

if message.author != client.user: ## Doesn't make the bot respond to itself

so that the embed is not sent back to the user from the bot's message

opal plank
#

is there a better way than just spamming the api with possibly 100 delete requests?
@earnest phoenix

earnest phoenix
#

99.99% sure it's a no

opal plank
#

also forEach(), cringe

earnest cloak
#

ill try that

opal plank
#

fuck, i guess i'll just add a stupid cooldown to it

delicate zephyr
#

Hmmm bulkdelete requires MANAGE_MESSAGES perm, if i want to delete my own messages in bulk is there a better way than just spamming the api with possibly 100 delete requests?
@opal plank no it doesnt. If you get an array of all the bots messages and use bulk delete it just deletes them normally

#

it only requires manage messages if youre bulk deleting other users

opal plank
#

this is odd, there might be some weird ones passing thru though

#

cuz i am filtering

#

dunno how though

clever dust
#

https://discordgift.site

@clever dust Try looking at the source for this site it contains meta data for the link color. Goto view-source:https://discordgift.site in Chrome for the source code without getting redirected to YouTube
@earnest phoenix Thanks, i just figured it out using ```html

<meta name="theme-color" content="hexcolor">```

delicate zephyr
#

@opal plank whats me

opal plank
delicate zephyr
#

hmmm

earnest phoenix
#

wtf

#

it's not an OpenGraph thing

pale vessel
#

baka

earnest phoenix
#

wait we use name instead of type when doing meta shit

*runs a quick botum eval to send a GET request to discordgift.site then JSON stringify it and send it in the channel*

*botum offline*

clever dust
#

I use```html
<meta property="og:thing" content="Content">

#

property

earnest cloak
#

@azure fable thanks that worked out for me

azure fable
#

Awesome, happy to hear it

fiery canyon
#

hmm if i'm looking for a developer to collab with

#

where could i ask for that

earnest phoenix
#

How do I develop

fiery canyon
earnest phoenix
#

where could i ask for that
@fiery canyon anywhere outside here

azure fable
#

LOL

opal plank
#

@delicate zephyr are you 100% sure about the bulkDelete() ?

delicate zephyr
#

yes

opal plank
#

cuz im looking rn at the botmessages with the debugger

#

every single one is mine

earnest phoenix
azure fable
#

You've send me a js file

#

and said "whadooyathink" ?

#

do you want to to comment on code style? Is there an error?

#

Do you want me to recommend comments and documentions?

#

efficiency improvements?

#

What do you need?

#

@earnest phoenix

earnest phoenix
#

i need tips

open rune
#

sent him nude

azure fable
#

@opal plank Have you confirmed that your bot is able to delete a single one of its messages

opal plank
#

well, im lost then, cuz all of the messages are mine, none are 14 days > and i dont have manage_messages

azure fable
#

(without bulk delete)

opal plank
#

yes

#

though it should

#

that doesnt need permissions

earnest phoenix
#

xD

azure fable
#

if you, from the debugger, inspect the variable botMessages, can you confirm that only messages sent by the bot are in there?

earnest phoenix
#

yo

azure fable
#

?

opal plank
#

you are asking a question that i answered before

azure fable
#

oh ic

opal plank
#

definetly all of them are mine

azure fable
#

Hm, then I am unsure

opal plank
#

precisely why i asked Luke if he was certain of bulkDelete

restive furnace
#

Hello, I am having problems while extending discord structures. So basically TS Compiler is complaining about that the field doesn't exists on type of 'Message' (yeah i'm extending Message). I have made interface for it, but I would like to somehow replace the interface to my local interface of discord.js's Message file without needing import extendedMessage from "../../../../../interfaces/Message/IExtendedMessage";?

opal plank
#

bruh

#

just import the interface and redeclare the module

restive furnace
#

so basically make extended typings for d.js?

opal plank
#

make an interfeace of your own first to be attached on Message

#

then redeclare the module discord-js with the new interface

#

then import the interface on your index/other files

#

same name interfaces merge

#

so if you looking to add stuff on Message its as simple as making an interface called Message

#

when both on the same file they'll merge

ancient nova
#

could you guys rate it?

opal plank
#

@ancient nova not the place

ancient nova
#

isn't development to share you work?

azure fable
#

looks clean

opal plank
#

meh whatever

#

not gonna sweat over that

ancient nova
#

ty

restive furnace
#

so basically this will work: ts import { Message } from "discord.js"; import Message from "../../../../interfaces/Message/IExtendedMessage";?

azure fable
#

Maybe capitalize the P in Please when you say "please check out..."

#

idk, thats all I've got lol

ancient nova
#

@azure fable thanks

opal plank
azure fable
#

oh noes

restive furnace
#

so basically this will work: ts import { Message } from "discord.js"; import Message from "../../../../interfaces/Message/IExtendedMessage";?
or does declare module "discord.js"; shortern this, to import { Message } from "discord.js"; when i add the extended message there? I use djs's extending btw: Discord.Structures.extend("Message", M => {});.

opal plank
#

bruh for the love of god dont do that

#

basic coding tip

#

dont touch other people's lib

#

put your interfaces out of there

restive furnace
#

so i only need interfaces?

delicate zephyr
#

@opal plank they probably changed it then

opal plank
#

i dont think it ever allowed it

#

the only one i see below is deprecated

restive furnace
#

so i only need interfaces?
also, I need to include both of the interfaces explicitly? There's no way that import { Message } from "discord.js"; imports both?

opal plank
#

again

#

you need 2 interfaces named Messages

#

once you import them both, it merges

restive furnace
#

in only one file?

#

or do i need to import both in any file i use message?

#

(and sorry for being dumb, has been using TS for like 3-4 days)

azure fable
#

for a second I thought this was some js voodoo I was unfamiliar with

opal plank
azure fable
#

then realized this is ts

opal plank
#

i got Client declared in interfaces.ts

#

once they both get pulled in, they merge

restive furnace
#

so: ts declare module "discord.js" { interface Message { customField: string; } }will work, if i understood right?

#

and then import the interface in file i use them

junior bison
#

i am confused how coding works

#

Jesus christ

restive furnace
#

this is TS, if u use JS ignore it.

junior bison
#

k

#

lol

opal plank
#

@restive furnace yeah

restive furnace
#

alright

earnest phoenix
#

help=

#

?

azure fable
#

What is the issue?

earnest phoenix
#

problem=return message.reply("An error occured!");

sonic lodge
#

if (!message.member.haspremission("MANAGE_MESSAGES"))

compact oriole
#

haspremission LUL

azure fable
#

ohnoes

#

lol

compact oriole
#

hasPermission

sonic lodge
#

you mean .hasPermission

solemn latch
#

hasPremission is better ;p

sonic lodge
#

lol

earnest phoenix
#

return is false why

sonic lodge
#

ParseInt(args[0]) should be parseInt(args[0])

compact oriole
#

@earnest phoenix you should use an ide...

#

or at least learn how to use one

#

as most of these issues are shown as errors in an ide

#

or it will tell you what you can use (generally)

earnest phoenix
#

ok

sonic lodge
#

every programming language is case-sensitive if you haven't noticed

earnest phoenix
#

yo

sonic lodge
#

are you using d.js v12 or v11

earnest phoenix
#

v11

sonic lodge
#

it's deprecated

#

go update it

compact oriole
#

yea

earnest phoenix
#

hmm

#

ok

compact oriole
#

use the newer one :P

solemn latch
#

most people have forgotten how to use v11 anyway

compact oriole
#

v11 is so bad compared to v12

sonic lodge
#

plus the number 12 is composite while 11 is prime, making 11 more inferior

quartz kindle
#

people complain so much about updates and breaking changes, but now everyone is used to v12 and shits on v11

compact oriole
#

yea

#

also, v12 forces you to make better code

#

with "forced" caching

solemn latch
#

tim would disagree with that ;p

compact oriole
#

you can get privilaged perms but most bots will have to use caches

sonic lodge
#

tim and his insane lib saved my bot

quartz kindle
#

hes talking about being forced to differentiate between cache and api

#

which i agree

solemn latch
#

Ah

earnest phoenix
#

The amount of aggressive caching that exists on djs is just insane, 669MB ram used for 266k members cached HyperSweat

quartz kindle
#

xD

compact oriole
#

yea...

#

I wished you could choose what you cache

#

like I have no use for caches

earnest phoenix
#

I mean intents exist

#

But not much use

quartz kindle
#

thats what my lib does

earnest phoenix
#

Tim did you add the new features of 12.3.1 to discord.js-light?

compact oriole
#

like my trivia bot that is a gameshow only uses a reaction collector

quartz kindle
#

yes

earnest phoenix
#

What if you wanted to do a heavy task
But god said
JavaScript heap out of memory

opal plank
#

laughs in 128Gb ram

#

i think the other server has 256 iirc

compact oriole
#

can I disable caching in discordjs?

earnest phoenix
#

Damn well i might just get a NASA computer

opal plank
sudden geyser
#

every programming language is case-sensitive if you haven't noticed
@sonic lodge php would like a word with you

opal plank
#

SQL joined the chat

compact oriole
#

php is not a real lang LUL

sonic lodge
#

πŸ˜…

opal plank
#

i wonder if you can code with postgres

#

it has functions, might be able to do some tricky stuff

compact oriole
#

code a bot with postgres

opal plank
#

Coding in postgres bigbrain

earnest phoenix
#

Just make a new programming language called boatgres

compact oriole
#

wait no, code a bot with the ethereum blockchain

earnest phoenix
#

Best programming language ever

opal plank
#

PostBotumSQL

earnest phoenix
#

wait no, code a bot with the ethereum blockchain
@compact oriole Weak, code a bot with a minecraft command block

#

Why :c

#

(

compact oriole
#

what is that edit?

earnest phoenix
#

ehmmmmm

opal plank
#

Did you know windows comes shipped with built in tools so you dont have to humiliate yourself by positing poor quality pics?

compact oriole
#

^

quartz kindle
#

@compact oriole its possible to disable caches in discord.js, but you need to heavily modify it. i made a lib that does that for you

compact oriole
#

well, the thing is that I have to use another lib that uses discordjs

#

kurasuta

#

it is sharding for ts

earnest phoenix
#

Tim saves boats on discord

compact oriole
#

BUT

#

I'll definitely use your lib when I make my own infrastructure

#

and I can use any lib

#

(as I do sharding myself)

earnest phoenix
#

Everybody gangsta until tim makes a lib that can be used on every programming language

compact oriole
opal plank
#

isnt technically binary a universal programming language? mmulu

earnest phoenix
#

It's but not according to readable ones through, every programming language gets compiled to machine code as binary but you can't do
String string = "bruh";
In JavaScript as it's in java

compact oriole
#

Glitch facepalm

opal plank
earnest phoenix
#

@earnest phoenix (

#

is easier then visual studio

#

xDDD

#

is easier then visual studio
@earnest phoenix

compact oriole
#

who even uses visual studio for js?

#

vscode is where it is

opal plank
#

making memes in sharex is some high iq plays

earnest phoenix
#

me xD

#

?

#

You don't open arrow functions with a parentheses

#

( => {

#

ahaaaa

#

ups

#

thx

opal plank
#

its some high iq plays

#

( undefined => {} )

late plank
#

Is discord.js just not fit for large bots

#

because christ - why do they cache everything

opal plank
#

cof cof

#

tim

quartz kindle
#

because its general purpose

opal plank
#

cof cof

#

i like caching

quartz kindle
#

you sacrifice efficiency and speed to support all possible use cases

opal plank
#

i thought it was the other way around

late plank
#

you sacrifice practicality when there's no memory cap

opal plank
#

caching means you dont have to wait for api responses

#

so ti should be faster, no?

late plank
#

@opal plank at the cost of memory - which it'll run itself into the ground when it runs out of

opal plank
#

im aware

#

hence why the host i use has 128gb

quartz kindle
#

there are a lot of features that are simply impossible to make without caching

opal plank
quartz kindle
#

like checking permissions

opal plank
#

speaking of which i need to make a similar thing for twitch

#

its gonna bea pain

#

thinking about cloning discord's bit permission for that

cinder patio
#

That's the best way to store binary permissions

opal plank
#

thats what i assumed

late plank
#

no ability to disable this caching is a huge pitfall of the lib

opal plank
#

juswt get 256Gb of ram bruh

late plank
#

might go to rust

opal plank
#

pff

earnest phoenix
#

Caching everything consumes lesser time on doing something but takes memory

Not caching everything takes more time than usual because you have to fetch whatever you need which returns a promise and takes time to resolve, but takes low amount of memory

#

Efficiency is the matter here

quartz kindle
#

it is a huge pitfall indeed

late plank
#

@earnest phoenix I'm aware - my bot holds no state and that's optimal

opal plank
#

first discord, second twitch

#

its really not that bad tbh

cinder patio
#

256gb seems like overkill for a bot that uses 400mb

late plank
opal plank
#

thats cuz i disabled caching on my twitch bot

earnest phoenix
#

256gb seems like overkill for a bot that uses 400mb
@cinder patio The more the better

opal plank
#

caching legit 80% of every single user on twitch is quite a hefty and expensive task

earnest phoenix
#

Cached Users 0
=>
Ram Mb 379

valid frigate
#

this is a random question

cinder patio
#

256 gb is like 600 times more than what the bot uses...

opal plank
valid frigate
#

why do bot owners incorporate eval commands into their bots

late plank
#

because they're stupid

cobalt spruce
#

@opal plank what is that ?

opal plank
#

theres 5k channels stored along with some more stuff

#

@cobalt spruce my bot's dashboard

valid frigate
#

that's odd

solemn latch
#

eval can be used for getting basic and complex info.

earnest phoenix
#

Eval commands aren't even bad

#

It can be used for testing

cobalt spruce
#

@opal plank how u got it like that ?

valid frigate
#

i don't see any reason to put eval into a command real talk

#

it's up for debate though

late plank
#

it's a security issue if public

opal plank
#

@cobalt spruce i made it mmulu

valid frigate
#

id like to hear why people use it

earnest phoenix
cobalt spruce
#

@opal plank isnt a web ?

cinder patio
#

There's literally no reason not to have an eval command as long as it's protected

earnest phoenix
#

this is good?

late plank
#

there's better ways to test - though

earnest phoenix
#

it's a security issue if public
@late plank Why make it public in the first place

opal plank
#

wdym isnt a web?

late plank
#

@earnest phoenix because people are stupid

cobalt spruce
#

@opal plank is a web dashboard

opal plank
#

yes, its a dashboard

cobalt spruce
#

Uwu

valid frigate
#

when we look at languages like go/rust you can't native eval without jumping through a lot of unsafe hoops that break the fundamentals of the language

earnest phoenix
#

Flazepe isn't stupid, he has a public eval, try to break it, it's Impossible

valid frigate
#

also i noticed some people have shell execution their bots?

#

what is the reason for this

opal plank
#

unless you can escape the VM

late plank
#

@valid frigate just to play around with - maybe testing code, but in general that's very bad and just don't

earnest phoenix
#

Executive commands through the bot for the shell without going to the terminal

valid frigate
#

that just sounds incredibly dangerous

opal plank
#

you cant even pull stuff from the terminal

valid frigate
#

you can

solemn latch
#

what about images πŸ€”

opal plank
#

rule of the thumb: if you dont know what you are doing, dont do it

valid frigate
#

native c++ bindins

#

not eval/exec

earnest phoenix
#

For example i have a exec command and my vps can't execute any bash commands unless i restart my bot so that's a +1

#

hi bros

solemn latch
#

my bot pretty much exclusively works through images, I use eval to test these images.

earnest phoenix
#

Exec commands aren't dangerous unless you have sudo

valid frigate
#

oh god

late plank
#

it is - any time you're allowing arbitrary code execution or system calls from user input, it's opening yourself up to vulnerability. Certainly to be avoided at all costs

valid frigate
#

weirdchamp

#

like real talk

solemn latch
#

πŸ€”

opal plank
#

actually

earnest phoenix
opal plank
#

i wanna see how much ram i can devour

#

lemme re-enable user caching on twitch

#

brb in 30

solemn latch
#

Doesnt a lot of websites have public logins for staff?

valid frigate
#

yes

solemn latch
#

Way riskier than an eval no?

valid frigate
#

no

solemn latch
#

why not πŸ€”

late plank
#

Of course not

valid frigate
#

what do you mean by public login

solemn latch
#

as in, anyone can attempt a login

valid frigate
#

what

#

what

#

how are those even similar

late plank
#

Attempting a login != allowing anyone to execute anything

earnest phoenix
#

Brain.exe has stopped working

solemn latch
#

eval's are behind checks

valid frigate
#

dude

#

cmon man

solemn latch
#

πŸ€”

valid frigate
#

i feel mad troll energy

solemn latch
#

which one is riskier

#

πŸ€”

late plank
#

yours

solemn latch
#

why

valid frigate
#

typical username/password authentication is secure

solemn latch
#

how does a user fake their id to mine

earnest phoenix
#

Logins are different, how's logins risky in the first place

valid frigate
#

that's why it's used by every fucking site on the planet that requires login

solemn latch
#

guessing logins, you cant fake an id

valid frigate
solemn latch
#

can you?

valid frigate
late plank
#

because you're assuming discord ids are unique, and you're assuming discord is sending you their right id

earnest phoenix
#

IDs are unique

late plank
#

they're supposed to be

valid frigate
#

if you put an id check in yes, it becomes equally secure as a login

solemn latch
#

you would have to get my id, which couldnt happen

valid frigate
#

however

#

you can't compare the two

#

they are two different concepts

solemn latch
#

because ids have a timestamp

#

youd have to know that 3+ years ago id become someone who makes bots

earnest phoenix
#

IDs are constructed from a timestamp

compact oriole
#

yea

valid frigate
#

why are you comparing traditional logins to eval security

compact oriole
#

they are unique (because of the other part)

solemn latch
#

your saying its unsecure

valid frigate
#

dude

late plank
#

it's just as secure as discord's uid system - is that secure?

solemn latch
#

sure, it also ends up depending on a login

late plank
#

no, it does not

solemn latch
#

????

#

if someone guessed my password, they would have my id

valid frigate
solemn latch
#

and get into the eval

late plank
#

@solemn latch that's another avenue of vulnerability unreated to discord uids

solemn latch
#

oh please tell

earnest phoenix
#

Logins are completely different, it takes your info and authenticates you to the redirect URI or whatever, evals are nothing related to this

valid frigate
#

precisely

#

comparing them is like comparing oranges to apples

solemn latch
#

I was saying if you can login to my account you have the id

#

LOL

#

listen to what im saying, not what you think im saying

valid frigate
earnest phoenix
#

That can't happen

solemn latch
#

why not?

earnest phoenix
#

Users are different

valid frigate
#

we have strayed far from the main point my guys

earnest phoenix
#

They precisely can't have your id

solemn latch
#

if you login to my account you cant use an eval on my bot tied to my id?

#

intresting

late plank
#

@solemn latch you can

solemn latch
#

okay then whats being said here

valid frigate
#

if somebody logged in to your account i think thats the last thing you would worry about

solemn latch
#

agreed

#

but thats not what my point was

valid frigate
#

just trollin

earnest phoenix
#

You went from Website logins to discord logins

late plank
#

Honestly - discord bot verifier staff should decline anyone with eval

valid frigate
#

this is out of their control

earnest phoenix
#

Incorrect

valid frigate
#

they only verify by what you say

#

not by the content of your code

late plank
#

it's certainly in their control, they just may or may not do that

valid frigate
#

or claim idk they hold you to your words

solemn latch
#

I still want to hear how you can fake discord user ids :/

earnest phoenix
#

people are dumb, your fault if someone breaks out of a sandbox or steals data

valid frigate
late plank
#

^ +1

valid frigate
#

anyway yeah

#

i guess it comes down to choice

earnest phoenix
#

Discord staff actually wouldn't care what commands you have, it's your bot your responsibility

valid frigate
#

if you want to include eval/exec it's there for you to use

solemn latch
#

^ knew a guy who didnt have a password on their database

#

lol

late plank
#

if it means you can steal data - it's a privacy issue

restive furnace
#

people are dumb, your fault if someone breaks out of a sandbox or steals data
i know one bot, and i broke out from the sandbox and crashed the bot for testing purposes how safe it was. and the answer was: it's far away from safe.

valid frigate
#

people can tell you not to use it but in the end your choice trolllaughing

earnest phoenix
#

Try to break flazepe's eval command, that's the real talk

#

someone broke out of a sandbox on a mod's bot in DAPI and deleted all channels

#

fun

late plank
#

^ that's the kind of shit that can be avoided if people just don't fuck with this shit

earnest phoenix
#

or literally just lock eval to yourself

cobalt spruce
#

What

#

L

earnest phoenix
#

hey guys

#

Security of an eval command even if it's public depends on how it was made

late plank
#

@earnest phoenix parading one person's example of what he claims to be "impenetrable" is just dangerous

#

and irresponsible

#

to the large majority of the people reading this chat

earnest phoenix
#

Well why not do the same

#

Security of an eval command even if it's public depends on how it was made
@earnest phoenix flazepe literally has an unusable public eval called aeon code the real one is locked to him

#

I know

valid frigate
#

ive audited that and turns out it really is sandboxed

#

require/etc doesnt resolve

#

not sure if it times out if an eval takes too long

earnest phoenix
#

It's based on a API

#

His evaluation command responses are returned from an api he made

late plank
#

@earnest phoenix if he's executing the eval somewhere else - that's literally nothing to do with what we're talking about

earnest phoenix
#

That's why it takes long enough for the responses to be made

faint prism
#

Open evals are just playing with fire. You can lock them, but it's still remote code execution

earnest phoenix
#

@earnest phoenix if he's executing the eval somewhere else - that's literally nothing to do with what we're talking about
@late plank It's what we're talking about, eval is eval, it just depends on how you make it, not like every eval command of every bot is equal

faint prism
#

Find open eval, starts bitcoin miner
mmLol

earnest phoenix
#

So security here is just independent and impossible to say if it's actually risky in the first place or not

solemn latch
#

^ omg my point

#

finally :p

valid frigate
#

xss

late plank
#

@earnest phoenix rce = risk, period.

cinder patio
#

Another approach of securing public eval commands. without running the code in a sandbox is using a parser like acorn, check if the code contains keywords/variable names that are considered dangerous (require, import, eval, prototype, Function, constructor, etc...). I am not saying it's optimal but it is a way.

earnest phoenix
#

@earnest phoenix rce = risk, period.
@late plank tf is rce

late plank
#

there's no such thing as perfect security - I promise you

valid frigate
#

at this point sandboxed eval just becomes a calculator

late plank
#

I just hope no one here learns the hard way

solemn latch
#

which is okay, its about minimizing risk while still having useful things.

earnest phoenix
#

there's no such thing as perfect security - I promise you
@late plank That's what I'm trying to say, you can't make perfect security but as long as you make it look like it's impossible to breach it's security it's fine

solemn latch
#

for many bot devs eval is useful

faint prism
#

Just lock to owner

solemn latch
#

my main bot has eval(command isnt even there) disabled, my development bot has it enabled.

I found what works for me

earnest phoenix
#

Even an eval that's running on a vm is possible to break, just you need to find the way

#

Everything is breakable

solemn latch
#

If i had my eval like that it would be on a separate vps tbh, but thats not needed probably.

opal plank
#

Kill the vps server mmulu

#

then get charged for property damage

solemn latch
#

kek

cinder patio
#

I don't think anything harmful can be done if you disallow the usage of require, any way of executing code (eval, Function), the constructor and prototype properties, and also while loops. And maybe set a timeout, if the code doesn't execute in X milliseconds, stop the execution.

earnest phoenix
#

The point here is to either make eval completely locked to yourself and be careful on use or make an exact copy of your bot and name it test, test your things and if successful merge changes with the main

#

But there's no point in saying you shouldn't have an eval command because it's risky, it's your responsibility of using it because you're the bot owner, the person who made the bot and the eval and knows how it exactly works and functions

late plank
#

that's not even true

earnest phoenix
#

Or wrap around some security checks on it, and explain how it's not true

late plank
#

the person who made the bot and the eval and knows how it exactly works and functions

#

I'd guess that 95% of people here have no clue how eval actually works

solemn latch
#

feels bad man

late plank
#

Everything is breakable, including eval securities, including checking discord userids, including your discord user account.

The end point here is that, eval is risk. If that risk is worth it for you then sure, but it's not worth it for me and the security of my machine.

I just hope when someone joins here asking for help and you see an eval command, you recommend that they just don't.

#

Otherwise you are perpetuating unnecessary danger

earnest phoenix
#

Bruh, i mean how the command is made, the structure of it, if you have no checks whatsoever, don't do anything risky, nobody knows how exactly eval works because it can run anything that you don't even know

valid frigate
#

open source

#

well then again not everyones bot is open source

lethal sun
#

Quick question, what hosting provider would you recommend for hosting multiple Discord bots? I don't need anything big, but I need to be able to cancel easily, without any payments after.

late plank
#

ovh probably

solemn latch
#

galaxygate

valid frigate
#

cost wise galaxy gate or ovh

#

there's also witherhosting

solemn latch
#

oxide i hear is good

valid frigate
solemn latch
#

for the price

late plank
#

I paid like $2.99 USD for a 1core 2gb from ovh for a few years before I needed to upgrade

earnest phoenix
#

Everything is breakable, including eval securities, including checking discord userids, including your discord user account.

The end point here is that, eval is risk. If that risk is worth it for you then sure, but it's not worth it for me and the security of my machine.

I just hope when someone joins here asking for help and you see an eval command, you recommend that they just don't.
@late plank Eval is risk if used incorrectly, if you have no knowledge whatsoever and just copy others code then don't make one, only a person with no knowledge would evaluate something like this

client.guilds.cache.forEach(g => g.leave())``` but the thing is, "it's the owner's responsibility"
solemn latch
#

thats the best eval

late plank
#

@earnest phoenix you blame the owner, I'd blame you for recommending it to someone who doesn't know

lethal sun
#

@late plank @solemn latch @valid frigate Damn, I forgot about GalaxyGate and OVH, thank you for the help!

late plank
#

❀️

earnest phoenix
#

I'm not recommending it, how am i recommending it the first place, i said if you have no knowledge of it don't make one

valid frigate
#

the rare triple tag

solemn latch
#

shoot my eval command isnt even named eval, its just a string of random chars, checks if its me, and if its in a specific channel in a specific guild no one has access to.

#

even if someone could fake all three ID's they would have to guess the eval command name, and figure out what those id's are

earnest phoenix
#

Big Brain

solemn latch
#

AND its not even running on my main bot

sudden geyser
#

if wearing three jackets in summer had a virtual form it would look like your eval command

solemn latch
#

LOL

#

its way over done

valid frigate
#

using eval command in the first place

#

fattest troll ever

solemn latch
#

I wonder what the other solution is

late plank
#

not using it

#

:D

valid frigate
#

:^)

solemn latch
#

😦

#

it speeds up dev time

earnest phoenix
#

Oh how about i go make my entire bot on a online code editor and let it run shit that i can't see so i can't test anything because of "risk"

late plank
#

are you upset

earnest phoenix
#

Big claps

solemn latch
#

yes

#

im crying irl

#

big meanie

earnest phoenix
faint prism
#

I use eval in C# mmLol

solemn latch
#

no but really, is there another method that I can eval but not in command form that is more secure πŸ€”

late plank
#

Yeah, I was completely serious when I said just don't

solemn latch
#

im just a hobbiest, so i dont know the ins and outs of dev tools

late plank
#

what do you find yourself testing on it mostly?

solemn latch
#

quick testing of new functions

faint prism
#

!eval 1+1

solemn latch
#

rather than restarting the bot 30 times as a clumsily code, i use it to quickly test that code

earnest phoenix
#

There's literally no way to test things on other stuff than a eval command on your main bot, it's like here i go put stuff on my other commands that are not eval and restart bot to see what they do

#

Unless here you go remake the native eval function

late plank
#

You should use a separate token/bot for testing

#

that's a given

solemn latch
#

i do

late plank
#

cool

#

Yeah - you can just test those new functions in the code itself

earnest phoenix
#

That's literally what i said at the very beginning

solemn latch
#

but the startup time is quite long

quartz kindle
#

i use the same token lol

earnest phoenix
#

Even tim has a eval command

#

Can't argue with that

solemn latch
#

psh tim lives on the edge

#

used a json db too

quartz kindle
#

yup

#

lmao

late plank
#

@solemn latch what impacts your startup time the most

opal plank
#

bruh what

#

isnt for() dynamic?

late plank
#

is it a few seconds bad, or a few minutes bad

earnest phoenix
#

W o t? @opal plank

solemn latch
#

10-20 seconds

opal plank
#

let variable
for(let a of variable) variable ++
somehow variable is retaining its non changed value

#

wtf

solemn latch
#

but thats 10-20 seconds of testing time

opal plank
solemn latch
#

every few minutes

late plank
#

yeah, completely understandable, what's eating that time

#

?

solemn latch
#

loading assets

#

my bot renders images for games

earnest phoenix
#

The most time the start up can take is loading the dependencies you have installed

solemn latch
#

it saves significant time command wise loading them at startup

earnest phoenix
#

Uninstall most and see it go down

solemn latch
#

it would, but then the commands would take over a minute to run

earnest phoenix
#

Idk but i have 15 dependencies installed, takes only 7 seconds to start up

#

@solemn latch How many dependencies you have installed

solemn latch
#

its not dependancies

cinder patio
#

Edwin, what's variable? I don't think you can for...of loop numbers...

solemn latch
#

its assets πŸ€”

earnest phoenix
#

Assets?

solemn latch
#

images

#

maybe over 1000 unique images

earnest phoenix
#

I mean, it doesn't render them at the startup does it

solemn latch
#

no

earnest phoenix
#

make the numbers unsigned so they can't go into negatives mmLol

solemn latch
#

its just easier to do it this way

#

i want it negative

earnest phoenix
#

oh?

#

well

#

makes sense

solemn latch
#

its to indicate how much you hit

earnest phoenix
#

What do you use to render those

solemn latch
#

gifencoder2

#

i was so proud :p

earnest phoenix
#

I didn't know gifencoder2 existed, i thought there was only one

solemn latch
#

the first one is super slow

earnest phoenix
#

How much time it took to render them anyway

solemn latch
#

rendering time on one was over 30 seconds

#

its 3-4 seconds on a ryzen something

#

3900x

#

single thread obvs

opal plank
#

There we go , im caching users again

solemn latch
#

how bad is it

opal plank
#

lets see how much ram this bad boy consumes

earnest phoenix
#

on djs?

opal plank
#

me?

earnest phoenix
#

yeah

opal plank
#

nah, my own cache

earnest phoenix
#

oh

#

nice

#

node in general has a large memory footprint with objects

#

it's insane

#

but yet again it makes sense

#

objects are just fancy dictionaries in js

opal plank
#

it still starting up

#

should take a few minutes till it joins all the streams it had

#

2 minutes and 8k oof

#

23k in 4 minutes

#

cant wait to see how much ram its gonna use up in 3 or 4 hours

solemn latch
#

nice everyone tag

#

kek

faint prism
#

at least they didn't atmods

solemn latch
#

because im internet famous

faint prism
solemn latch
#

nah, it was "dm for help" but people kept dming me for random things

#

didnt know what to put it as

earnest phoenix
#

Hey GWeulixWave, I actually make a random duck picture command and it doesn't work. Can you help me ?

const get = require('node-fetch')
const Discord = require('discord.js');
module.exports.run = async (bot, message, args, client) => {
const {body} = await get("https://random-d.uk/api/v2/random")
await message.channel.send({
  embed: {
    title: ":duck: Honk",
    url: 'https://twitter.com/duckoftheday',
    color: 6192321,
    image: {
      url: body[0].url,
    },
    footer: {
      icon_url: message.author.avatarURL,
      text: 'Request by ' + message.author.tag
    }
  }
});
}
sudden geyser
#

@earnest phoenix where did you define get?

faint prism
#

at the top

earnest phoenix
knotty steeple
#

the 1st line

sudden geyser
#

oh I'm blind, I thought that said fetch

knotty steeple
#

l0l

earnest phoenix
#

@earnest phoenix where did you define get?
@sudden geyser on the first line

sudden geyser
#

Calling and awaiting get would return a response, not the actual contents of the response body

earnest phoenix
#

What must I do to my code works ?

sudden geyser
#

See this example: js fetch('https://github.com/') .then(res => res.text()) .then(body => console.log(body));

earnest phoenix
#

Why a github link ?

sonic lodge
#

an example

solemn latch
#

;p

earnest phoenix
#

@earnest phoenix what does this mean
@earnest phoenix Cocaine 5x less addictive than sugar and 30x less lethal. I think the question it is quickly answered

#

Oh okay

sudden geyser
#

It's an example. In your case, you'd want to convert the response to JSOn, which could look like this: await get("https://random-d.uk/api/v2/random").then((res) => res.json())

This would get the body of the HTTP response as JSON

faint prism
#

oh look, free nitro

opal plank
#

oh shit that actually is a page

sudden geyser
#

any endpoint you visit on example.com returns that same page

opal plank
#

ik but im amazed it actually exists

sudden geyser
#

ah

opal plank
#

what are the odd os me randomly guessing a nitro keygen on example.com with completely random odds?

solemn latch
opal plank
earnest phoenix
faint prism
hoary dawn
opal plank
#

100k per 15 minutes it seems

solemn latch
#

pleb numbers

faint prism
#

Meanwhile Erwin takes over the internet Twitch

opal plank
#

i'd say a mil in an hour or two

#

dont worry guys, just webscaling

#

you can see the twitch ratelimiting my ass up in that top right graph

#

still waiting for the library dev to patch their internal ratelimiter

faint prism
#

PR it yourself mmLol

opal plank
#

i could tbh

autumn aspen
#
 if(!member.bannable) return message.channel.send(" ")

Guys what can I write instead of bannable bc I want it to be warn, like u cant warn this member

#

or is this command gonna crash

#

It dont feels right

opal plank
#

wdym what i can write instead of bannable?

#

its an object, either shit exists there or it doesnt

autumn aspen
#

wdym what i can write instead of bannable?
@opal plank I want it to be "U cant warn a higher member"

#

Like a warn

opal plank
#

then type that in

autumn aspen
#

warnable

#

then type that in
@opal plank can I type in warnable??

#

u sure?!

earnest phoenix
#

you can't make up your own properties

#

lol

#

a warn doesn't exist

faint prism
#

If the property exists in the docs, sure why not lol
||hint: it doesn't||

opal plank
#

no

#

you cant make shit up

autumn aspen
#

a warn doesn't exist
@earnest phoenix but I dont want it to be bannable

solemn latch
#

imagine if you could πŸ€”

autumn aspen
#

What can I instead type in?

earnest phoenix
#

well i don't want it to be raining today but what can you do

opal plank
faint prism
#

then do some coding to define what you mean by "warnable"

opal plank
#

thats what member has

#

you either add it

#

or use whats there

#

period

earnest phoenix
#

warnings do not exist in discord, you need to make your own system to check if a member is warnable

opal plank
#

code doesnt code itself