#development

1 messages · Page 1578 of 1

opal plank
#

now heres the better question, why the heck you trying to get peoples adresses?

grizzled raven
#

imagine that mmLol

#

alt detector seems to be down for quite a while

crystal wigeon
#

well people can create multiple accounts to use my bot

#

so its called "alt-ing"

#

i dont really need the ip or anything just asking :p

opal plank
#

you wouldnt be able to fetch ip adresses regardless

#

you'd have to make a website for it, and even then, it'd fall under the same issue of discord, vpn's

#

you'd need to hardware + ip detect someone

crystal wigeon
#

aight

#

thanks

grizzled raven
crystal wigeon
#

gotcha

#

any idea why alt detector is ded?

#

its been like months i think

#

3 weeks atleast

opal plank
#

beats me

#

¯_(ツ)_/¯

grizzled raven
#

everyone taking their bots down now i see

opal plank
#

good, less competition

#

hehehe

grizzled raven
#

me taking my bot down for a while just created competition

#

well i guess it is less competition for the other side

opal plank
#

fair

#

but overall less bots

quartz kindle
#

bots to be hydras

#

take one down, 3 copies appear

modest maple
#

or in pokecords case

#

take one down 1000 appear

opal plank
quartz kindle
#

pokecord do be hydra king

grizzled raven
#

my bot broke as hell i have no idea why people still love it lmao

modest maple
#

idk

#

I've just dumped like 3k lines of code because i made the mistake of giving people a choice mmLol

earnest phoenix
#

I made a bot who can verify on certain (you can choose which domains) emails to get a badge. So you have a secure discord server. But I don't want to pay a host server to put it online, cause I'm a student. Is there another safe way?

modest maple
#

pay mmLol

earnest phoenix
#

which host server you recommend ?

modest maple
#

a cheap vps is a couple dollars a month

#

ohv, contabo, aws all cheap

earnest phoenix
#

thanks for the info, I made a .env file in the code with private variables like passwords/bot token

#

private keys

#

Can the server owner see those info?

modest maple
#

i mean the owners of the server can potentially

#

but that would be a massive violation of data protection

earnest phoenix
#

Hmm true

#

thanks for your time

opal plank
#

@quartz kindle need bitsy help

#

how does d.js send timestamps on embeds?

#

from Date or string?

#

i know theres a key timestamp, but the moment i sent a string in it with unix timestamp, it just gurgles

#

OOOH

#

im stupid

#

one sec

#

i might've figured out

#

its ISO string

pale vessel
#

you need to Number() it

quartz kindle
#

yup, looks like its an ISO string

#

which is really weird

#

timestamp: this.timestamp ? new Date(this.timestamp) : null

cinder patio
#

I need help with my math homework

quartz kindle
#

why on earth use ISO string instead of number value i have no idea

pale vessel
#

because ISO smoothbraingang

solemn leaf
#

flaze new pfp confirmed

opal plank
#

@quartz kindle got another question

#

buffers

#

embed , e is a canvas buffer

#

in d.js this works

#

wait, wrong first image

#

heres the other one

pale vessel
#

value key?

opal plank
#

the heck is d.js doing in the back with buffers before sending requests?

opal plank
pale vessel
#

what's that

opal plank
#

detritus

quartz kindle
#

detritus uses value key?

#

really?

opal plank
#

yeah

quartz kindle
#

weird

#

anyway

#

discord accepts files in multipart-formdata

#

so djs streams buffers into it

#

with the form-data package

#

the form-data package accepts buffers as well

opal plank
#

it already extends formData

quartz kindle
#

ah yes

#

so key would be the item key, and value the actual data

#

like in the form-data function

opal plank
#

so sending a buffer should've worked, no?

quartz kindle
#

yes

solemn leaf
#

you can use urls too

opal plank
#

hmmmm imma report this rq to the devs then

#

i need attachments

#

not urls

quartz kindle
#

let me check detritus docs

opal plank
#

data is being generated on my end

opal plank
#

there arent any

solemn leaf
#

lmfao fr?

quartz kindle
#

the auto generated ones

#

lmao

opal plank
#

thats why nobody uses detritus, theres no docs lmao

solemn leaf
#

holdup let me ping the users that do

opal plank
#

good luck finding shit out if you arent used to digging through thousands of line of code

solemn leaf
#

okay pinged them

quartz kindle
#

nice

solemn leaf
#

thanks I try my hardest to be funny

opal plank
solemn leaf
#

refresh

opal plank
#

happened to me some times too

solemn leaf
#

pls tell me it has css

opal plank
#

and some other times it literally ip blocked me

solemn leaf
#

thats just a feature @opal plank

opal plank
#

though half of it was my fault for having ssh tunnels open

solemn leaf
#

does it have css?

quartz kindle
#

it does

#

but its being downloaded with MIME type text/html

pale vessel
#

works fine for me

#

why does it do that sometimes

solemn leaf
#

flaze

opal plank
#

i doubt its the type

pale vessel
#

isn't it any

solemn leaf
#

flaze hru

opal plank
#

in the types only

pale vessel
#

ic

pale vessel
solemn leaf
#

my mouse broke

#

I cant play osu anymore

opal plank
raven elbow
#

What happen to yuri the bot?

pale vessel
#

Go to their support server

opal plank
#

even looking at the source its creating new FormData()

sturdy dock
#

what's generally considered the best way to ensure the discord bot process restarts if it crashes? using internal sharding

#

i am using a .sh script but it isn't working too well

opal plank
#

pm2 would do the trick for you

sturdy dock
#

will look into it, thanks

solemn leaf
#

@raven elbow eri?

#

it shut down

#

the owner was banned

#

its moved to a bot called moi

quartz kindle
#

somewhere in here the value is being screwed up

opal plank
#

thats exactly where im looking at

quartz kindle
#

try giving it a stream instead of a buffer

#

streams work better anyway

#

what credit?

solemn leaf
#

what

raven elbow
#

So yuri does not work then

opal plank
#

@quartz kindle got a feeling im doing some really retarded shit

opal plank
#

frick

#

thought as much

solemn leaf
#

do you need buffer?

#

bufferFrom

#

fetch

#

so many things you can do rn

opal plank
#

nope

#

Aki

#

we been through this, check chat

#

its a completely different library than d.js

solemn leaf
#

yeah what does it need

#

buffer url stream?

opal plank
#

any

solemn leaf
#

any>.?

opal plank
#

however with streams it doesnt even send the message

#

with <Canvas>.toBuffer() i dont get an API error

#

thought with both a pipe and a PNGStream it returns a 404 error

#

so im assuming discord aint liking one bit whatever its sending

solemn leaf
#

just use d.js

pale vessel
#

if you like being fucked by the caching system sure

opal plank
solemn leaf
#

lite

opal plank
#

Discord.js™️ btw

lyric mountain
#

3k gb

solemn leaf
#

djs lite

opal plank
#

fuck js

solemn leaf
#

uh

pale vessel
#

lewd

solemn leaf
#

you're using js

opal plank
#

im not

solemn leaf
#

flaze lewd

opal plank
#

im using ts

pale vessel
#

good one

solemn leaf
#

ts and js

#

are like

pale vessel
#

that's the joke

#

i think

lyric mountain
#

no, only ts is like

#

js is hate

opal plank
#

they are different

solemn leaf
#

in what?

#

tell me

quartz kindle
#

you got an error with the buffer and empty message from the stream?

#

what error?

opal plank
#

in types, in everything, they get compiled to js after in the end

solemn leaf
#

compiled to js

opal plank
#

400*

opal plank
#

ts and js are not the same thing aki

solemn leaf
#

tmr

#

ejs

opal plank
#

anyway, if you're not gonna contribute to the topic, kindly do something else

#

trying to figure this issue

opal plank
#

all 3 of them seem valid

solemn leaf
#

you want a 200

opal plank
#

aki

#

ffs

#

shut up

solemn leaf
#

😦

lyric mountain
#

in jda we just send the byte array, can't u do the same in that lib?

#

like, instead of the stream

opal plank
#

the buffer should be working tbh, which is the toBuffer() format, it should be sending it

#

toBuffer() returns Uint8Array<>

lyric mountain
#

so you're getting no error but the file doesn't appear, right?

cinder patio
#

Uh

#

isn't it

 {
   name: "...", 
   attachment: your buffer
 }
]```
#

@opal plank

opal plank
#

@cinder patio not d.js

cinder patio
#

ah

opal plank
#

@quartz kindle the author told me the issue

#

key: is used for formData, not for the embed

#

i still need a filename key in there

lyric mountain
#

lul

cinder patio
#

what are you using then?

opal plank
#

detritus

quartz kindle
#

so how's the final object look like?

opal plank
#
files: [
        {
          value: e.toBuffer(),
          filename: `chibis.png`,
        },
      ],```
@quartz kindle
quartz kindle
#

so filename and value?

#

weird

opal plank
#

indeed, cake said formdata doesnt care about key

#

only value

quartz kindle
#

then why does it show key and value in the typings?

#

and no mention of filename?

opal plank
#

which makes sense when you notice it wasnt sending the filename

#

it WAS sending the data just fine

#

but there was nothing on the final payload to the api pointing to the filename it should be using

#

the formData() doesnt use the key at all

#

just the data to be appended

#

well, it does use it, just doesnt matter

#

in the end you just sending FormData with the data and a null key, but what discord uses is the data sent + the filename, thats all

quartz kindle
opal plank
#

hmmm

#

it is already somewhere, cuz my id picks up

quartz kindle
#

ah nvm

#

its in formdata

crimson vapor
#

hello Tim and Erwin

opal plank
quartz kindle
#

hello stinky

opal plank
#

hello

crimson vapor
#

Erwin I fixed the long list of embed shits, I changed it to a function

earnest phoenix
#

Is there a way I can make a manual disable command to disable commands lol?

opal plank
#

still shit but thats cleaner, so i'll let it slide

crimson vapor
#

what should I do next?

opal plank
#

dont remember, i sent everything, gotta check chat

crimson vapor
#

iirc the embed builders were too much for you

cinder patio
#

I still need help with my math homework 😢

crimson vapor
#

whats your issue?

#

or what subject in math?

#

@cinder patio

lyric mountain
#

"vote for us and get free primogems"

cinder patio
#

solid stereometry

lyric mountain
#

that could be badly interpreted

crimson vapor
#

fuck idk that

earnest phoenix
#

i would recommend recommend dropping out instead

#

thanks gboard

#

electronics is even worse

#

i spent 4 hours on a circuit, 1 of which was because my instruments were set on DC instead of AC :)

quartz kindle
#

rip

outer perch
#

how do I download my db from Could Firestore?

modest maple
#

isnt the whole point of firestore is that you dont mmLol

outer perch
#

o_o

#

I know there are some node modules for that

#

don't know which one I should pick

willow mirage
#

those Google auth is bullshit, you have to install so many packages

quartz kindle
#

back in brazil i had a small backup battery, typical UPS solution because 3rd world country electricity grid.
this battery was built with a 220->110v transformer, so i could only use 110v stuff on it.
Most desktop computers had PSU's with manual voltage switch, so once i was reparing a desktop, and i switched the voltage to 110v to plug it into the battery thing

#

i fixed it and gave it back to the client, but forgot to switch it back to 220v

#

you can image what happened

earnest phoenix
#

😬

crimson vapor
#

you lived in brazil? or on vacation or something?

quartz kindle
#

gibe mi môney pleasi or i report iu

#

huehueheuheuheue

crimson vapor
#

what

#

im so confused

modest maple
#

tim is ultimate brazil man

quartz kindle
#

xD

#

i lived in brazil for 15 years

crimson vapor
#

and you are 29?

quartz kindle
#

yes

crimson vapor
#

do you still live there?

quartz kindle
#

nop

#

for now

midnight blaze
#

he lives now in 127.0.0.1

crimson vapor
#

so what you moved there at 14 then moved back 15 years later?

quartz kindle
#

at 12

#

but yes

crimson vapor
#

ah

#

where are you originally from?

quartz kindle
#

depends which time period

#

lmao

crimson vapor
#

29 years ago

quartz kindle
#

i was born in germany

#

but im not a german citizen and never actually lived there

crimson vapor
#

lol

midnight blaze
#

you need to write a biography

quartz kindle
#

besides like a year when i was a baby

crimson vapor
#

I assumed you were like Swedish or something

quartz kindle
#

i wish

#

lmao

crimson vapor
#

lmao

#

what language is your name in?

midnight blaze
#

You can not speak German

crimson vapor
#

or where is it common

midnight blaze
#

right_

quartz kindle
#

slovenian

#

i dont speak german but i understand a little bit

midnight blaze
#

sehr gut

glossy spoke
lyric mountain
#

"because 3rd world country electricity grid"
couldn't describe brazil better

midnight blaze
#

@glossy spoke it was just one expression

sterile lantern
#
* Installation completed.
* Make sure you create the node within the panel and then copy
* the config to this node. You may then start the daemon using 
* systemctl start wings
* 
* Note: It is recommended to enable swap (for Docker, read more about it in official documentation).
* Note: This script does not configure your firewall. Ports 8080 and 2022 needs to be open.
######################################################################```

im tryna deploy pterodactyl but this happens
#

using cloudfare btw

#

ah wait nvm found the isue

#

actually it still doesnt work

#

:/

#
* Pterodactyl Panel successfully installed @ webnamehere
* 
* Installation is using nginx on ubuntu
* Thank you for using this script.
* Note: If you haven't configured the firewall: 80/443 (HTTP/HTTPS) is required to be open!
##############################################################```
drifting wedge
#

tim = brazil man

#

when someone submits a file with the submit file thing in html, how do i get the file

#

like it would be for images

mellow kelp
#

i think you have to parse form-data

earnest phoenix
#

there should be enough examples on the page

drifting wedge
#

mhm

#

how do i get the file tho

#

like do i get it using base64?

#

i need to download it

#

so how would i do that?

mellow kelp
#

well in express there's this middleware called multer

#

that lets you access req.file

drifting wedge
#

is just acceping imgur a good choice?

#

like it only accepts imgur links?

earnest phoenix
drifting wedge
#

i did

earnest phoenix
#

there's very cleary an example on how to use the image (or any file) through js lol

drifting wedge
#

i need to get it to flask and download it

#

i did read it

earnest phoenix
#

you still need to access it through js in order to send it to your api endpoint i think

#

unless you're using SSR

drifting wedge
#

but how can i only accept png files with the api tho?

#

like what would i even send the api too?

#

like the image in base64?

earnest phoenix
#

no

#

...you would send the data

#

lol

#

as a buffer

#

or something

drifting wedge
#

im confuzzled

quartz kindle
#

Read the examples

#

You can modify the input to only accept spefici file types, for example .png only

#

Then the user will only be able to select pngs

#

Only pngs will show in the box

earnest phoenix
#

the api endpoint should still be protected and allow only pngs though

quartz kindle
#

Then lopk at the form example

earnest phoenix
#

in case someone manually hits the endpoint

quartz kindle
#

The form has multipart-formdata as a type

#

So when submited, the files are sent as multipart formdata

#

Now in flask you have to look into how to read multipart formdata

#

Look at the flask docs

#

The application accesses the file from the files dictionary on the request object.

drifting wedge
#

and people can send anything thru it

pale vessel
#

imagine sync

modest maple
#

Flask is surprisingly easy to scale

quartz kindle
#

Better sync than async when it comes to webservers

#

Unless you wanna be like php and trash your cpu by creating a new thread for every connection

lyric mountain
#

wait php does WHAT?

quartz kindle
#

But well... Nginx also does that so...

#

I cant really say anything

#

I think nginx uses a worker pool tho

modest maple
#

most webservers are async tbh

#

it lends itself incredibly well to it

#

when done right

#

though im referring to the more reasonable task scheduling system rather than a new thread on every request

quartz kindle
#

Ye there are many ways of setting it up

#

There are multille different PHP engines as well

modest maple
#

ye

#

What im using for my WS gateways is Rust with Tokio so i get 12 thread loadbalancing + task scheduling

quartz kindle
#

I thin CGI was the one that created a new thread for every connection

modest maple
#

so i can load balance perfectly across the whole machine

#

which is hott

quartz kindle
#

Nice

modest maple
#

WS load balancing is such a pain tbh

quartz kindle
#

You have to disconnect and reconnect clients right?

#

Like discord does

opal dune
#

what would be good way to set up http listener for top.gg webhook (for detecting when people vote my server)

#

and a dedicated machine running the bot

quartz kindle
#

Flask or sanic i guess

modest maple
#

aiohttp has a inbuilt server

#

easiest to use that

quartz kindle
#

xD

opal dune
modest maple
#

which is why i go with Rust and tokio because atleast you only need todo that per machine rather than per process worker

modest maple
#

also top.gg does have its own lib for it btw

#

which does all this for you

quartz kindle
#

I havent gone into rust yet so im staying with nginx+node for now

opal dune
#

i was wondering which one is easiest. aiohttp seems reasonable

#

i will have to give the dedicated machines IP for the webhook URL right?

modest maple
#

I mean dblpy does it all for you just enter your top.gg stuff

opal dune
#

as i dont have nameserver

modest maple
#

yes you gotta give the ip and port

modest maple
#

most of the shit ive been deploying recently has been in C#

#

asp also the docker files are a lil tedious compared to other langs

#

pretty nice eco system

opal dune
modest maple
#

no

#

binds to localhost by default

opal dune
#

i looked at that and it seemed pretty confusing

#

thats why i started looking into the aiohttp 😄

#

i have experience hosting web servers from ground already

#

(with python)

modest maple
#

I mean its less confusing that what youre gonna be doing with aiohttp mmLol

opal dune
modest maple
#

shrug your choice ig

opal dune
#

the top.gg library might ultimately be simpler

distant cobalt
#
const Discord = require('discord.js');

module.exports = {
    name:"help",
    description:"Sends available commands you can use.",
    aliases:"cmds",
    usage:"-help",
    execute(message, args){
        const embed = new Discord.MessageEmbed()
            .setTitle('MagicCord\'s Commands/Modules')
            .setDescription('\nUse `-help <command>` for more info on a command.\n< > Means required.\n[ ] Means optional.\n\n**Magic**\nFor magic skills.\n`magic``learn``level``spells`\n\n**Battling**\nFor battling commands.\n`fight``moves`\n\n**Configuration**\nFor configuration settings.\n`channel`\n\n**Market**\nFor buying spells and items.\n`market``buy``sell``equip``unequip`\n\n**Bot**\nFor bot info.\n`invite``ping``profile``stats`')
            .setColor('#0190B0')
            .setFooter('MagicCord')
        message.channel.send(embed)
    }
}``` so i worked on a new bot but this sends nothing. no error, no message. why
solemn leaf
#

well

#

Assuming you're command handler is

#

client, message, args

#

message is client

#

cleint.channel.send() isnt a thing

distant cobalt
icy skiff
#

Is there any known API that has (anime) NSWF content without minor content so my bot doesnt get declined cause of that

solemn leaf
#

none of them can be minors

icy skiff
#

ik

#

thats why im asking

solemn leaf
#

they may look young but they aren't minors

lyric mountain
#

MAYBE you might have luck with danbooru

#

MAYBE

#

no filters are perfect

modest maple
#

I would say my api but i cant be 100% mmLol

icy skiff
#

ill give that one a check

#

u mind telling me what ur API is?

icy skiff
crimson vapor
#

shiro has no lolis

pale vessel
lyric mountain
#

wait

pale vessel
lyric mountain
#

is shiro yours?

pale vessel
#

not your bot lmao

lyric mountain
#

ah, xig

crimson vapor
#

would he?

#

by who?

modest maple
#

Moderating 60,000 Images is hard 😔

pale vessel
#

i can do that

crimson vapor
#

just check them before you get them lol

modest maple
#

i do

pale vessel
#

are they not

modest maple
#

its like

icy skiff
#

ok so that shiro one is safe

#

?

crimson vapor
#

nah xig checks them iirc

pale vessel
crimson vapor
#

@swift umbra knows more than I

pale vessel
modest maple
#

I scraped all mine

icy skiff
#

ty very much

pale vessel
#

yeah

modest maple
#

but taken off a set of sites IK are very strict about content

crimson vapor
#

Ping!

modest maple
#

so ive only had to filter maybe a couple hundred out of the 60k

#

which in itself took a while todo but what ever

crimson vapor
#

@swift umbra does xig check every image before putting it in shiro?

#

poggers

modest maple
#

just use cloudflare to filter it fingergunz

icy skiff
pale vessel
#

hell yeah

icy skiff
#

true warrior

pale vessel
#

LOL your name is hell yea

#

wtf

#

how

modest maple
#

just stared at my screen watching images fly by

icy skiff
#

what do u mean how

pale vessel
modest maple
#

I doubt it

#

though i cant get anymore now

pale vessel
modest maple
#

cuz they implemented so much anti scraping shit after i went through it

solemn leaf
#

fbi looks at harddrive

pale vessel
#

where do you scrape? reddit?

#

or mixed sources

modest maple
#

diffrent site

#

cant remember the name

crimson vapor
#

scrape("*")

pale vessel
#

must have been ages ago then

modest maple
#

but basically took the top 10 upvoted image packs from the category

#

went through

pale vessel
#

those sound high quality

modest maple
#

previewed the images on the site

#

then scraped all the packs

#

now they have a 10 hours limit between pack downloads though blobpain

pale vessel
#

do you use like a webdriver or just requests?

modest maple
#

i had to use webdriver

opal dune
modest maple
#

because of captchas

solemn leaf
#

just use cookies

pale vessel
#

yikes

modest maple
#

also let me watch what was being scraped

#

cant incrementally scrape this shit boi

pale vessel
#

are those file names auto-generated

modest maple
#

first part is a section of their base64 the second half is randomly seeded

pale vessel
#

oh

#

interesting

distant cobalt
#
const embed = new Discord.MessageEmbed()
            .setTitle('MagicCord Ping')
            .setDescription(`**Websocket Heartbeat**\n${message.client.ws.ping}ms\n\n**Roundtrip Latency**\nCalculating...`)
            .setColor('RED')
            .setFooter('MagicCord')
        const x = await message.channel.send(embed)

        setInterval(() => {
            const embed = new Discord.MessageEmbed()
                .setTitle('MagicCord Ping')
                .setDescription(`**Websocket Heartbeat**\n${message.client.ws.ping}ms\n\n**Roundtrip Latency**\n${sent.createdTimestamp - message.createdTimestamp}ms`)
                .setColor('RED')
                .setFooter('MagicCord')
            x.edit(embed)
        }, 1000);``` it says `sent` is not defined
pale vessel
#

because you defined it as x

distant cobalt
#

ohh

#

oki

feral wyvern
#

hey y'all,

i've been editing my bot's webpage a little and saw other bots have a ''server count'' in the overview section, but i can't seem to figure out how to properly make one, like making a custom background was easy and all with a tutorial, but as for this, i couldn't find much of it.
Anyone willing to help on how to incorporate this?

distant cobalt
#
else if(db.get(`${message.guild.id}.channel`) === message.channel.id){``` when i seem to do this commands didn't work anymore. i have it set here
```js
db.set(`${message.guild.id}.channel`, channel.id)```
rustic nova
feral wyvern
#

thank you!

proven lantern
distant cobalt
#
else if(db.get(`${message.guild.id}.channel`) === message.channel.id){``` when i seem to do this commands didn't work anymore. i have it set here
```js
db.set(`${message.guild.id}.channel`, channel.id)```
eternal osprey
#

hey

#

how would i create a c# function that would create a random string of 8 characters.

pale vessel
#

@ cry jk

proven lantern
distant cobalt
eternal osprey
pale vessel
#

what part are you stuck on

distant cobalt
#

huh

pale vessel
eternal osprey
#

nvm i got it working.

pale vessel
#

good

proven lantern
#

System.Guid.NewGuid().ToString().Substring(0, 8)

pale vessel
#

because it was in the image

proven lantern
#

dont use linq

pale vessel
#

i have no idea

eternal osprey
quartz kindle
eternal osprey
#

could anyone tell me why my visual studio has light mode on

quartz kindle
#

idk, what did you do to it?

#

it clearly wants revenge

eternal osprey
#

probably wants to make me blind or something

eternal osprey
proven lantern
#

i think the dark mode is a feature hidden behind a paywall

urban surge
#

In the picture above, the texts are not scrolling down. but how do I keep it from slipping in the picture below?

solemn leaf
#

thats bcs the text doesnt fit

urban surge
solemn leaf
#

dont ping

unkempt ocean
eternal osprey
#

hey

quartz kindle
#

you can to some extent

eternal osprey
#

so i have a program.cs program in visual studio

earnest phoenix
#

you're at the mercy of discord's css

eternal osprey
#

how do i actually export it as an exe?

proven lantern
#

maybe the different width of the footer image is causing the text to wrap

earnest phoenix
#

i told you this 10 times already

eternal osprey
#

i still don't get this

quartz kindle
#

you can add invisible characters to force field titles to be longer, so the content also gets wider

earnest phoenix
#

it literally doesn't get simpler than running dotnet publish in your project directory

#

i sent you the docs for dotnet publish too

#

which you didn't read

eternal osprey
earnest phoenix
#

it doesn't excuse the fact that i gave you docs two days ago

#

which are very detailed

#

and you didn't read them

eternal osprey
#

what docs

#

i didn't even see them

earnest phoenix
eternal osprey
#

having a look

earnest phoenix
urban surge
#

When I put a large picture, the area becomes smaller. How can I solve this problem?

summer torrent
#

what Thonk

urban surge
modest maple
#

anyone wanna write a streaming server with in in rust christmasthink

modest maple
#

Need to write some HLS and RTMP server

quaint wasp
#

Uh

#

so my bot is in my 156 member server... and it sends this:

#

I also have a qustion, why does it say undefined?

#

my code:

#

module.exports = {
  name: 'bot-info',
  execute: async(client, message, binfo) => {


    const Discord = require('discord.js')
    const info = new Discord.MessageEmbed()
      .setColor('#FF0000')
      .setTitle('Smugy Fugy Bot Stats')
     .addField("Prefix:  ++")
     .addField("Users with", client.users.cache.size, true)
     .addField("Servers in", client.guilds.cache.size, true)
     .addField("Channels I see", client.channels.cache.size, true)
      .setFooter("", client.user.displayAvatarURL())
      .setTimestamp();

    message.channel.send(info);

  }
}
#

wwaaiitt...

#

nvm

#

To make that field betwwen the words, how do I do that? Do I just place onather .addField(" ") and put nothing in there?

summer torrent
#

empty field?

pale vessel
#

add an inline field with both \u200b as value ig

quaint wasp
#

yess...?

#

alr.

pale vessel
#

you can't put just space or it'll error

summer torrent
#

use \u200b

quaint wasp
quartz kindle
#

@delicate zephyr @opal plank you guys still have the object cloning benchmark thingy? i have a new version of it xd

opal plank
#

i sent my last one in chat

quartz kindle
#

ye i mean

#

if you wanna test my new version

#

and see what times you get

opal plank
#

sure, lets break d.js embed builders

quaint wasp
#

..

summer torrent
#

LOL

quartz kindle
#

@opal plank ```js
function copy4(src, target = {}) {
const entries = Object.keys(src);
for(let i = 0; i < entries.length; i++) {
const key = entries[i];
const value = src[key];
if(typeof value === "object") {
target[key] = {}
handle(value, target[key]);
} else {
target[key] = value;
}
}
return target;
}

#

my timings went from 250ms to 130ms

quaint wasp
#

wow

quartz kindle
#

compared to 1300ms with JSON

quaint wasp
#

looks hard..

opal plank
#

i mean in fairness its still losing by quite the marging

outer perch
#

What type am I getting in server1 and server2?

let server1 = message.guild,
  server2 = bot.guilds.cache.get('123456789987654321');
opal plank
#

sending the payload directly is roughly around 15ms

quartz kindle
#

ye but like

#

measuring object cloning

#

for like

#

storing a prebuilt embed object and cloning it

#

instead of creating a new object

opal plank
#

lets try it lut and see

quartz kindle
#

for sure its gonna be slower, but it for deep cloning

opal plank
#

im gonna bonk you tim

opal plank
#

the heck is handle

#

and what is the src type?

quartz kindle
#

ops

#

wait

opal plank
#

MessageObject?

#

actually, gonna set as Object primitive

#

did discord go down sometime today?

#

like, 2h 30m ago?

#

🤔

#

interesting

quaint wasp
#

does something like this would work:

eternal osprey
#

i tried running a c# program

quaint wasp
#
   { name:'User Count', value: client.users.cache.size, inline:true},```
eternal osprey
#

it gave me this error: System.IO.FileNotFoundException: 'Could not load file or assembly 'Discord.Net.Rest, Version=2.0.0.0,

opal plank
quaint wasp
#

?

#

oh

#

ok...

#

alr.

#

I will.

earnest phoenix
earnest phoenix
#

i do the latter because not everyone has .net on their system

eternal osprey
#

how would i publish as self contained?

earnest phoenix
#

Dose anyone know discord.py cause I’m a bit confused

#

✨ docs ✨ @eternal osprey

novel hollow
#

How can i hozt my bot on a fireHD tablet?

#

Host*

eternal osprey
earnest phoenix
#

i sent it above

#

i won't resend it everytime because you're too lazy to scroll lol

solemn leaf
#

@novel hollow root it

novel hollow
#

Wym

earnest phoenix
#

Can anyone help I’m trying to make my bot so you can have some features on in one server and off in another how do I do this ? Also I’m using python

novel hollow
earnest phoenix
#

Thanks

vale raptor
#

how does everybody here reliably intercept vote webhook requests? I'm using a free service called localtunnel to spare me from directly exposing my web server to the world, but it's not perfect. what's the best way to always be listening for webhooks? using nodejs.

#

consider this a survey, I know there's not one right answer

earnest phoenix
#

reverse proxying using nginx i guess

#

that's how i protected my web apps a few years ago

novel hollow
#

Wrong link

eternal osprey
#

I don't really get this part tbh

earnest phoenix
#

that question does not make sense

#

you just run dotnet publish and run from the published directory, if you're going to copy files you need to copy everything from the published dir

#

Why in the world is it showing error with line 6 “run”?

#

you have no comma in the above line

#

Ohhh yeah, dumbass me

#

Thanks! 👍

glossy spoke
#

M

quaint wasp
#

I did do the

#

inline thing..

#

But still the same.

#

How do I make it go to the next line?

solemn latch
#

inline false?

quaint wasp
#

like so:

#

OOOHHH

#

dang..

#

Im so dumb.

#

thanks.

#

thinking why did I do true in the first place...

earnest phoenix
#

Ohh damn, I’m missing {, ", lol and many other stuff smh

quartz kindle
#

@opal plank ```js
function copy7(src, target = {}) {
for(let key in src) {
const value = src[key];
if(typeof value === "object" && value) {
target[key] = {}
copy7(value, target[key]);
} else {
target[key] = value;
}
}
return target;
}

save a copy of one of the raw embeds in your benchmark, then benchmark copying it with copy7(embed)
opal plank
#

pong

#

will do, gimme a bit

umbral zealot
earnest phoenix
umbral zealot
#

using backticks for a string is like doing ```js
setDescription( (() => { return "this is a description " })() ),

solemn leaf
#

what

quartz kindle
#

no, its like doing ```js
setDescription(eval('"this is a description"'))

umbral zealot
#

Backticks are for "template literals" which are basically a function being run on the contents to look for placeholders to run. So, it's literally "interpreted", as in, it has to be evaluated. Versus just using quotes which is not processed at all in any way

quartz kindle
#

:^)

placid gazelle
#

🙂 hello

quartz kindle
#

HI

opal plank
#

not bad at all

quartz kindle
#

wait

#

its empy

opal plank
#

well, yeah

#

what do you want me to put in it?

#

oh

#

my bad

quartz kindle
#

lmao

#

embed = rawEmbed()

#

right before the loop

opal plank
#

that'd be creating a var every loop no?

urban surge
#

text shifts to bottom How do I force the field to expand

opal plank
#

isnt the point of this to be attached on client or somewhere to be used multiple times?

#

without the delay of declaration?

#

also

quartz kindle
#

ye now its correct

#

but this scales with object size so

#

it will likely be much slower with bigger objects

opal plank
#

@spare goblet ts hates everyone, dont sweat it, the whole purpose is being the coding equivalent of a https://www.youtube.com/watch?v=UXA0-YAoo9Q

The Kookaburra Call - A.K.A. The kookaburra laughing! Matilda the kookaburra shows off her talents in the education center of the San Diego Zoo.

This amazing call is sometimes called a laugh (hence the name, Laughing Kookaburra) but there's nothing funny about it. It's actually a pretty cool creature feature. Kookaburras use their trilling la...

▶ Play video
solemn leaf
#

how do I check if guildmember is a bot?

opal plank
#

it screeches on every chance it has

quartz kindle
#

ye fuck ts

#

:^)

opal plank
#

ts is glorious

quartz kindle
solemn leaf
#

Thanks

opal plank
#

so you're telling me that using JSON.parse(JSON.stringify(obj)) is some of the worst ways you can deep clone something?

#

interesting

quartz kindle
quartz kindle
#

the JSON method is the easiest way to keep clone an object, but its very slow

opal plank
solemn leaf
#

if you're making a constructor

#

wait what

#

copy7

quartz kindle
#

deep cloning is just there to ensure you dont accidentally modify the original object and cause issues in future accesses to the original object

#

has happened to me many times before

#

lmao

opal plank
#

im usually very selfaware of that, so its hardly an issue

glossy spoke
#

What's better?
.addFields(); or .addField();?

opal plank
#

but it might be worth to attaching this to a file somewhere for quick access

quartz kindle
#

my api for example, it sends a huge object in a POST request

#

and some functions require multiple requests using the same object with slightly modified parameters

opal plank
quartz kindle
#

and i screwed it up many times before by accidentally changing the original requests's object along the way

#

with caused tons of issues

opal plank
#

yeah thats a thing i try to avoid as much as possible

#

thats why sometimes i use parse/stringify to deep clone

quartz kindle
#

disclaimer, my code uses the JSON JSON method

#

because im lazy

glossy spoke
opal plank
#

the other way around

#

well, since we are talking about embed builders

#

how about you ditch it?

quartz kindle
#

xD

opal plank
#

@glossy spoke keep in mind they ALL do the same thing, theres 0 difference in the result, but look at the performance

glossy spoke
#

Ow

opal plank
#

yeah, ditch d.js embed builders

unkempt ocean
#

@dense flare can you send the iframe code please

dense flare
#
<a href="https://kudos.ml">Whatever</a>
<iframe src="https://kudos.ml" title="description">
<!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME--><!--FILLERS FOR IFRAME-->
solemn leaf
#
const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(c => args.join(" ") && c.displayName.toLowerCase().includes(args.join(" ").toLowerCase()));

How can I make this work for id and display name Right now it isnt.

unkempt ocean
dense flare
unkempt ocean
#

as far as I can see, your iframe works

dense flare
dense flare
unkempt ocean
urban surge
#

How do I show how many discords and how many users there are?

dense flare
dense flare
#

i will change it back to the iframe now, but the problem is still there

quartz kindle
#

:^)

opal plank
#

BRUH

#

you tryna beat my record or what tim?

quartz kindle
#

nah

#

its just 1 shard

opal plank
#

HMMMMMMMM

quartz kindle
#

its a test shard that only works on my guild

earnest phoenix
opal plank
earnest phoenix
#

Shard 38494902

opal plank
#

tim tryna beat me in dossing big platforms

solemn leaf
#

Why do pings only work when I set it to work with ids and members names,

const member = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(c => args.join(" ") && c.displayName.toLowerCase().includes(args.join(" ").toLowerCase()));
opal plank
#

imagine the balls

urban surge
opal plank
solemn leaf
#

erweins

opal plank
#

?

urban surge
#

How can I do the changing activity part here, how many people use it?

solemn leaf
#

can you help with my member

quartz kindle
quartz kindle
solemn leaf
#

only works with pings

quartz kindle
#

or only active members?

urban surge
quartz kindle
#

you need to use guild.memberCount

#

you have to loop over all guilds or reduce them to sum all their memberCounts

solemn leaf
#

tim

quartz kindle
solemn leaf
#

ok

#

I meant it only worked with pings

quartz kindle
#

ok

solemn leaf
#

doesnt work with ids

quartz kindle
#

likely the member is not cached

solemn leaf
#

they were

quartz kindle
#

so you need to fetch it

urban surge
#

didn't work

quartz kindle
#

if they were, then you need to check your args

solemn leaf
#

so want me to change get to fetch?

quartz kindle
solemn leaf
#

wait waht

urban surge
quartz kindle
#

you want to learn or want a code to copy and paste?

#

start with something small, do you know how to use variables in text?

#

do you know what a variable is?

solemn leaf
#

Tim how do I fetch it

quartz kindle
#

await guild.members.fetch(id)

glossy spoke
#
client.on("message", async message => {
  if (message.content.startsWith(prefix + 'setw') || message.content.startsWith(prefix + 'setwelcome')) {
    let canal = message.mentions.channels.first();
    
    if (!canal) { 
      message.channel.send("Debes mencionar el canal!");
      return;
    } else {
      if (wdb.get(`servidor_${message.guild.id}`)) {
        if (wdb.get(`servidor_${message.guild.id}` == canal.id)) {
          message.channel.send("Este canal ya ha sido establecido como el canal de bienvenidas.")
          return;
        } else {
         const cambiando = await message.channel.send(`Cambiando canal de bienvenidas de <#${wdb.get(`servidor_${message.guild.id}`)}> a ${canal}...`)
          wdb.set(`servidor_${message.guild.id}`, canal.id)
          cambiando.edit("Canal cambiado con éxito.", {timeout: 3000})
        } 
        if (!wdb.get(`servidor_${message.guild.id}`)) {
          const cambianduo = await message.channel.send(`Estableciendo canal de bienvenidas a ${canal}...`)
          wdb.set(`servidor_${message.guild.id}`, canal.id)
          cambianduo.edit("Canal establecido con éxito.", {timeout: 3000})
        }
      }
    }
  }
});
#

the code doesn't get executed when the db doesn't find the server

solemn leaf
#

Well now my problem is tim if I try doing a string it does this DiscordAPIError: Invalid Form Body
user_id: Value "Ms." is not snowflake.

opal plank
#

well yeah

#

user_id

quartz kindle
opal plank
#

its suppose to be an ID not a name

glossy spoke
#

why?

opal plank
#

MS is not part of snowflake

solemn leaf
#

@opal plank yeah but shouldn't it stop and go to the other or?

opal plank
#

snowflake is a discord id

#

if you input ms in there, it'll error

quartz kindle
#

you're doing db.get("something" == canal.id) which turns into db.get(false)

solemn leaf
#

Okay

glossy spoke
#

mmm

solemn leaf
#

so should I check if it is a number before I do it?

quartz kindle
#

show code

solemn leaf
#

me?

glossy spoke
quartz kindle
#

yes

quartz kindle
#

so it will never work

glossy spoke
#

ow

#

i didn't see that lol

#

thx

quartz kindle
#

👍

solemn leaf
#

Tim

quartz kindle
#

?

opal plank
#

YES

#

everything ported

#

havent tested everything

#

but everything is working

#

ish

#

no errors, so i assume its working

#

like a good dev

quartz kindle
#

xD

#

nice

earnest phoenix
#

how do i make dsl work

#

i

rustic nova
quaint wasp
#

Anyone knows how to keep their bot 24/7 online, without showing the token like you do when you post it on https://repl.it~ ?

rustic nova
#

hosting it on an actual host

grizzled raven
#

great idea

quaint wasp
#

Like VCD?

rustic nova
#

VPS

quaint wasp
#

I cant keep my pc on 24/7..

#

o

#

h

#

$2 per month tho..

#

also

#

I get this error:

#

My code is..

#
const Discord = require('discord.js');

module.exports = {
    name: 'server-info',
    execute(message, guild, send) {
  


        const Discord = require('discord.js')
        const sEmbed = new Discord.MessageEmbed()
          .setColor('#27FF00')
          .setTitle('Server Infromation')
          .addField(`Members in this server: ${guild.memberCount}`)
          .addField('ID:', guild.id)
          .addField(' ')
          .setFooter('Type **++help** for help! Time:')
          .setTimestamp();
    
        message.channel.send(sEmbed);

      }
}```
#

why cant it read wtf send is?

solemn leaf
#

message.channel is undefined

#

read the message

#

if you cant read error messages as easy as that please learn how to

#

and wtf is your command handler

#

I have seen it change 20 times today

quaint wasp
#

its...

#

the same thing?

#

bruh

quartz kindle
quaint wasp
#

I just change code IN it

quartz kindle
#

.env cannot be seen by anyone except you

quaint wasp
#

U need "hacker" plan to make privet ones.

solemn leaf
#

smuh

#

show me your on message event

glossy spoke
#

Tim, the code works perfectly ;D

client.on("message", async message => {
  if (message.content.startsWith(prefix + 'setw') || message.content.startsWith(prefix + 'setwelcome')) {
    let canal = message.mentions.channels.first();

    if (!canal) {
      message.channel.send("Debes mencionar el canal!");
      return;
    } else {
      if (wdb.get(`servidor_${message.guild.id}`)) {
        if (wdb.get(`servidor_${message.guild.id}`) == canal.id) {
          message.channel.send("Este canal ya ha sido establecido como el canal de bienvenidas.")
          return;
        } else {
          const cambiando = await message.channel.send(`Cambiando canal de bienvenidas de <#${wdb.get(`servidor_${message.guild.id}`)}> a ${canal}...`)
          wdb.set(`servidor_${message.guild.id}`, canal.id)
          cambiando.delete({ timeout: 3000 }).then(m => setTimeout(function() {
            m.channel.send("Canal cambiado con éxito.")
          }, 100))
        }
      }
      if (!wdb.get(`servidor_${message.guild.id}`)) {
        const cambianduo = await message.channel.send(`Estableciendo canal de bienvenidas a ${canal}...`)
        wdb.set(`servidor_${message.guild.id}`, canal.id)
        cambianduo.delete({ timeout: 3000 }).then(m => setTimeout(function() {
          m.channel.send("Canal establecido con éxito.")
        }, 100))
      }
    }
  }
});
quartz kindle
#

i just created a .env file in my repl.it and opened a private browser window, and i cant see the .env file

solemn leaf
quaint wasp
solemn leaf
#

did you just call your command handler index

quaint wasp
#

no.

solemn leaf
#

command.execute(client, message, args);

#

as I said

quaint wasp
#

Its IN.

solemn leaf
#

you dont know js

glossy spoke
#

uh

quaint wasp
#

command?

glossy spoke
#

bro, there is not any problem by making your "hello world" program

quartz kindle
#

arguments are passed by order, not by name

quaint wasp
#

😦

solemn leaf
#

its a method

#

@quartz kindle can you do execute({message})

quartz kindle
#

if you do something(abc1, abc2, abc3) then inside the function, the first parameter will always be abc1, no matter how you name it

#
function something(bla, bla1, bla2) {
  // bla is abc1, not bla
}

something(abc1, bla)
solemn leaf
#

tim

quartz kindle
quaint wasp
solemn leaf
#

dude

quartz kindle
agile lance
#

do let guild = message.guild;

solemn leaf
#

please learn java script before talking here

dusky sundial
#

I'm pretty sure people told you that yesterday too @quaint wasp . You're just gonna annoy people if you come in here with questions about basic js

agile lance
#

also .env can only be comprised if ur apart of a project

quaint wasp
#

alright. ill watch one of those 10 hour lessons.

solemn leaf
#

Dude

quaint wasp
#

Welcome.

agile lance
#

Dude smug

solemn leaf
#

10 mins is all ou need to learn the basics

agile lance
#

Syntax isnt too hard

glossy spoke
#

oh god

quaint wasp
agile lance
#

I’ll gladly write a tutorial for you if you dm me

glossy spoke
#

"i can't define guild"

#

god

solemn leaf
#

then you need to actually do what they are doing and listen to them

agile lance
#

or global.guild = "hi"

mellow kelp
#

(not var tho)

agile lance
#

var is trash

mellow kelp
#

fuck var

#

me and my homies use let and const