#development

1 messages · Page 1529 of 1

pure lion
#

@tight plinth they'll add it in 13.x

#

Have you ever used a command line?

quick ridge
cinder sandal
#

this might work

earnest phoenix
#

2012 R2

wanton knoll
#

Anyone have idea about how a bot website is made? weirdsip

quick ridge
earnest phoenix
earnest phoenix
wanton knoll
quick ridge
earnest phoenix
#

why tf would you use windows for a vps

#

İf you know centos

#

Use it

quick ridge
earnest phoenix
#

linux is simple enough

quick ridge
#

for people who have never used linux.

earnest phoenix
#

you can learn how to work linux within 10 minutes

#

windows server is slow

#

you often pay for it more aswell

#

realistically you would use it only if you were dependent on win32 apis

quick ridge
#

Besides, since the features of the computer have not changed, I don't think it will make much difference.

golden condor
#

Hi, I have an issue with my message event. For some reason, my message event doesn't trigger until up to 4 seconds after the message has been sent, and I'm really confused as to why, can anyone help?

marble juniper
#

why would you pay for a server os in the first place

#

just use linux like 99% of all servers I know do

marble juniper
#

or something

golden condor
#

it just happens randomly

marble juniper
#

could be when you use multiple await statements

#

or simmilar

#

but im generally stupid so don't judge me too hard

eternal osprey
#

hey guys

#

i just got a message from Discord.

#

they told me that they had reset my bot token as it made 1000 api calls to discord.com

#

what may be the issue? It's just a normal moderation/music bot.

golden condor
somber wigeon
#

Repl.it if it supports a public bot?

slender thistle
#

Whatever that means

pure lion
#

right im making a website

#

woooo

#

i want to show the content of a dropdown if the screen is wide enough but put it into the dropdown if its not wide enough

earnest phoenix
pure lion
earnest phoenix
#

Ohh, visual studio code?

pure lion
#

yeah, but you can generally use any text editor

earnest phoenix
#

I see

#

Why don’t you make it, so you can scroll down and stuff

eternal osprey
#

hey guys

#

i want to add usernames to the list.

#

how would i do that?

eternal osprey
pure lion
golden condor
quartz kindle
#

how are you measuring those

golden condor
#

Date.now() - message.createdTimestamp

quartz kindle
#

in a client.on("message")?

golden condor
#

yes

quartz kindle
#

do it like this

golden condor
#

No it is taking 5s for the event to trigger

#

Each command is taking about 5s and I don't know why

quartz kindle
#
client.on("raw", packet => {
  if(packet.t === "MESSAGE_CREATE") {
    console.log(Date.now() - packet.d.timestamp)
  }
})
golden condor
#

ok

#

just says NaN

quartz kindle
#

console.log packet.d

golden condor
quartz kindle
#

ah they send the timestamp like that

#

Date.now() - new Date(packet.d.timestamp).getTime()

pure lion
golden condor
#

done

quartz kindle
#

so the problem is not you

#

its your network

golden condor
#

Tried on a vps and locally

eternal osprey
#

hey i am in need of some help

golden condor
#

its local atm

#

but it changes

#

all the time

quartz kindle
#

still, its taking that amount of time for the packet to go from discord to your pc

golden condor
quartz kindle
#

nothing you can do about that

golden condor
#

my vps is in canada tho

#

closer to the api

quartz kindle
#

maybe there is a network issue idk

#

you have to ask them

spiral crag
#

hello does anyone know how to make discord bot join voice channel by id in discord.py

#

?

quartz kindle
#

check the docs for how to get a channel

#

likely client.get_channel()

#

or something

spiral crag
#

i tried it but when i do channel.connect()

#

it doesnt work

quartz kindle
#

show code

spiral crag
#

okay

quartz kindle
#

definitely a network issue on your side

spiral crag
#
    user_voice_channel = bot.get_channel(some_id_here)
    if user_voice_channel != None:
      vc = await user_voice_channel.connect()```
golden condor
#

oh

spiral crag
#

@quartz kindle do you see a problem with my code

quartz kindle
#

no

#

is there any exception? or it simply doesnt connect?

eternal osprey
#

hey

quartz kindle
spiral crag
#

let me check

golden condor
eternal osprey
#

could ```js
0|index | Loading command volume
0|index | Loading command w-filters
0|index | Client disconnect occured at 01-16-21 | 01:17:44 PM.
0|index | Unhandled Rejection:
0|index | Error: Incorrect login details were provided.
0|index | at WebSocketConnection.<anonymous> (/root/moderationklaar/node_ modules/discord.js/src/client/ClientManager.js:48:41)
0|index | at Object.onceWrapper (events.js:421:26)
0|index | at WebSocketConnection.emit (events.js:314:20)
0|index | at WebSocketConnection.onClose (/root/moderationklaar/node_modu les/discord.js/src/client/websocket/WebSocketConnection.js:390:10)
0|index | at WebSocket.onClose (/root/moderationklaar/node_modules/ws/lib /event-target.js:124:16)
0|index | at WebSocket.emit (events.js:314:20)
0|index | at WebSocket.emitClose (/root/moderationklaar/node_modules/ws/l ib/websocket.js:191:10)
0|index | at TLSSocket.socketOnClose (/root/moderationklaar/node_modules/ ws/lib/websocket.js:850:15)
0|index | at TLSSocket.emit (events.js:326:22)
0|index | at net.js:675:12

#

my bot is online but it doesn't do anything

quartz kindle
eternal osprey
golden condor
#

I have pretty decent speeds

eternal osprey
#

cuz that is the only thing that has to do with login details

quartz kindle
#

likely yes

golden condor
#

its 184mbits either way

quartz kindle
#

bandwidth and latency are different things

eternal osprey
#
1|index  | Error: Cannot find module '../events/guildDelete'
1|index  | Require stack:
1|index  | - /root/moderationklaar/util/eventLoader.js
1|index  | - /root/moderationklaar/index.js
1|index  |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
1|index  |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
1|index  |     at require (internal/modules/cjs/helpers.js:74:18)
1|index  |     at rEvent (/root/moderationklaar/util/eventLoader.js:1:27)
1|index  |     at Client.<anonymous> (/root/moderationklaar/util/eventLoader.js:8:34)
1|index  |     at Client.emit (events.js:314:20)
1|index  |     at GuildDeleteHandler.handle (/root/moderationklaar/node_modules/discord.js/src/client/websocket/packets/handlers/GuildDelete.js:9:32)
1|index  |     at WebSocketPacketManager.handle (/root/moderationklaar/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
1|index  |     at WebSocketConnection.onPacket (/root/moderationklaar/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
1|index  |     at WebSocketConnection.onMessage (/root/moderationklaar/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17) {
1|index  |   code: 'MODULE_NOT_FOUND',
1|index  |   requireStack: [
1|index  |     '/root/moderationklaar/util/eventLoader.js',
1|index  |     '/root/moderationklaar/index.js'
1|index  |   ]
1|index  | }
```wtf?
#

everything is in my file

golden condor
#

hold on turns out that something is up with it

golden condor
#

not talking to you

eternal osprey
#

owh lmao

#

PM2 | App [index:1] exited with code [1] via signal [SIGINT]
PM2 | App [index:1] starting in -fork mode-
PM2 | App [index:1] online

#

wtf

#

why is it in fork mode

#

is it fucking hijacked or something

pale vessel
#

what

eternal osprey
#

yeah uhmm

#

look at the above

#

what happened to my bot

#

it is only but does not respond anymore

golden condor
#

Tim I checked the latency as well, its fine

versed shoal
#

moment module

#

it's broken bruh

eternal osprey
#

@pale vessel

golden condor
#

you need to select a locale

#

moment.locale("tr");

versed shoal
#

but it didn't

golden condor
earnest phoenix
#

Uh guys

#

Why does that do this?

#

It gives nothing..

wanton knoll
#

How bot handle loads?
My bot was crashed today due to many people were using it at a moment

eternal osprey
#

can someone please help me

#
/root/.pm2/logs/index-error.log last 15 lines:
0|index    |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:61:29)
0|index    |     at require (internal/modules/cjs/helpers.js:74:18)
0|index    |     at rEvent (/root/moderationklaar/util/eventLoader.js:1:27)
0|index    |     at Client.<anonymous> (/root/moderationklaar/util/eventLoader.js:8:34)
0|index    |     at Client.emit (events.js:314:20)
0|index    |     at GuildDeleteHandler.handle (/root/moderationklaar/node_modules/discord.js/src/client/websocket/packets/handlers/GuildDelete.js:9:32)
0|index    |     at WebSocketPacketManager.handle (/root/moderationklaar/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:105:65)
0|index    |     at WebSocketConnection.onPacket (/root/moderationklaar/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:333:35)
0|index    |     at WebSocketConnection.onMessage (/root/moderationklaar/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:296:17) {
0|index    |   code: 'MODULE_NOT_FOUND',
0|index    |   requireStack: [
0|index    |     '/root/moderationklaar/util/eventLoader.js',
0|index    |     '/root/moderationklaar/index.js'
0|index    |   ]
0|index    | }
#

why can't it find the two modules? It is literally in my bot folder

tight plinth
eternal osprey
#

my bot works again

#

out of the fucking nothing

#

wtf is this?\

#

it randomly stopped working and then worked again...

#

is that the issue of my vps?

earnest phoenix
tight plinth
#

module not found aka it couldnt find smth

#

maybe restart fixed it due to ram

earnest phoenix
#

Why is this doing that btw? It gives nothing lol

eternal osprey
#

but i have put my bot on my vps already.

#

so it couldn't be my vsc.

earnest phoenix
eternal osprey
#

it just randomly stopped working on the vps and then out of the nothing it worked again..

earnest phoenix
#

Yep, happens with me

eternal osprey
earnest phoenix
#

Lol

#

Damn 10k

tight plinth
#

users👏means👏nothing

earnest phoenix
eternal osprey
#

Yeah it is about the servers.

tight plinth
#

nah

#

usage

earnest phoenix
#

Guys?

tight plinth
#

wait

eternal osprey
#

could you bin your code?

earnest phoenix
#

Aw..

tight plinth
#

i-

earnest phoenix
tight plinth
#

hm

earnest phoenix
#

Cant send hastebin not working but here’s the code

#

const { Client, MessageEmbed } = require("discord.js");
var eco = require(quick.db);
const ms = require ("ms");

module.exports = {
name: "give",
staff: true,
/**
* @param {Message} Message
* @param {string[]} args
*/
run (message, args) {
const coins = args[0];
args.splice(0, 1);
const people = message.guild.member(message.mentions.members.first() || message.author);
let balance = eco.fetch(user.coins)

    eco.add(`user.coins_${people.user.id}`, coins)

    let embed = new MessageEmbed()
    .setColor("426795")
    .setDescription("Gave: đŸȘ™ " + coins + " bitcoins to " + `<@${people.user.id}>`)
    .setTimestamp();

    return message.channel.send(embed)
}

}

earnest phoenix
#

What about me?...

eternal osprey
#

i never really used quik.db

#

so i am not sure how to handle this

limpid gyro
#

bcz I just started

#

so thats why

earnest phoenix
#

Ye..

golden condor
#

if I fetched a member in djs, would this fetch the presence as well (provided that the presence intent is on)

pale vessel
#

presences are cached already if you have the intent

#

so yes

wanton knoll
tardy hornet
#

np

#

how mant guilds your bot is in?

#

@wanton knoll

wanton knoll
golden condor
tardy hornet
#

okay so maybe shards isnt the best option

pale vessel
#

ah

wanton knoll
tardy hornet
#

maybe its because the bot is just taking time to load the command

earnest phoenix
delicate bridge
tardy hornet
#

is it suppose to send an image or something ? @wanton knoll

earnest phoenix
#

Why is that doing this it’s not giving anything

delicate bridge
#

i mean host

wanton knoll
earnest phoenix
#

WHAT ABOUT ME?

tardy hornet
#

what command dose take long?

#

the play?

wanton knoll
golden condor
#

what is the withPresences option

pale vessel
#

It's an option for members.fetch()

tardy hornet
#

so yeah, its maybe taking time to find the song and downloading it

#

i guess

golden condor
#

o

tardy hornet
#

just wait

wanton knoll
golden condor
#

it seemed to have come anyway

tardy hornet
#

@wanton knoll maximum do that it will send a message that its taking some time and that they got to wait

earnest phoenix
#

Bruh people just ignoring me

wanton knoll
#

weirdsip ignore

earnest phoenix
earnest phoenix
#

What’s wrong?

#

@earnest phoenix

#

constant people and coins

#

want me to help fix it?

#

See

#

Sure*

placid iron
#

you get the balance but dont add the coins to it

#

đŸ˜©

#

dw

earnest phoenix
placid iron
#

why even get the balance

pale vessel
#

rovi progress on darling c ganyu

placid iron
#

_<

pale vessel
#

cmon

placid iron
#

i have to make my dashboard to add images

#

that is why ive not added them

pale vessel
#

oh

placid iron
#

ive changed how i add them

#

because i created a database of animes and characters with names, nicknames, and i will add the japanese name

#

so it searches from that then gets the fp of an image

#

and they are all just in dir/anime/images/ OmegaKEKW

pale vessel
#

pog

earnest phoenix
#

@earnest phoenix thanks!

#

And uh it’s line 13-16 right?

#

@earnest phoenix

#

Where do I replace it it’s 13 to 16 I replace it right?

#

Yes, so do I remove 13-16 and replace it with that?

#

Or is it 15

#

Alrighty thanks!

#

@earnest phoenix not working

#

Yes...

#

Lol

#

Alr, are you sure it works?

zenith terrace
#

@earnest phoenix needs to be args[1] because args[0] is the mentions

earnest phoenix
#

Oh yeah

#

Let’s try now

#

Still not..

zenith terrace
#

whats wrong with it?

earnest phoenix
zenith terrace
#

whats the error

earnest phoenix
#

A full story

zenith terrace
#

can you scroll up abit

#

in the error

earnest phoenix
zenith terrace
#

@earnest phoenix .mentions.members

#

not members.mentions

earnest phoenix
#

Oh so an s?

#

Lol

zenith terrace
#

message.mentions.members.first()

slender wagon
#

and flip it

earnest phoenix
#

Alr

#

Still not working not giving him anything

zenith terrace
#

whats the new error

slender wagon
#

show the error

earnest phoenix
slender wagon
#

that just shows it loading the commands

zenith terrace
#

iirc .setColour should have the # symbol?

earnest phoenix
#

That’s the only thing it’s showing

#

No it’s not the set color it can break a whole command lol

quartz kindle
#

why

zenith terrace
#

not the main reason here tim lol

tardy hornet
#

@earnest phoenix

#

man

#

i sent the plexidev support server

#

ask them in quick.db channel

#

they will help you

earnest phoenix
#

@tardy hornet can ya send it again?

earnest phoenix
tardy hornet
#

i just did

earnest phoenix
#

I can’t see it..

tardy hornet
#

DMs

#

not here

#

i cant send it here

earnest phoenix
#

Ohh LOL

tardy hornet
#

it will delete it

#

lol

earnest phoenix
#

Thanks!

ebon kettle
#

hello
i am looking for bot who can give me this security
like this verification should come so which bot is this

neat loom
earnest phoenix
#

@earnest phoenix still it can’t effect a full command

#

And I fixed it

#

noice

#

well if you fixed the command congrats

#

imma head out

#

Didn’t fix it Lol

zenith terrace
#

:(

earnest phoenix
#

color go brrrrrrr

#

colour go wat

lusty quest
#

did someone here wrote a eval command using piston? it sounds promising for having a public eval command since it uses an Sandbox code execution engine API

earnest phoenix
#

@lusty quest why do you want to bamboozle people

lusty quest
#

?

#

look into the i run code bot

earnest phoenix
#

why do they have a bot to run code

#

just use an ide man

lusty quest
#

i dont made it

#

someone else did

earnest phoenix
#

what is the purpose for a bot that just runs code

lusty quest
#

it runs code

#

but this is only to showcase the code execution engine

static mirage
#

How do I open a website on a virtual machine using ejs

pure lion
#

just ejs or do you have a different http server like express?

static mirage
#

yes

#

i have

static mirage
near stratus
#

or maybe as an api ?

static mirage
#

i can open like this

#

but how can i do it published?

#

with domain

pure lion
#

oh god

#

im not up for explaining http and dns but here goes

near stratus
#

you want to attach a domain to your site right ?

static mirage
#

yes

pure lion
#

first you need a host

#

do you have a host?

static mirage
#

i want to use virtual machine for host

pure lion
#

okay, that's fine

static mirage
#

i have a virtual machine

pure lion
#

its not local?

static mirage
#

can i open screenshare?

earnest phoenix
#

I suggest using nginx

#

and certbot for free ssl

static mirage
#

can you please come general?

#

oh

near stratus
earnest phoenix
#

it's easy to setup

near stratus
#

if you want to use nameservers you can do that too

pure lion
#

why dont we just use nginx so that you dont expose your port at the domain level

static mirage
pure lion
static mirage
#

this is my virtual machine

near stratus
earnest phoenix
#

I use nginx, cloudflare and certbot

static mirage
#

and now i open localhost:3000

earnest phoenix
#

u can get ssl from cloudflare tho

near stratus
ember badge
#

Good vm

static mirage
#

but im using cloudflare for dns

pure lion
near stratus
static mirage
static mirage
earnest phoenix
static mirage
earnest phoenix
#

use nginx or apache

static mirage
#

i use ejs for code this site

static mirage
earnest phoenix
#

search it

#

i prefer nginx

ember badge
#

How many GB of ram your computer has

lusty quest
#

signed certs are easy to get

earnest phoenix
ember badge
static mirage
#

8

ember badge
#

Oh

#

Lucky

earnest phoenix
#

good enough then

static mirage
ember badge
#

My camputer ram is 4

#

😔

earnest phoenix
static mirage
#

im in here

earnest phoenix
#

or if someone else can explain

lusty quest
#

lol install docker and run it on linux with 2 commands

earnest phoenix
#

since i don't use windows, i'll just refer them to this video

ember badge
earnest phoenix
earnest phoenix
#

actually docker could work on windows

#

if im not wrong

ember badge
lusty quest
#

docker runs linux container on the linux kernel even on windows

static mirage
lusty quest
#

also got now WSL2 support

lusty quest
earnest phoenix
#

the latest versions of minecraft on 4gb ram isn't easy to run

near stratus
ember badge
#

My host gave BSOD error while the virtual machine was also running a virus test. :D

lusty quest
#

if he got no Dedicated GPU he got only 4GB ram

ember badge
lusty quest
#

i where running a few Docker Container on an Turion N40L its maybe even worse than your intel one

#

also depending what RPI he got its possible that the CPU runs at 500Mhz

earnest phoenix
#

how do you make a music bot

ember badge
ember badge
earnest phoenix
#

like what packages do i need in js and stuff

lusty quest
#

so yea you got then 4GB usable ram

earnest phoenix
#

i write in node.js

lusty quest
earnest phoenix
#

didnt ask for it

#

asked if anyone knew

#

seeing as there over 1000 member

ember badge
earnest phoenix
#

someone would know

lusty quest
#

many know it

#

but they are annoying to deal with

ember badge
#

oh Anyone want to try my bot?

#

But I have to warn you because I am a Turk and I coded it as Turkish

lusty quest
#

use a alt account

ember badge
#

:D

ember badge
lusty quest
#

yes

ember badge
#

Why?

lusty quest
near stratus
ember badge
near stratus
#

nah it's okay

ember badge
#

oh sh*t my bot gave an error

#

It may sound silly but what time is it

#

My clock is wrong

lusty quest
#

well since this server here is international someone will answer 1:51

ember badge
#

is it night?

lusty quest
#

for someone yes

near stratus
near stratus
ember badge
#

Oh my clock is 17:52

#

:D

summer dust
#

hello guys youtube keeps banning my ip, i suppose it's because im doing way too many requests for ytdl

#

do you know any fix?

#

i've thought to download for the first time the audio, and playing the song from an audio file the following times

#

but it wouldn't scale very well, and it would limit song duration

#

and groovy seems to be using youtube api a lot, as it is in a lot of servers and there are lots of people using it

#

do you know any fix?

pale vessel
#

bigger bots do ip rotation

#

and bunch of proxies

#

and probably a lot of caching

summer dust
#

yeah, thats another option

#

caching the song instead of downloading it to a file

#

it would reduce a bit the number of requests

wanton knoll
#

There is problem in Max listeners

require('events').EventEmitter.defaultMaxListeners = 25

I removed this related all parts

But now I am getting this message

max listeners limit reached and now it is set to 11

Should I change the Max listeners to any highest digit number (for example: 10,000 something)

pale vessel
#

No

#

you shouldn't have that many listeners

wanton knoll
#

Than I need to find again

near stratus
#

We basically use that tech to ||scam|| people ||like pishing traps|| but it is useful for getting ahead of IP bans
At least better than VPS proxies

feral furnace
#

Hi guys, I need help for stock management in e-commerce platform. Let's think we have one product and this product have only 1 stock. 2 customer add this product to their cart and they went through payment section. One of them paid and bought the product. After this one, how can I avoid sell this product other customer? If you have an idea please tag me or dm me. Thanks 🙂
Addition: Note that: other customer is already in the payment section

slender thistle
#

Well, a decrementing amount attached to the product would make sense

feral furnace
#

Yeah but there is something difficult to catch i edited my message

#

Note that: other customer is already in the payment section

slender thistle
#

Well, the payment hasn't happened yet, has it?

feral furnace
#

When customer clicks "pay" button, I can request API and check stock maybe? Is it the best idea

#

Yeah, one of the customer has bought the item

#

Other was in payment section

#

Other one hasn't paid yet

#

The question is actually the other one should not payable

slender thistle
#

Yeah, when "Pay" is pressed, send a request to the API and see if the product is available

feral furnace
#

I think that is the best option but I asked because maybe there is another ideas better than my idea

quartz kindle
#

you can also mark an item as "reserved" for a specific amount of time

#

which is what booking platforms do

feral furnace
#

Nah, i dont want to reserve item because the customer who has bought in my scenario maybe abandon ordering

quartz kindle
#

the customer wont see its reserved, they will see its out of stock, like the other method

#

just at an earlier stage

#

instead of at the end

drifting wedge
#

with js, how can i change an html style thing?

#

like onclick call func

#

and how can i change the div's background or whatever?

feral furnace
#

you can check it in this section

#

basicly: you will select div by class or id and just use .style

drifting wedge
#

.style ye

#

but what other thing?

#

like element.style === stuff?

feral furnace
#

someElement.style.backgroundColor = "someColor";

drifting wedge
#

oh

#

u big brain

#

does it affect the other stuff in the style tag?

#

it does it just add it?

feral furnace
#

It just adds

pure lion
#

I'm so confused right now

#

trying to set up a new domain with cf and nginx but it just doesn't want to work

#

basic rundown is

lusty quest
#

ahh yes nginx, if you know how it works is nice otherwise its hell

pure lion
lusty quest
#

did you want to use mutiple domains?

#

or just one?

pure lion
#

just one

lusty quest
#

where is the issue?

pure lion
#

the issue is that after i removed all records for the old domain (and the config on my server) it throws that the dns can't be found

lusty quest
#

did you set the DNS record?

pure lion
#

the old domain is off of cloudflare and has no A records

pure lion
lusty quest
#

did the nameserver picked up everything?

pure lion
#

yeah cf registered that it was there and everything

#

can you go to the domains and tell me what you see

lusty quest
#

502 error

#

old one non resolved

pure lion
#

wdym

#

show

pure lion
lusty quest
#

a fricking 502 error for the new Domain

#

the old one doesnt resolve

pure lion
#

the ale-bot one?

lusty quest
#

yes

quartz kindle
#

this is what it shows for cygrind

pure lion
#

go there again

quartz kindle
#

now it works

pure lion
#

bu

quartz kindle
pure lion
#

im crying right now

quartz kindle
#

clear your dns

pure lion
#

oh no shit isnt loading fuck fuck fuckf cujfkc

#

how?

quartz kindle
#

cmd -> ipconfig /flushdns

pure lion
#

didnt work

lusty quest
#

clear your browser cache

quartz kindle
#

then change dns provider

pure lion
#

pain

lusty quest
#

its /flushdns not -flushdns

#

wait nvm

quartz kindle
#

but its says it successfully flushed

lusty quest
#

yea just saw

quartz kindle
#

try changing your dns provider

#

to something like 1.1.1.1 or google dns

lusty quest
#

1.1.1.1 is cloudflare dns

#

8.8.8.8 is google dns

pure lion
#

how do i change providers

lusty quest
#

go to network adapter settings

quartz kindle
#

in your wifi/ethernet adapter options

lusty quest
#

pick your current network adapter

#

then select in the menu ipv4 protocol

slender wagon
#

i think i've got an problem

#
const stars = fetch.find(m => m.embeds[0].footer.text.startsWith('⭐') && m.embeds[0].footer.text.endsWith(message.id)); 
``` working on a starboard and it throws
```Cannot read property 'footer' of undefined```
pure lion
#

ah got it

old latch
slender wagon
#

oh right, time to check it

clever chasm
lusty quest
#

your bot grew to fast

#

so discord flagged the bot

solemn latch
pure lion
#

h u h

#

i have the static dir set up and called but it won't load styles and images from it

#

app.use(express.static("public"));

#

public is a directory btw

#

do i need it to be absolute?

cinder patio
#

yes

pure lion
#

style.css is in the public dir (i made it an absolute path)

#

and so is logo.png

cinder patio
#

and how do you reference it in the html file

pure lion
#

as style.css

cinder patio
#

where's the html file

distant light
#

I want my bot to create a role and then assign it to a member. I know how to create a role and how to assign it when knowing it's id, but when the bot creates a role I won't know the id. How can I do it?

pure lion
#

in a different dir

#

ill try public/style

#

nope didnt work either

lusty quest
pure lion
#

very confused because this was working locally

lusty quest
#

const role = guild.createRole() (idk never used the role creation thing)

pure lion
#

brain do you have an idea?

lusty quest
#

i suck at frontend stuff, and still havent finished any website to be worth getting puplished

pure lion
#

feck

crimson vapor
#

lemme see my code for static

#

@pure lion

pure lion
#

yeah i have that

crimson vapor
#

idfk then LOL

pure lion
earnest phoenix
wanton knoll
#

I am dead now, I wasted 2 hours just to find a stupid line which gives my bot error and still I can't findpandasad

lusty quest
#

at this point i usually suggest to take a break.

sudden geyser
#

I assume the stacktrace doesn't point to anything useful or you don't have one

wanton knoll
#

I am going to sleep nowweirdsip

sweet pollen
misty sigil
pure lion
#

cache has already fucked me over once

misty sigil
#

style.css returns 404

#

is site behind cf?

pure lion
#

also what about logo

misty sigil
#

also 404

pure lion
#

fucking

#

heres the file tree btw

misty sigil
#

cloudflare’s fucked me like that a lot

pure lion
#

any idea on how to fix

misty sigil
#

purge cache

pure lion
#

did

#

just did again

lusty quest
#

set Cloudflare to developer mode, then it will not cache

pure lion
#

not work

pure lion
lusty quest
#

gg then

misty sigil
#

weird

lusty quest
#

develop from local host

pure lion
#

i am

#

it works locally

#

try and access /style.css btw

#

it weirdly throws a nginx 404 and not a cannot GET

lusty quest
#

try the answer

pure lion
#

now both are 404ing

lusty quest
#

both?

pure lion
#

logo and style

earnest phoenix
#

is it possible to extend <Message>.guild using discord.js

pure lion
#

yeah

earnest phoenix
#

using Structures.extend?

pure lion
#

you can do Guild.prototype

earnest phoenix
#

ah ok

river thistle
#

I want to buy a domain name (either .xyz or .dev) do you guys know good (cheap ?) domain providers that also feature free ssl cert ?

umbral zealot
#

You can get free ssl certs with letsencrypt

lusty quest
#

or cloudflare

pure lion
#

superbrain its not working

earnest phoenix
#

yeah and for domain use namecheap

river thistle
#

thanks alot

lusty quest
#

im still not a web dev, and tryed to help,sry

pure lion
#

mannn

zenith terrace
#

But are you a pull stack dev @lusty quest

pure lion
lusty quest
zenith terrace
#

Are you part time pull stack dev 👀

lusty quest
#

im to tired to do this shit rn

zenith terrace
#

Go take a nap then

lusty quest
#

then i wake up at 2 or 3 in the morning

pure lion
#

auric do you have any idea?

river thistle
#

oh looks nice

#

is it only for the first year ?

#

like its first 1$ and then it becomes 9$/year or something ?

pure lion
#

yeah

river thistle
#

f.

umbral zealot
#

That's how domains work, they're usually not cheap

#

I pay $100/month for my 2 main domains - a .dev and a .codes

pure lion
#

evieeeee

lusty quest
#

ive paid 25€ for 2 or 3 years

near stratus
umbral zealot
#

for a .codes or a .dev?

near stratus
lusty quest
#

how much did you get from donations/shop within the bots then?

umbral zealot
#

Which aren't the same, lol

near stratus
#

I sold the .com though

pure lion
umbral zealot
#

You did know each domain registrar can charge different prices, right?

near stratus
near stratus
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

near stratus
sage bobcat
#

One message removed from a suspended account.

umbral zealot
sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

near stratus
pure lion
#

godaddy more like stop me from developing stuff

#

faith do you know why stuff wouldn't load

slender thistle
earnest phoenix
#

what does it take to be a pull stack developer

slender thistle
#

Being able to do both backend and frontend

lusty quest
#

more like being able to use google

near stratus
slender thistle
#
        self._webhooks["dsl"] = {
            "path": path or "/dsl",
            "auth": auth_key or "",
            "func": self._guild_vote_handler
        }

me very smart

pure lion
#

im about to cry can someone please asdghuobasdghipasdipohgpadoihgdsogfh

pure lion
#

i am stuck and i dont know why it keeps throwing 404s at me

#

i have been stuck for the whole day

#

this is so frustrating

near stratus
pure lion
#

one issue after the next

pure lion
#

it does exist but it refuses to load

#

the site works locally

#

it doesnt work on my vps

near stratus
#

show code

slender thistle
#

Are you sure it's not pulling from some other path?

pure lion
#

i am sure shiv

kindred pebble
#

Do you have port forwarding on your network?

pure lion
#

app.use(express.static("public")); this registers the public dir as static

#

when a dir is static it means that its accessible at root

#

however for some reason it doesnt put the files at /logo.png or /style.css

#

just 404s forever

kindred pebble
#

Does it work if you actually put them in that dir?

near stratus
#

try

app.use('/', express.static('public'));
pure lion
#

it was working locally with how i have it

near stratus
#

try it on virtualnv

pure lion
#

what's that

#

also the site is up on my server

near stratus
#

nvm

#

if you do

app.all("/", (req,res) => {
    res.write("hello");
})

do you get any output ?

pure lion
#

yes

#

because it has nothing to do with sending raw data

near stratus
pure lion
#

even though that's where i changed the location to

near stratus
pure lion
near stratus
#

wait I used app.use(express.static('public')) on my VPS and it works

pure lion
#

were you using nginx?

near stratus
#

never heard of it

#

I use Apache

#

it's easier to set up so ....

fierce ether
#

its trying to fetch messages that were deleted after bot is restarted?```js
module.exports = class messageDeleteEvent extends BaseEvent {
constructor() {
super('messageDelete');
}

async run(client, message) {
if (!message.guild) return;
if (message.author.id === client.user.id) return;```

#

how can i fix this?

near stratus
fierce ether
#

im not trying to?

near stratus
#

wut das dat min ?

fierce ether
#

when i restart the bot and delete an old message its trying to grab it

near stratus
fierce ether
#

no

#

goes like this

#
message sent
restart bot 
delete message sent manually
#

its trying to log the event

near stratus
#

oh

fierce ether
#

yet it isnt trying to fetch the message

#

so idk why its trying to log the event

near stratus
#

use a Database like small ones (SQLite)
it should be the only way

fierce ether
#

to do what?

pure lion
#

i dont know if i should go to stack

near stratus
# fierce ether to do what?

Save a delete time in database. and message id
when the bot restarts it'll check if data should be deleted or not

lusty quest
#

nginx is nice, if you know how to configure it, apache is a bit heavyer

fierce ether
#

wait ik the error

#

message.author.id is null

near stratus
lusty quest
#

never fix working code

fierce ether
#

if (!message.author == null && message.author.id === client.user.id) return

#

easy fix

near stratus
earnest phoenix
#

refactoring mmLol

pure lion
#

hey cry

lusty quest
#

well maybe if the code is really shite and you got better and know how to do it more efficent

earnest phoenix
#

i refactor every week and everytime im like god wtf i wrote this

near stratus
lusty quest
#

this is why you use a version control system

pure lion
#

atCry do you know why my files wont load even though they're in a static file and they exist

lusty quest
#

if you fuck it up you can revert to working code

earnest phoenix
#

are the dirs in your code pointing to it correctly

near stratus
feral furnace
#

Guys do you know in discord stream quality, what is the bitrate in standarts?

#

Standart means not boosting server

fierce ether
#

is VIEW_AUDIT_LOGS needed to fetch the audit logs?

earnest phoenix
lusty quest
#

streaming is different or not?

earnest phoenix
#

good point

#

hm

#

well you can easily calculate it yourself regardless

feral furnace
#

720p 30fps is like 2-3k bitrate?

#

same things like twitch?

pure lion
#

this angers me

#

why is it not working now

crimson vapor
#

it worked

#

but now doesnt

#

expressjs btw

fading sorrel
#

hi, i have a question about diceparser, is there a way to make the results show up as icons instead of numbers? assigning numbers to certain images or emojis etc?

lusty quest
#

make a map or object or list and reference a number to an emoji

fading sorrel
#

oh

#

how? any links or guides? i'm a complete noob

#

😄

fierce ether
lusty quest
#

then just call the map or so with the index of the map

#

you can use this way to do the stuff you wanted

fading sorrel
#

oh! lovely i'll have a read 🙂

#

thanks

earnest phoenix
#

if i do git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg will it still work insted of downloading buil packages?
build*

cinder patio
#

this way you're only getting the source code, and you'll have to build it yourself

earnest phoenix
#

ohhhhh

#

ok

#

thanks'

#

Guys, I need help why is it doing this? Btw there is no error

#

which on of these

#

should i install

#

cause i only have 2

#

they're not installs

#

they're just built exes

#

download and run

#

use either

#

yes but when i click them they take me to github

#

for the BTbn

#

one

maiden holly
#

how long does it take a bot to get verified on the server

near stratus
earnest phoenix
#

omg

near stratus
#

wut

lusty quest
#

lol this bcs of a week

#

it used to be 1 1/2 months

earnest phoenix
#

Ik

near stratus
#

mine took 8 weeks lol

maiden holly
#

verified*

earnest phoenix
cinder patio
#

someone has to manually test and inspect your bot

near stratus
earnest phoenix
#

to install it easier

#

can i do it directly in terminal

#

or

near stratus
earnest phoenix
#

ty

near stratus
#

where are you hosting?

earnest phoenix
#

vs code

scenic kelp
#

@maiden holly Can you not spam please

near stratus
earnest phoenix
#

bot hosting?

#

heroku

near stratus
earnest phoenix
#

yea

#

my bot is a mix of fun/moderation and now im working on music

#

so yeah

near stratus
#

@earnest phoenix add this buildpack
https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git

#

it should work fine

earnest phoenix
#

oh ty

#

command prompt riight?

near stratus
earnest phoenix
#

oh ok

#

ty

near stratus
#

You can add it from cmd too but you'll need Heroku cli for this

earnest phoenix
#

ohhh there

#

i did it

#

ty

#

now i dont have to install builds

#

correct?

near stratus
#

it's automatically built when deployed

earnest phoenix
near stratus
#

yeah

near stratus
earnest phoenix
#

k

#

btw im doing this via github

#

so i push using github desktop

#

just saying

near stratus
#

yeah no problem

#

it doesn't have anything to do with GitHub or your code

earnest phoenix
#

yeah so uh

#

i just pushed

#

and make a join command

#

i deployed

#

app

near stratus
#

yeah then

earnest phoenix
#

made a join command

#
@client.command(pass_context=True)
async def join(ctx):
    channel = ctx.message.author.voice.voice_channel
    await client.join_voice_channel
near stratus
#

then ?

earnest phoenix
#

like joins vc

#

a sec

near stratus
#

does it work ?

earnest phoenix
#

a sec

near stratus
#

k

earnest phoenix
#

nope

#

doesnt work

#

rip

#

a sec

near stratus
earnest phoenix
#

let me manually run and see

#

literraly no error

#

it prints bot is online

near stratus
earnest phoenix
#

where do i put this

near stratus
#

it'll show the log

near stratus
earnest phoenix
#

i did

near stratus
#

then type that

earnest phoenix
near stratus
#

It'll show something like this

2021-01-16T17:31:21.470316+00:00 heroku[worker.1]: Cycling
2021-01-16T17:31:21.472537+00:00 heroku[worker.1]: State changed from up to starting
2021-01-16T17:31:22.993210+00:00 heroku[worker.1]: Stopping all processes with SIGTERM
2021-01-16T17:31:23.173011+00:00 heroku[worker.1]: Process exited with status 143
2021-01-16T17:31:49.477599+00:00 heroku[worker.1]: Starting process with command `node index.js`
2021-01-16T17:31:50.062574+00:00 heroku[worker.1]: State changed from starting to up
2021-01-16T17:31:54.070722+00:00 app[worker.1]: Server is up on port : 38679
2021-01-16T17:31:54.834891+00:00 app[worker.1]: Logged in as Plubin#3635!
maiden holly
#

noice

near stratus
earnest phoenix
#

ight then its just the command

#

let me try another way

near stratus
#

k

earnest phoenix
#

ill let you know

near stratus
#

kay

earnest phoenix
#

wait i cant manually run and do it

#

bc build pack is heroku

#

right?

near stratus
#

build pack is Heroku and it enables Heroku to have software that you can manually install on your pc

earnest phoenix
#

yeah

near stratus
#

ok hold on

earnest phoenix
#
@client.command()
async def join(ctx):
    channel = ctx.author.voice.channel
    await channel.connect()

@client.command()
async def leave(ctx):
    await ctx.voice_client.disconnect()```
#

This is code

#

if your wondering

near stratus
#

try running
heroku run bash -a appName

earnest phoenix
#

ok

near stratus
earnest phoenix
#

ok

#

now i run on vscode?

near stratus
#

no

#

run it there

earnest phoenix
#

Holy shoot it works

#

It works

#

It joined vc

#

Holy SHoot

near stratus
#

ooohh

#

congratulations

earnest phoenix
#

ty

near stratus
#

now fix it for auto deploy

earnest phoenix
#

do you think you can help me a bit on the music part

#

yes

near stratus
#

idk how ytdl works on python

earnest phoenix
#

oh

#

yeah but

#

like just to

near stratus
#

I can tell the algorithm though

earnest phoenix
#

ooh yes ty

near stratus
#

Will you use a Database ?
(probably yes cuz Heroku gives only 512 mb ram)

earnest phoenix
#

umm

#

idk

near stratus
#

if you wanna store it then you a gotta use it

earnest phoenix
#

how do i use it

near stratus
#

Which Database are you gonna use ?

earnest phoenix
#

i dont know which one would you recommend

#

i dont really know much of that stuff

#

just the programming and

#

yea

near stratus
#

Since Heroku gives free Postgre you acan try that
I used mongo cuz I used JS

mellow kelp
#

oh heroku has free postgre?

#

poggers

earnest phoenix
#

yes

#

@near stratus i sent a dm for the alt server to test the bot

near stratus
#

Or maybe MySQL ?
you'll have to verify on Heroku though

tardy hornet
#

is there away to make that it will give a user money every x hour
with out the user doing the command
like he need to do it once

#

with quick.db

lusty quest
#

if you use js use a timeout and then query the user (but i would not recommend this since it can hammer your db quite hard)

tardy hornet
#

i did a timer

#

but to get it you got to do the command again

#

can i show you what i did?

#

@lusty quest

lusty quest
#

i go to sleep soon, so rather no. but what i can say is if you would use a proper database or a better way to query sqlite you could do it quite efficent, since with the proper way you can query all entrys at once

gilded olive
#

nothing like tasks.loop() in JS?

#

(tasks.loop does a certain task every time after a specified amount of time)

drowsy grail
gilded olive
#

well @tardy hornet you can try that

stark abyss
#

Does anyone know what this error is

rose warren
#
let values = await client.shard.broadcastEval(`[
   this.guilds.cache.size,
   this.guilds.cache.reduce((acc, guild) => acc + guild.memberCount, 0)
]`)

is returning:

[
  [915, 205629],
  [898, 61653],
  [926, 57295],
  [922, 87661],
  [900, 61358],
  [950, null],
]

Any way of only getting memberCount for available guilds in broadcastEval?

sudden geyser
#

memberCount should never return null, but you can just default to 0 (.memberCount ?? 0 or .memberCount || 0)

rose warren
#

It probably did it because of an unavailable guild

sudden geyser
#

Most likely. Just misleading for the docs to document it as non-null

earnest phoenix
#

If the guild is a problem you would use if (<message>.channel.type == "dm") return;