#development

1 messages · Page 1914 of 1

boreal iron
#

And it's even more fun if people copy & pasting stuff without reading

vivid fulcrum
#

guild.channels.cache.find(predicate)?.send()

boreal iron
#

yeah ik, but I wanna keep it understandable in this case

vivid fulcrum
#

oh also

#

you don't need to return if it's at the end of the listener

boreal iron
#

No the message only being sent if the channel was found, an additional return isn't needed tho, just extra useless code

#

Well there's so much you can do, your imagination is just the limit

#

Also it can happen a guild isn't available

#

It would make sense to check for this, too

#
client.on("guildCreate", (guild) =>
{
  if(!guild.available) return;
  ...
wheat mesa
#

Dear god I love C#

#

Fuck Java

#

C# is a gift

boreal iron
#

YES FINALLY

#

YOU GOT IT

boreal iron
wheat mesa
#

These “preparation” sites usually have pretty garbage problems in terms of real-world use but this was fun to write

boreal iron
#

If you would now choose a real programming language, moving over to PHP I would hug you and send you cash, I swear

wheat mesa
#

I hate web dev though lowkey

#

Frontend is pain

boreal iron
#

PHP isn't limited to web development

#

Not even close

wheat mesa
#

Backend is fun, but there’s no point in a backend if you can’t use the frontend smirk

boreal iron
#

I'm not the best fancy frontend creator as well but it used to work well the last 10 years

wheat mesa
#

Tbh if I had time to work on web dev I would do it all the time just to get good at frontend

#

But school 🤢🤢🤢

quartz kindle
#

the shard where each guild is assigned to depends on the number of shards you have

#

every time you change the total number of shards, all guilds are rearranged

#

while the total number is unchanged, the guilds will always be in the same shards

lyric mountain
#

@quartz kindle when autocorrect becomes waaaay too correct

#

damn not even ms word corrects me like that

split hazel
#

diz

#

diz nuts

amber quest
#

Verify Badge

spark flint
#

wdym

quartz kindle
#

verifius badgeus

zenith terrace
#

what harry potter magic shit is this Tim

boreal iron
#

Tim, take your pills, now.

quartz kindle
#

imma take my fake pills

#

_eats @boreal iron _

boreal iron
#

Ha! gonna steal all your knowledge once I'm in, Sir!

#

@quartz kindle It's finally announced.

quartz kindle
#

nice

#

how are their disks tho?

#

me needs fast disks

boreal iron
#

Damn good, we did compare tests before iirc

earnest phoenix
quartz kindle
boreal iron
#

uhmm

#

damn Discord search is crap, can't find it, too

#

Those are the DNS servers... may not be really representive as the IO is always high in the background

quartz kindle
#

ye thats average

#

its hot

#

are you gonna buy it?

boreal iron
#

That's an unoccupied one

#

Still goes up and down ofc depending on the rack usage

quartz kindle
#

im getting 1GB/s on average on kamatera

#

paying $4 for 1gb ram 1 cpu

#

if i can get 1GB/s on hetzner's 2gb ram 2cpu, im gonna buy it

boreal iron
#

The price for the cheapest server has increased by 60% because Hetzner now charges a HUGE fucking price for IPs

quartz kindle
#

additional IPs? or does it include the base ip?

boreal iron
#

For additional IPs

#

They did only increase the price for the cheapest server because of the static assigned IPv4

#

Since you can't get cloud servers without IPv4

#

(yet)

quartz kindle
#

i dont need additional IPs so its fine for me

boreal iron
#

Got a few servers running already, CX21 as DNS servers

#

I can now switch from Ionos (trash) finally to the Hetzner cloud US

quartz kindle
#

im really interested in the CPX11

boreal iron
#

Hmm they perform quite nice

quartz kindle
#

all i need is to confirm the disk speeds

boreal iron
#

Got cloud servers since they got introduced

quartz kindle
#

because my workload is disk heavy

boreal iron
#

Well rent one, test it, check it out, if it doesn't work, throw it away

#

hourly based charge

#

just a few cents you waste

quartz kindle
#

ye

boreal iron
#

Deploying and deleting only takes seconds

#

And the cloud webinterface is a FUCKING CHARM

quartz kindle
#

it seems i can get 20 euros of free trial

#

for new customers

boreal iron
#

lemme check something

#

There was a customer by customer promo

quartz kindle
#

like a referal code and shit?

boreal iron
#

Yeah

#

You will love the cloud interface

quartz kindle
#

cool

#

i'll definitely give it a try

#

it seems tho they dont own the US servers

#

they are "partnered" servers

#

so their performance might be different form their european servers

#

i've seen that on kamatera

boreal iron
#

They own the servers but moved into a datacenter they don't own

quartz kindle
#

kamatera's german servers are faster than their US servers, even if the specs are the same

boreal iron
#

Funny fact is I was the one figuring that out by watching US costums import list

#

(in the private forum of Hetzner)

quartz kindle
#

oh

#

cool hahah

boreal iron
quartz kindle
#

what are you, cia?

#

lmao

boreal iron
#

There are tons of benchmerks around the private forum

#

No I had to do with containers quite a lot in the past

quartz kindle
#

ooo give me some benchmerkels

boreal iron
#

So I knew where to look

#

Also that statement should clarify what I mean by own hardware

#

(published today)

#

Performance is 100% the same as in the EU

#

As people in the forum figured out already

#

Germany <-> US

quartz kindle
#

yeah just saw that

boreal iron
#

NBG (DE) <-> US

quartz kindle
#

any disk benchs?

boreal iron
#

So far not

#

I mean should 100% be the same as my EU ones

#

same hardware

quartz kindle
#

also btw, wasnt hetzner voice banned from discord?

lethal trout
#

Code:

await startMessageCollectors(client, message, args);
        function startMessageCollectors(client, message, args) {

            let channelFilter = m => m.author.id === message.author.id;
            let channelCollector = message.channel.createMessageCollector({
                channelFilter,
                time: 15000
            });
            channelCollector.on('collect', async msg => {
                const a = msg.content
                msg.channel.send('ok1')
                channelCollector.stop();

                let ewFilter = m => m.author.id === message.author.id;
                let wqCollector = message.channel.createMessageCollector({
                    ewFilter,
                    time: 15000
                });
                wqCollector.on('collect', async msg => {
                    const b = msg.content
                    msg.channel.send('ok2')
                    wqCollector.stop();
                })

                console.log('1)' + a)
                console.log('2)' + b)
            })
        }```

**Error:**
 `ReferenceError: b is not defined`
and it doesnt collect any message.. from me.. it directly runs everything.. and finshes the task...
https://media.discordapp.net/attachments/821972674380038166/905518998832177282/unknown.png
quartz kindle
#

not that i need it, just curious

boreal iron
#

Probably a little bit better atm as the racks are mostly undeployed

boreal iron
quartz kindle
#

also, dont use collectors for that

#

use channel.awaitMessages()

#

your function is not async either, so no need for await

lethal trout
quartz kindle
lethal trout
boreal iron
#

Just asked in the forum for speedtests, I guess it will only take a few minutes

quartz kindle
pale vessel
boreal iron
quartz kindle
#

lmao

#

i can just send pics

boreal iron
#

no no... just takes a second

quartz kindle
#

lel ok

pale vessel
quartz kindle
pale vessel
#

Like, everything by hetzner?

quartz kindle
#

from what i remember, only voice servers

boreal iron
#

So that's 2019

#

weew

#

Who knows if that's still in place

pale vessel
#

I know someone that had a dedi on Hetzner and they never had an issue with voice iirc

boreal iron
#

I'm running my bot on my dedi, too

quartz kindle
#

was it after 2019?

#

or before that as well

boreal iron
#

Provide me some voice code real quick and I will test it

pale vessel
#

They might have purged the blocked IPs

quartz kindle
#

its possible that they fixed it already, 2019 is quite a while ago

pale vessel
#

It's been years

boreal iron
quartz kindle
#

thats why i asked, i havent heard anything about it anymore

boreal iron
#

As Hetzner is still constantly buying new IPs

pale vessel
#

It's a stupid move

boreal iron
#

Sometimes it takes years until the changes been announced to any association

boreal iron
#

idk

quartz kindle
#

no answer

#

that was 2 months ago

boreal iron
#

What I can say is, I'm not banned

#

And my IP range is one of the older ones of Hetzner

quartz kindle
#

i can try asking on discord developers as well

#

this was the reason btw

boreal iron
#

Anyways I'm sure for that price/performance they will soon need to expand

quartz kindle
#

apparently discord gateway events were getting flagged as ddos?

#

or something like that

#

lmao

boreal iron
#

Yeah that seems to be a real issue I read a lot of times in the forum as well

#

Lots of customers are complaing about that shit, but it seems things are getting better

#

The marketing girl stated they're increasing their abuse apartment a lot to handle the increasing amout of conflicts and to deal with things correctly nowadays

#

Already got a speedtest

#

CPX11

boreal iron
#

@quartz kindle

quartz kindle
#

well buffered is something else

#

but looks good

boreal iron
#

Do you look for a specifc test?

#

He asks if I need another one.

quartz kindle
#

i usually run stuff like https://github.com/jgillich/nixbench

boreal iron
#

Ok let's see

boreal iron
# quartz kindle

Seems to be bullshit, there's no issue on my side, the API doesn't block me on my dedicated server nor on my cloud servers

quartz kindle
#

looks like its only specific IPs

boreal iron
#

Tested 4 completelly different IP ranges

quartz kindle
#

not all hetzner users are affected

boreal iron
#

Yes probably

#

The US IPs won't be affected as well

quartz kindle
#

yeah

boreal iron
#

They shared the IPs got buyed a few weeks/months ago by Hetzner

quartz kindle
#

unless the same shit happens and discord does another banwave

#

:^)

boreal iron
#

hmm who knows but I don't think so

delicate zephyr
#

no they're not

#

im running a discord bot on a hetzner dedi

#

unless it's a vps thing then idk

boreal iron
#

Just take a look at the close upper messages

delicate zephyr
#

might be a large amount of the vps subnets

boreal iron
#

I've got no issues, too

delicate zephyr
#

because afaik they get blocked programmatically based on abuse factors

boreal iron
#

Hetzner owns so many IP blocks, maybe they just blocked 1 or 2 or whatever

quartz kindle
rustic nova
#

and theres no certain reason why hetzner exactly is blocked?

#

why not other providers?

rustic nova
#

anti abuse yeah

boreal iron
#

Just read above, they do actually have a bad abuse department

#

I can confirm that

rustic nova
#

ohhhhh

quartz kindle
#

they were spamming discord with abuse emails from their automated system

rustic nova
#

So discord basically blocks them for being unable to file abuse reports towards them?

#

OHHHH

quartz kindle
#

basically thinking discord was ddosing them

rustic nova
#

yeah now I get it

delicate zephyr
#

Discord just said "Fuck that"

#

2018

quartz kindle
#

Due to a lack of communication and improper use of abuse systems by Hetzner, we'll shortly be blacklisting ALL of Hetzner's IP ranges to our voice servers. If you host a bot on Hetzner that requires voice (e.g. a music bot), it will stop working when this happens. Please reach out to Hetzner and encourage them to open a line of dialog with us to resolve these problems. Apologies to any interruptions this causes for you.

As an addendum to the above, we'll be blacklisting Hetzner IPs from our API at 16:00 PST (GMT -7). Please take measures to move any services or bots you host on Hetzner elsewhere before this time. Feel free to reference ticket number 2017091403020104

As an update to the above, Hetzner reached out to us this morning and opened a line of dialog. Since it's the weekend and we don't wanna ruin anyones fun I've lifted all of the API level blocks. Your bots will still not be able to connect to our voice servers until we fully resolve the issue on Hetzner during the normal work-week. Thanks.

Hetzner was not able to meet our requirements to be unblocked, so the voice block will likely remain indefinitly

boreal iron
#

Got no issues on the follow ranges...

157.90.0.0/16
138.201.0.0/16
116.202.0.0/16
46.4.0.0/16
5.9.0.0/16
95.216.0.0/16
95.217.0.0/16
78.46.0.0/15
#

and a few more

#

Don't think I got anyone

quartz kindle
#

you tried to connect to voice on all them?

boreal iron
#

Moved my shit around these the last months/years

#

Nope

quartz kindle
#

then how did you test lol

boreal iron
#

The bots are running on these

quartz kindle
#

but do you have voice features?

boreal iron
#

And got moved into different machines

delicate zephyr
#

they're blocked on voice

boreal iron
#

No as I said

delicate zephyr
#

and only voice

#

everything but voice will work

quartz kindle
#

the block only affects voice servers

boreal iron
#

hmm

#

Well if Luke has no issues...

#

It may only be a few blocks then

delicate zephyr
#

Shiro doesn't have voice

#

never said I had voice features

boreal iron
quartz kindle
#

so yeah, its likely still blocked

delicate zephyr
#

it is

#

just checked

#

cant get shiro to join vc

solemn latch
#

I wonder what those requirements are

delicate zephyr
#

"Stop fucking spamming our abuse email"

boreal iron
#

lmao

quartz kindle
#

"whitelist all our ips pls"
"lol no"

boreal iron
#

Would be interessting to know if the Ashburn IPs are affected as well

delicate zephyr
#

Probably hetzner being difficult

boreal iron
#

Maybe it's really a whole ASN block

solemn latch
delicate zephyr
#

LMFAO

boreal iron
#

Click here to clear your system drive of Windows

solemn latch
#

oh snap

#

lmao

quartz kindle
#

LMAO

boreal iron
#

hmm 0 bytes isn't much

solemn latch
#

idk whats using my space even

quartz kindle
#

uninstall system32

boreal iron
#

lmao

solemn latch
#

I only have windows, chrome and discord on my c drive

quartz kindle
#

lies

boreal iron
#

err

#

updates fill up a huge amount

quartz kindle
#

clean your recycle bin

earnest phoenix
boreal iron
#

Nope, right click the drive

earnest phoenix
#

How is this possible

boreal iron
#

Do cleaning system [...]

quartz kindle
#

you did it wrong

earnest phoenix
#

no i didnt

boreal iron
#

Whatever it's called in English

quartz kindle
#

yes you did

earnest phoenix
#

No i didnt

quartz kindle
#

yes you did

earnest phoenix
#

Date.now() - msg.createdTimestamp

quartz kindle
solemn latch
#

oh yeah was my recycle bin

#

150gb 👀

earnest phoenix
#

Message created at 10
Date.now is 15
15-10 = ping

boreal iron
#

Use the features I mentioned... you will see a lot of space is used for Windows updates

quartz kindle
earnest phoenix
#

Why

solemn latch
#

updates dont get deleted after? 👀

boreal iron
solemn latch
#

oh is it because of the "shared updates" dodad

boreal iron
#

You need to clean up this yourself, that's why it exists

earnest phoenix
#

even if wrong the bot responds really fast

boreal iron
#

Nope they still exist even if that shit is disabled

quartz kindle
#

Date.now() = time in your pc
message.createdTimestamp = time in Discord's pc
if the two pcs's time is off by just 1 second, everything gets broken

solemn latch
quartz kindle
#

different pcs dont always have the exact same time, there are always slight time differences

boreal iron
delicate zephyr
boreal iron
#

Do NOT use the new fucking settings app to do shit

solemn latch
#

kek

earnest phoenix
#

It was working before

quartz kindle
#

well its not working now

boreal iron
#

Tim you're ready?

#
nixbench v0.6.6 - https://github.com/jgillich/nixbench
cpu
---
Sha256 (1x) :  425.66 MB/s
Gzip (1x)   :   82.45 MB/s
AES (1x)    : 2196.61 MB/s
Sha256 (2x) :  848.32 MB/s
Gzip (2x)   :  164.74 MB/s
AES (2x)    : 3471.88 MB/s
disk
----
1. run   : 1413 MB/s
2. run   : 1460 MB/s
3. run   : 1491 MB/s
4. run   : 1499 MB/s
5. run   : 1552 MB/s
Average  : 1483 MB/s
geekbench
---------
Single-Core Score  : 5134
Multi-Core Score   : 9223
Result URL         : https://browser.geekbench.com/v4/cpu/16402359
host
----
OS        : linux
Platform  : ubuntu 20.04
CPU       : AMD EPYC Processor
Cores     : 2
Clock     : 2445 Mhz
RAM       : 1939 MB
net
---
CDN                           :  84.98 MB/s
Amsterdam, The Netherlands    :  17.90 MB/s
Dallas, USA                   :  40.82 MB/s
Frankfurt, Germany            : Failed
Hong Kong, China              :   7.55 MB/s
London, United Kingdoms       :  21.71 MB/s
Melbourne, Australia          : Failed
Oslo, Norway                  :   6.87 MB/s
Paris, France                 :  21.29 MB/s
Queretaro Mexico              :  14.34 MB/s
San Jose, USA                 :  20.01 MB/s
Sao Paulo, Brazil             :   6.00 MB/s
Seoul, Korea                  :   2.94 MB/s
Singapore, Singapore          :   5.99 MB/s
Tokyo, Japan                  :   5.53 MB/s
Toronto, Canada               :  54.00 MB/s
Washington, USA               :  86.37 MB/s

@CPX11

quartz kindle
# earnest phoenix It was working before

check the clock on your pc, then check the clock on your phone, watch the seconds moving. most likely you will see that both devices have their seconds slightly different from each other

earnest phoenix
#
const Discord = require('discord.js')
module.exports = {
  name: 'ping',
  description: 'Pong!',
  memberPerms: ["ADMINISTRATOR"],
  clientPerms: [],
  options: [],
  async run(client, i, lang, options) {
      
      let ping = await Date.now() - i.createdTimestamp
      let embed = new Discord.MessageEmbed()
        .setColor("RANDOM")
        .setDescription(`Pong! | \`in ${ping}ms\` `)
          
          i.reply({ embeds: [embed] })
    },
};
quartz kindle
boreal iron
#

Yes.

quartz kindle
#

holy

#

me wants

boreal iron
#

As I said, keep in mind the racks are fully of "unused" VMs yet

#

That will probably change a little bit in the next weeks

quartz kindle
#

ye probs

boreal iron
#

But it's still quite good

quartz kindle
#

as long as it maintains disk speeds above 1gbps, im in

solemn latch
#

us location too 👀

quartz kindle
#

im buying it today

earnest phoenix
#

And i have one more question
const command = client.commands(command.name)
Working on messages

But it doesnt work in interactions

boreal iron
quartz kindle
#

4 euros is super cheap

solemn latch
#

heck, I might as well get one too

quartz kindle
#

most other providers charge $10+ for 2 cpus

#

excluding contabo

#

contabo is stupid

spark flint
#

Agreed

#

I cancelled my contabo vps

quartz kindle
#

why?

spark flint
#

Slow, not needed, worlds most outdated and overly complicated dashboard

quartz kindle
#

lmao

boreal iron
#

Yes after reading you aren't even able to deploy your own images, only when contacting the support FOR money, I was out

#

And yes I heard a lot of complaints about slow servers, too

#

very slow

quartz kindle
#

well, there had to be a reason why they offered 4 cpus for the price of 1

boreal iron
quartz kindle
#

btw

#

which virtualization does hetzner use?

#

kvm?

#

kamatera uses vmware

#

its op as fuck

boreal iron
#

Yeah I think so

solemn latch
#

ah, gotta be verified

quartz kindle
#

ye

#

We are running KVM as a hypervisor. We use virtio for both virtual NICs and disks.

boreal iron
#

Got a second one

#
root@vm4-teamspeak:/tmp# curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh
nixbench v0.6.6 - https://github.com/jgillich/nixbench

cpu
---
Sha256 (1x) :  291.84 MB/s
Gzip (1x)   :  246.45 MB/s
AES (1x)    :  148.60 MB/s

Sha256 (2x) :  577.03 MB/s
Gzip (2x)   :  489.48 MB/s
AES (2x)    :  364.23 MB/s


disk
----
1. run   : 1413 MB/s
2. run   : 1495 MB/s
3. run   : 1502 MB/s
4. run   : 1498 MB/s
5. run   : 1495 MB/s
Average  : 1481 MB/s


geekbench
---------
Single-Core Score  : 5623
Multi-Core Score   : 9936
Result URL         : https://browser.geekbench.com/v4/cpu/16402372


host
----
OS        : linux
Platform  : ubuntu 20.10
CPU       : Common KVM processor
Cores     : 2
Clock     : 3094 Mhz
RAM       : 3932 MB


net
---
CDN                           :  94.52 MB/s
Amsterdam, The Netherlands    :  35.08 MB/s
Dallas, USA                   :  11.65 MB/s
Frankfurt, Germany            :  50.74 MB/s
Hong Kong, China              :   7.67 MB/s
London, United Kingdoms       :  67.38 MB/s
Melbourne, Australia          : Failed
Oslo, Norway                  :  28.91 MB/s
Paris, France                 :  59.12 MB/s
Queretaro Mexico              :   7.23 MB/s
San Jose, USA                 :   9.14 MB/s
Sao Paulo, Brazil             :   5.67 MB/s
Seoul, Korea                  :   4.28 MB/s
Singapore, Singapore          :   8.45 MB/s
Tokyo, Japan                  :   4.69 MB/s
Toronto, Canada               :  14.73 MB/s
Washington, USA               :  15.96 MB/s
#

oh woops

#

I'm an idiot

quartz kindle
#

you dont have cpu passthrough?

boreal iron
#

no lmao opened the wrong batch file which opened the wrong console of the wrong server

#

LMAO

quartz kindle
#

oh lmao

#

still, you should get cpu passthrough on that one

boreal iron
spark flint
#

whats a more reasonable and cost effective method:

  • buy another reseller hosting plan (gonna be offering a paid plan for devpage so people have a choice for what control panel and specs etc)
    or
  • buy a dedicated/cloud server and install it all myself
quartz kindle
#

doesnt exist

quartz kindle
boreal iron
#

fuck... can't run that shit on my DNS server tho

quartz kindle
#

setInterval()

boreal iron
#

lemme deploy a cloud server real quick

#

@quartz kindle CPX11 ?

quartz kindle
#

ye

boreal iron
#

location?

quartz kindle
#

US

spark flint
#

a reason i may just get a reseller plan is that i don't have anybody paying yet and having a reseller plan to be able to cancel/restart at anytime without having to setup again

#

idk

boreal iron
#

OMG I can't paste the password

#

ffs

#

one second

#

Alright, test is running

#

weew

#

@quartz kindle Hasn't walked throug yet but I need to go in a few minutes

#
nixbench v0.6.6 - https://github.com/jgillich/nixbench

cpu
---
Sha256 (1x) :  428.62 MB/s
Gzip (1x)   :   83.44 MB/s
AES (1x)    : 2251.40 MB/s

Sha256 (2x) :  851.31 MB/s
Gzip (2x)   :  165.25 MB/s
AES (2x)    : 3647.49 MB/s


disk
----
1. run   : 1394 MB/s
2. run   : 1465 MB/s
3. run   : 1491 MB/s
4. run   : 1476 MB/s
5. run   : 1479 MB/s
Average  : 1461 MB/s


geekbench
---------
Single-Core Score  : 5168
Multi-Core Score   : 9315
Result URL         : https://browser.geekbench.com/v4/cpu/16402378


host
----
OS        : linux
Platform  : ubuntu 20.04
CPU       : AMD EPYC Processor
Cores     : 2
Clock     : 2445 Mhz
RAM       : 1939 MB
#

root@ubuntu-2gb-ash-1

quartz kindle
#

awesome

boreal iron
#

aye

quartz kindle
#

why gzip so slow tho

boreal iron
#

hmm not sure tho, test is stuck I guess

quartz kindle
#

network tests take longer

boreal iron
#

yeah but not that long

#

probably a few timeouts

#
cpu
---
Sha256 (1x) :  426.42 MB/s
Gzip (1x)   :   82.44 MB/s
AES (1x)    : 2056.12 MB/s

Sha256 (2x) :  848.52 MB/s
Gzip (2x)   :  164.61 MB/s
AES (2x)    : 3294.30 MB/s


disk
----
1. run   : 1432 MB/s
2. run   : 1528 MB/s
3. run   : 1478 MB/s
4. run   : 1547 MB/s
5. run   : 1553 MB/s
Average  : 1508 MB/s
#

hmm

quartz kindle
#

sha and aes are amazing

#

twice as fast as galaxygate for example

#

disk is also amazing

#

50% faster than kamatera

boreal iron
#

Alright, costed me 0,01 €

quartz kindle
#

hahaha

boreal iron
#

Gonna send an invoice, Sir

quartz kindle
#

im gonna go straight for monthly

#

its usually cheaper

#

do they give discounts if you buy per year?

boreal iron
#

There's no option you can choose

solemn latch
#

Have you made an account yet? Just noticed they have referrals

quartz kindle
#

no yet

boreal iron
#

You pay hourly, MAX xxx per month

solemn latch
#

Should have used fakes but didn't 😔

boreal iron
#

(only)

quartz kindle
#

gimme your referral

boreal iron
#

hmm why not

#

(DM)

quartz kindle
#

ty

solemn latch
#

its like $10 or $20

boreal iron
#

well ty I guess

#

20 € I think

quartz kindle
#

i just burnt my lunch

#

like

#

completely

#

charcoal

#

burn

solemn latch
#

oops

quartz kindle
#

i completely forgot about it

#

for over 2 hours

boreal iron
#

lmao

quartz kindle
#

lmao

solemn latch
#

Best development of your lunch

quartz kindle
#

even the smell, i assumed someone outside was burning something

#

Lol

#

ffs

boreal iron
#

gonna send you over 10€ if I got their cash

quartz kindle
#

lmao

#

<3

boreal iron
#

hmm why not I mean I it's a nice thing

quartz kindle
#

im gonna go to the shop real quick to buy more food, that burnt shit was the last food i had

boreal iron
#

I'm gonna cook something

quartz kindle
#

cool

#

brb

slender thistle
#

LMAO TIM

earnest phoenix
#

@boreal iron I need your apache2 expertise again.
Background Info:
I have bought a new domain and since my old one will expire, I am transferring the search console property,which requires a 301 redirect from the old domain.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(https://|http://|)old.ga$ [NC]
RewriteRule ^(.*)$ https://new.com/$1 [R=301,L]
# https redirect
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

My Problems:

  • https://old.ga doesn't redirect
  • the redirects are marked as 302 sometimes
spark flint
#

the domain doesn't exist

earnest phoenix
spark flint
#

AH ok

#

Fair enough

boreal iron
#

cooking... brb in a few minutes I hope

#

If I don't burn the shit... cough Tim cough

earnest phoenix
#

what the fuck

#

System.ArgumentOutOfRangeException: 'Index and length must refer to a location within the string. (Parameter 'length')'

earnest phoenix
#

nice format

spark flint
#

@rustic nova

#

google scam

quartz kindle
#

yes you can, as long as its in an async context and you use await for the delay

boreal iron
#

Also you're over complicating things a little bit with your rewrite rules

#

You don't need a condition for the rule

earnest phoenix
boreal iron
#
Redirect 301 /path/ http://new.domain.com/

for general redirects

#

If you wanna keep the path you will indeed need rewrite rules

earnest phoenix
boreal iron
#
<VirtualHost *:80 *:443>
    
    ServerName www.old.com
    ServerAlias *.old.com
    
    RewriteEngine On
    RewriteRule ^/?(.*) https://new.com/$1 [R,L]
    
    Redirect 301 /
    
</VirtualHost>
boreal iron
#

Maybe I didn't get it, yet

earnest phoenix
#

Ah your approach is correct,I have used the old domain as server alias

boreal iron
#

Well it's the virtual host, yeah

#

The domain name being resolved to the IP, arriving in your webserver, checking if a virtual host exists listening on that server name or alias, then manage/route the request

#

That's how the 'net works

boreal iron
#

simply said

#

In my example www.old.com and any possible subdomain would be redirected

#

Ow

earnest phoenix
#

btw thx for helping me out :D

boreal iron
#

Might also be a good idea to include the actual TLD name

#

ServerAlias old.com *.old.com

#

Keep in mind my example will cause a SSL error

#

You will actually need two virtual hosts if HTTPS is a thing

#
<VirtualHost *:80>
    
    ServerName www.old.com
    ServerAlias old.com *.old.com
    
    RewriteEngine On
    RewriteRule ^/?(.*) https://new.com/$1 [R,L]
    
    Redirect 301 /
    
</VirtualHost>

<VirtualHost *:443>
    
    ServerName www.old.com
    ServerAlias old.com *.old.com
    
    SSLEngine on
    SSLCertificateFile "${SSLROOT}/file.crt"
    SSLCertificateKeyFile "${SSLROOT}/file.key"

    RewriteEngine On
    RewriteRule ^/?(.*) https://new.com/$1 [R,L]
    
    Redirect 301 /

</VirtualHost>
#

oh... woops SSLROOT is a var in my case

#

Just replace it with your full path

#

Well or simply define it, however you like

#

Define SSLROOT "/path/to/certs"

#

color: Math.floor(Math.random()*16777215).toString(16)

#

don't create a var if you just use it once

#

ehm lol

#

that will always be the same var

#

color

#

I mean

#

look what I wrote above

#

only if you restart the app

#

not if the interval "restarts"

#

since you declared the color before

#

That will pick a random color each time, yeah

#

I don't ask why

quartz kindle
#

creating vars doesnt really matter

#

the compiled code inlines almost everything anyway

#

if vars make it cleaner, use them

wheat mesa
#

Compilers are smart

quartz kindle
#

v8 is ridiculous

#

it has like 3 different compilers, all for different stages and different purposes

split hazel
#

its google

#

wait no

#

its community

#

idk who maintains nodejs

#

wait yes

#

google

#

v8

#

= javascript v8

#

= google

#

ok sorry bye

quartz kindle
#

v8 is google (chromium project)

#

node is openjs foundation

split hazel
#

did you know the first version of javascript was written in 10 days

#

ok bye

quartz kindle
#

yes

#

lmfao

#

The OpenJS Foundation is made up of 29 open source JavaScript projects including Appium, Dojo, jQuery, and Node.js, and webpack.[4] Founding members included Google, Microsoft, IBM, PayPal, GoDaddy, and Joyent.[2]

boreal iron
split hazel
#

how did men function without anime girls

quartz kindle
#

these days i write code for 5 mins when spend 2 hours on 9gag/youtube to rest

boreal iron
#

Only distraction was shitting and eating

earnest phoenix
#
 if (message.content === `${prefix}move` || message.content === `${prefix}t`){

    let chanel101 = args.slice(1).join(" ");

     let category = message.guild.channels.cache.find(c => c.name == chanel101 && c.type == "category"),
  channel = message.guild.channels.cache.find(c => c.name == "general" && c.type == "text");

if (category && channel) channel.setParent(category.id);
else console.error(`One of the channels is missing:\nCategory: ${!!category}\nChannel: ${!!channel}`);




  }```

When I run that command it doesn't move the current channel to the given input
slender wagon
#

man is there a way i could my pfp from discord oauth2

#

i think i found a way

boreal iron
slender wagon
#

so i get my id and the avatar id thingy that discord provides

lament rock
slender wagon
#

yeah

#

ima build it up using strings

boreal iron
earnest phoenix
#

So how would I correct that?

boreal iron
#

First of all you don’t check if the whole content === your prefix + move

#

You check if the content includes it or starts with it

earnest phoenix
#

o-o

slender wagon
#
src="<%= "https://cdn.discordapp.com/avatars/" + user.discordId + "/" + user.avatar + ".webp?size=128" %>"

i am using ejs how dumb is this from 1 to 10

spark flint
slender wagon
#

it works

split hazel
#

might also want to use back ticks and dollar signs

woeful pike
#

I'm getting ptsd just looking at this code because this is basically legacy top.gg codebase

boreal iron
quartz kindle
#

commandus handlerus maximus

boreal iron
#

I somehow wish April will come faster

quartz kindle
#

no pls

#

im not nearly ready for it

boreal iron
#

That will populate this channel again

quartz kindle
#

didnt even begin porting stuff to interactions

boreal iron
#

Oh no Tim

#

Tzz

#

Lazy men

quartz kindle
#

i need to finish my api first

slender wagon
boreal iron
quartz kindle
#

with template strings

#

:^)

boreal iron
#

Ok, no more alcohol for you after 8 pm

quartz kindle
#

jokes on you, i dont drink

boreal iron
#

Hmm me either

#

Being working 7 days a week oldEyes

quartz kindle
#

erwin drinks enough for the both of us

boreal iron
#

lol

#

That’s why he’s always recommending detritus, because he’s drunk

#

I knew it

#

Thought he’s always high

quartz kindle
#

yes

boreal iron
#

That explains a lot

#

Things are making more and more sense the longer you’re here

sharp saddle
#

how do I go back to the previous page?
I'm talking about passport-discord / express

#

like: I log in, and it goes back to the previous page it was on, so it saves more time for the user.

quartz kindle
#

just redirect again?

lament rock
#

Discord supports an &redirect_uri I believe

sharp saddle
#

oh my shit...

#

I wanted to explain it well, but I can't

#

user signin on page "/admin/blablablabla", and instead of him go to page "/", I would like him to go back to "/admin/blablablabla"

quartz kindle
#

save the current url somewhere

#

like a cookie or in the url itself

sharp saddle
#

good

quartz kindle
#

when done, redirect to that url again

sharp saddle
#

cookie-parser, does it still work?

quartz kindle
#

never used it

sharp saddle
#

ir something else

#

or*

#

smh lmao

#

wtf is...

#

use await

wheat mesa
#

you have to await

sharp saddle
#

and async

#

function

wheat mesa
#

those methods return Promise<Message>

sharp saddle
#
const toDupe = await message.channel.send("Duping items...")
const duped = toDupe.edit("Covering your tracks...")
duped.edit("Items successfully duped!") 
quartz kindle
#

a setTimeout inside a promise

wheat mesa
#

setTimeout()

sharp saddle
#

oh

quartz kindle
#
const toDupe = await message.channel.send(...);
await new Promise(r => setTimeout(r, 5000));
await toDupe.edit(...);
await new Promise(r => setTimeout(r, 5000));
await toDupe.edit(...);
#

or make it a function

#
function sleep(time) {
  return new Promise(r => setTimeout(r, time));
}

await sleep(5000);
spark flint
#

woah tim new pfp

quartz kindle
#

i guess

#

the old one was 2 years old

#

this one is at least only 6 months old

spark flint
#

i struggle with pfps lmao

#

anyways this code is good

quartz kindle
#

yes but that will create 2 concurrent timeouts, so unless you set the first as 5000 and the second as 10000 for example, they will clash

#

to simulate waiting for the first timeout to finish, youd have to put the second timeout inside the first

solemn latch
#

pog I like the new pfp

quartz kindle
#

also, if you're not using await, its a good idea to add .catch()

#

ty

#

ye, in most cases await is easier and cleaner

lyric mountain
#

omg tim changed the pfp

#

also why tim reminds me of that amogus guy's face?

spark flint
#

YES

boreal iron
#

I don’t like that new face, too old one again please

errant flax
#

wdym it's like what u said?

client.on("ready", async()=>{})
boreal iron
#

async and await goes hand in hand like […] no that gets me banned

#

Fake’s driving at the moment and hates to watch code embeds on mobile

#

Your interval is missing the async def

#

You’re awaiting somethings in it’s scope

#

Okay then undo your change and forgot what I said

wheat mesa
#

Stop texting and driving or I’ll cancel the minigun shipment angeryBOYE

boreal iron
#

Huuh ffs

#

I will fly to Texan and get it myself then

#

Just kidding… I always stop for a moment while writing, I swear

lyric mountain
#

As if you were missing the clutch making the car constantly choke

boreal iron
#

Imagine I’m texting not drinking

#

My first gif meme I made

#

so proud

quartz kindle
boreal iron
#

Hmm can’t really see what’s going on it on mobile

#

Not sure if I’m supposed to be scared or not

#

Also where are the big rings around your eyes?
Where’s the shockingly white skin tone of a programmer who never saw the sun before?
… can’t be you!

quartz kindle
#

am eating yakisoba

drifting wedge
#

im making a social media website, how can i store user content such as avatars / posts?

wheat mesa
#

make sure to store all your passwords in plaintext in a non-password-protected database with public API endpoints

boreal iron
#

That should be pinned

drifting wedge
#

ill make a /passwords

#

and itll show the account / pass

wheat mesa
#

Now that’s the type of creativity we need in the development world!

lyric mountain
#

Encode the password in amogus

earnest phoenix
#
else if (message.content.startsWith(`${prefix}move`) || message.content.startsWith(`${prefix}t`))
{
    let chanel101 = args.slice(1).join(" ");

     let category = message.guild.channels.cache.find(c => c.name == chanel101 && c.type == "category")
     
  let channel = message.guild.channels.cache.find(c => c.name == "general" && c.type == "text");

channel.setParent(category.id)


  }```
#

That returns; Error; cannot read property 'setParent' of undefined.

hybrid cargo
#

The error says it all. "Cannot read property 'setParent' of undefined" Meaning channel is undefined

earnest phoenix
#

Makes sense, ty will go put "message" infront of it lmao

#

Fixed one error and now got this:

#

'hasOwnProperty'

errant perch
#

how do i create a voice channel in discord.js v13

#

it seems to only let me create a text channel

#
interaction.guild.channels.create(`${ticker}: ${price}`, {
  type: `voice`
})```
#

heres what im doing

#

looks like i found the problem

lethal trout
#
const {
    MessageEmbed
} = require('discord.js');
const Discord = require('discord.js')

module.exports = {
    name: "await",
    /**
     * 
     * @param {Client} client 
     * @param {Message} message 
     * @param {String} args 
     * @returns 
     */
    run: async (client, message, args) => {
        message.channel.send('start')
        const filter = m => m.author.id === message.author.id;

        message.channel.awaitMessages({
            filter,
            max: 1,
            time: 10000,
            errors: ['time']
        }).then(collected => {
            message.channel.send('done')
            message.channel.send('start2')
            console.log(collected.first().content).then(() => {
                // message.channel.send('start2')
                // const filter = m => m.author.id === message.author.id;
                message.channel.awaitMessages({
                    filter,
                    max: 1,
                    time: 10000,
                    errors: ['time']
                }).then(collected => {
                    message.channel.send('done2')
                    console.log(collected.first().content)
                })
            })
        })

    }
}```
 TypeError: Cannot read property 'then' of undefined
earnest phoenix
#

then of undefined > then is undefined

#

(Jk I've literally asked for help like 2,000,000 times today. My brain is off atm)

pale vessel
shadow fox
quartz kindle
fierce trail
#

Hi I am a bot developer I developed a bot and submitted it to top.gg will I need to invite the bot somewhere for top.gg to check my bot

cobalt junco
fierce trail
#

K

earnest phoenix
#

i tried nick=reset but not working

glacial vapor
#

Free hosting been strong so far only times when bot was off is when i had something broken or i pushed an update

rustic nova
#

Free hosting is strong? Am I in the wrong dimension? SCmicAAA

glacial vapor
rustic nova
#

Or you getting an unexpected bill

glacial vapor
#

nah

#

CC not even connected on the site

earnest phoenix
#

Help me when

glacial vapor
#

had to disconnect from school internet and switch to mobile internet to connect to my db KEK

south warren
#

@fallow harbor

fallow harbor
#

OMG NO

south warren
#

So what to do

fallow harbor
#

You have to select all permissions except administrator

#

in the part where it is has bot, identify and the other crap

south warren
#

I selected all perms

fallow harbor
#

just select bot

#

and application.commands

fallow harbor
#

awit

#

wait asec

south warren
#

@fallow harbor send me ss

#

I am new

fallow harbor
#

STOP PINGING ME

#

PLEASE

south warren
#

My name taklu

fallow harbor
#

..

south warren
fallow harbor
#

select

#

just bot and application.commands

#

from scopes

south warren
#

You select and send ss

fallow harbor
#

No

#

do it yourself

south warren
#

Ok only one

fallow harbor
#

If you do not know what scopes are

#

learn the basics

south warren
#

Third line second thing

south warren
fallow harbor
#

OH MY GOD

#

THESE

#

THESE ARE SCOPES

#

SELECT THESE FOR YOUR BOT

south warren
#

Ok i now this

south warren
fallow harbor
#

stop pinging 😭

south warren
#

Thanks bro

#

Ok sorry

south warren
fallow harbor
#

you have to also select permissions

#

select all except the first one

south warren
#

I selected all but not administration

fallow harbor
#

yes

#

now that link u got

#

thats ur bot invite link

south warren
#

Thanks

#

Bro

#

God bless you

earnest phoenix
#

help me when

fallow harbor
#

which language do you use

south warren
#

This bot prefix is R! for seeing commands type R!help. This bot is 24/7. I deleted the NSFW command it comes automatically so I deleted it. My bot is a modration bot and multi-function bot. Made by Robo Gamer and we want a team for bot if you a codder I welcome you. If you have any complain or report a bug join our official server and ask me everything. This is not my bot this is our bot.

south warren
fallow harbor
#

OH MY GOD

#

DUDE

#

JS OR PY

south warren
#

Type Noob

fallow harbor
#

what.

south warren
#

Type Pro

#

Bot command

earnest phoenix
fallow harbor
#

also

#

do you know coding

#

any

#

type of coding

#

since if not it will be kinda hard ngl

earnest phoenix
fallow harbor
south warren
fallow harbor
#

i give up

#

bye

#

do it yourself

#

Noone appreciates copying code

#

atleast give credits in the help cmd

#

can anyone tell me how to use hugo themes

#

@frozen sundial

earnest phoenix
#

Help me when when when

fallow harbor
#

i suggest ask in the official djs server

#

gg/djs

cobalt junco
sly sierra
#

that isnt even

#

what

sly sierra
#

is a*

fallow harbor
#

@cobalt junco do .setNickname(null)

cobalt junco
earnest phoenix
frozen sundial
midnight swallow
south warren
earnest phoenix
earnest phoenix
frozen sundial
#

Alright so I've talked a bit with him and I found out that:

  • His bot is based on a template from replit
  • He has added autoresponses when you type Pro/Noob/Raistar - it just deletes your message and responds with some Hindi text that even I couldn't understand
#

And that's pretty much it

#

He says Top.gg is his "dream" and if it gets declined he will add some more things and keep re-submitting it until it gets approved

#

i like being the only indian on all of discord who can actually speak english

old cliff
#

really?

earnest phoenix
#

Hi

old cliff
#

even if thats a joke

earnest phoenix
#

Send me those text I'll tell what they mean

#

👀

frozen sundial
earnest phoenix
#

Me too indian

earnest phoenix
earnest phoenix
#

If some doesn't then that's their choice

stiff lynx
#

guildVanityURLAdd

#

what is this event?

#

I don't know what a vanity is

frozen sundial
#

so I'm 90% sure the event is triggered when an admin creates a vanity url

stiff lynx
slender wagon
#
await profile.guilds.forEach(element => console.log(element.id));

is there a way i could check if the guilds include a id aka my servers id

#

on a foreach function

woeful pike
#

or filter

slender wagon
#

oh

#

i'm dumb

#

i am using oauth2

earnest phoenix
#

so I'm learning c# and I had a question

can c# infer the type of the variable without me having to explicitly define it's type? (like js var)
because this looks pretty much like a string:

string name = "rick astley";

and there's no point for me to put the word string

#

var?

#

so the keyword is var?

jolly notch
#

Easier to develop that way

earnest phoenix
earnest phoenix
#

static types cringe at my code

jolly notch
earnest phoenix
#

another question:
what is the point of char

#

finally
a language that forces double quotes for strings

#

everytime I copy code from stackoverflow

ctrl + g
find '
replace with "
ctrl + enter
replace all matches

#

wait c# has no ===?
so == always has to be the same type?

#

so I have to convert them to the same type before comparing?

vivid fulcrum
#

yes

earnest phoenix
#

I was going to say what if I'm not sure of the type until I realized I have to declare the type

vivid fulcrum
#

you can either ToString() the int or int.Parse the string, the latter is the preferred way as strings are "slower"

earnest phoenix
#

rude

vivid fulcrum
#

c# doesn't have that Thonk

#

int is a keyword not a function

jolly notch
#

Don't help if you can't help

vivid fulcrum
#

yeah

#

TryParse is safer

#

you can't hardcast strings to ints anyway

#

so it's still invalid

jolly notch
#

Still debating between golang and asp for my backend

vivid fulcrum
#

i'd go asp anytime

earnest phoenix
#

i am basically speedrunning w3school's c# course rn

#

the language is like js but with PascalCase functions and static types

#

C# isn't like js ,maybe the sytnax ,but that are 2 different worlds

#

yes

#

so c# is brainfuck?

jolly notch
#

they are twins

slender thistle
vivid fulcrum
#

correct

#

int.Parse is slightly faster but the difference is so small that in practice it generally doesn't matter

slender thistle
#

I see

earnest phoenix
wheat mesa
#

There’s no default export in index.js I’m assuming. You can’t require a variable from another file like that unless you export it

wheat mesa
#

C# is Java but infinitely better

south warren
#

Hi

boreal iron
#

weeew blue background... oh my eyes

clear marlin
#

C# is it's ownself

#

C# is nowhere near like javascript bro

wheat mesa
#

I said Java

severe perch
#

-_-

wheat mesa
#

C# and Java are a lot different when you actually look into it (Like how most of the “primitive” types are actually structs in C#), but on the surface they’re very similar

#

Especially in syntax

severe perch
#

I think your event handler is incomplete because I don’t see client.on there

#

Aniruddh^

earnest phoenix
#

@rose warren

earnest phoenix
#

anyways doing it again

#

:/

shadow frigate
#

Hi, I get the following error when running the code:
TypeError: Cannot create property 'shardCount' on string 'nYIZDVrp9C6JnMvfkaUunFisiSiOxhN1EEoLv5VWPXvvDh4rCjVgDW8rXIMCYehFHSMZ'

Here's the code:

const settings = require("./settings.json");
const { ShardingManager } = require('discord.js');

const manager = new ShardingManager('./handler.js', {
    totalShards: 'auto',
    respawn: 'false',
    token: settings.bot.token
});

manager.spawn(); //Start spawning the shards.

manager.on('shardCreate', shard => {
    
    console.log(`[Shard ${shard.id}] Shard has been launched.`);
    
    shard.on("death", process => {
        console.log(`[Shard ${shard.id}] Shard has been shut down.`);
        require("./Functions/Webhook Logs/shard-death.js");
    });
    
    shard.on("disconnect", () => {
        console.log(`[Shard ${shard.id}] Shard has disconnected.`);
        require("./Functions/Webhook Logs/shard-disconnected.js");
    });
    
    shard.on("reconnecting", () => {
        console.log(`[Shard ${shard.id}] Shard is reconnecting.`);
        require("./Functions/Webhook Logs/shard-reconnecting.js")(shard); 
    });
    
    shard.on("spawn", process => {
        console.log(`[Shard ${shard.id}] Shard has been spawned.`);
        require("./Functions/Webhook Logs/shard-spawned.js")(shard);
    });

});
grim aspen
#
  1. Leaked token? 2. Looking at a forum, try to send the web hook data as an object
shadow frigate
# quartz kindle show full error
E:\Discord Bots\HentaiCord v5\node_modules\discord.js\src\util\Util.js:336
        given[key] = def[key];

TypeError: Cannot create property 'shardCount' on string 'token thingy'
    at Function.mergeDefault (E:\Discord Bots\HentaiCord v5\node_modules\discord.js\src\util\Util.js:336:20)
    at new BaseClient (E:\Discord Bots\HentaiCord v5\node_modules\discord.js\src\client\BaseClient.js:20:25)
    at new WebhookClient (E:\Discord Bots\HentaiCord v5\node_modules\discord.js\src\client\WebhookClient.js:26:5)
    at module.exports (E:\Discord Bots\HentaiCord v5\Functions\Webhook Logs\shard-spawned.js:7:19)
    at Shard.<anonymous> (E:\Discord Bots\HentaiCord v5\start.js:33:61)
    at Shard.emit (node:events:390:28)
    at Shard.spawn (E:\Discord Bots\HentaiCord v5\node_modules\discord.js\src\sharding\Shard.js:135:10)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
shadow frigate
quartz kindle
#

whats your discord.js version?

shadow frigate
#

It was v13

shadow frigate
#

The most recent v13

quartz kindle
#

that code you showed is start.js?

#

show shard-spawned.js

shadow frigate
#

Yeah

#

Not sure about that yet chief

#

Just finished my break haha

#

Give me a couple hours

#

Or whenever I can

#

Will ping u

#

It’s nothing to do with anything in that file btw

#

I removed the webhooks to test

#

Still same thing

#

@quartz kindle

quartz kindle
#

the error says otherwise

shadow frigate
# quartz kindle

That’s because it’s running that file, if I return before it runs the function, that line disappears

#

@quartz kindle

const date = require("../get-current-date.js");
const webhooks = require("../webhooks.json");
const Discord = require("discord.js");

module.exports = (shard) => {

    let webhook = new Discord.WebhookClient(webhooks.shard_log.id, webhooks.shard_log.secret);

    var embed = new Discord.MessageEmbed()
    .setTitle("Shard Spawned")
    .addField("Shard", shard.id, true)
    .addField("Date", date(), true)
    .setColor("00ff28")

    webhook.send(embed)
    .then(sent => { console.log(`[Webhook Logs][shard-spawned] Successfully sent webhook to discord.`) })
    .catch(error => { console.error(`[Webhook Logs][shard-spawned] ${JSON.stringify(error, null, 2)}`) });

}
quartz kindle
shadow frigate
#

Rip

#

What u think then lol

#

Cus I’m clueless

#

It works fine in v12

quartz kindle
#

in v13 thats not how you create a webhook client

#

new Discord.WebhookClient({ id: ..., token: ... })

shadow frigate
#

That’s it?

quartz kindle
#

yes

shadow frigate
#

Right, I’ll give that a go

#

What time is it for you rn?

quartz kindle
#

11:28am

shadow frigate
#

Will you be available to continue this at about 3:00 or 4:00 your time if this doesn’t work?

quartz kindle
#

no idea

shadow frigate
#

You have anything planned? lmao

glacial vapor
#

And epic its working

split hazel
#

nice

glacial vapor
#

Useful to see how big servers the bot gets invited to

#

And how fast servers kick it

earnest phoenix
hybrid roost
#

how long interaction customId can be?

#

can I put some data in button? like.. you know..
if I want to get module and action that button did..

I tried to put in ID as JSON string.. dumb idea.. wrong idea.. it doesn't work

earnest phoenix
#

hi how i pick the var of the servers (guilds) where are the bot?

hybrid roost
#

108 symbols are too many for Discord.. pfft

hybrid roost
earnest phoenix
grim aspen
earnest phoenix
#

ok thxù

#

@boreal iron ty the 301 redirect worked 😄 ,but i occurred at a problem now :C
My Main Domain doesn't redirect http requests to https anymore
My Current Config

<VirtualHost *:80>
    ServerName new.com

    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

    ProxyPreserveHost  On
    ProxyPass /  http://ip:port/ retry=0
    ProxyPassReverse /  http://ip:port/
</VirtualHost>

<VirtualHost *:443>
  ServerName new.com

  ProxyPreserveHost  On
  ProxyPass /  http://ip:port/ retry=0
  ProxyPassReverse /  http://ip:port/

  SSLEngine on
  SSLCertificateFile /etc/letsencrypt/live/new.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/new.com/privkey.pem
</VirtualHost>
boreal iron
#

You forgot to enabled the rewrite engine

earnest phoenix
#

yeah ,lol thx

boreal iron
#

RewriteEngine On

#

Cond

#

Rule

#

In that order

earnest phoenix
#

thx everything works perfect now 😄

boreal iron
#

np

split hazel
#

how do you understand this cryptic config file

boreal iron
split hazel
#

nice

earnest phoenix
coral sigil
#

Are any of your bots getting guildDelete events with most of the guild's properties undefined, only the guildId is visible?

boreal iron
surreal sage
#

Can or be used like this?

if(message.author.id "..." || "...") {};```
wheat mesa
#

No

surreal sage
#

Ight thanks

wheat mesa
#
if(message.author.id === "id" || message.author.id === "id") {
// Code
}
surreal sage
#

yea that's what i have

#

was wondering

#

||= who tf uses this

wheat mesa
boreal iron
wheat mesa
#

Yeah

#

arr.includes("string")

boreal iron
wheat mesa
#

Much easier than using OR

#

Also saves you a lot of time if you have a lot of IDs to compare

earnest phoenix
#

Maybe itsnt modern but works so good

earnest phoenix
#

why does this work on windows but not on linux, returns / on linux

app.set("views", __dirname+"\\views");
#

\\ returns this

boreal iron
#

__dirname just returns / on Linux?

earnest phoenix
#

Error: Failed to lookup view "index.ejs" in views directory "/wServer iews"

boreal iron
#

Does your user even have the permissions to see the absolute path?

earnest phoenix
#

thats the problem

#

this little thing

boreal iron
#

?

earnest phoenix
#

on windows, \ works

#

on linux, it returns that symbol

boreal iron
#

It of course does not on Linux

#

Just replace \ by / in the dirname

#

__dirname.replace(/\\/g, "/")

#

Ahhh fuck discord

earnest phoenix
#

/ works on win and linux lol

#

thanks

boreal iron
#

Now it’s right

#

Yes windows accepts / as well

#

Only Linux does not understand back slashes

hybrid roost
#

how to fix interaction error in button?
just.. how to process it without this message in DS Client

boreal iron
#

interaction error?

#

You mean interaction has failed?