#development

1 messages · Page 1084 of 1

delicate shore
#

oh

pure lion
#

I have questions about hosting an ejs server

#

If the server port is 6969 can I use any other port or just 6969?

pale vessel
#

you mean express?

pure lion
#

Yeah

pale vessel
#

you can just use any open ports

pure lion
#

Okay cool

#

Now I just gotta figure out how to run my index.js and my app.js

#

:d

#

Also pointing the DNS of my namecheap domain, which ip/port am I using?

pale vessel
#

uhhhh your vps's ip? (for A record)

pure lion
#

Okay got it

#

It's giving me a red rectangle

#

What do i put in the "host" field

lusty quest
#

cloudflare?

pure lion
#

Oh

lusty quest
#

no i ask if you use cloudflare

pure lion
#

Nope

lusty quest
#

usually the host is your IP

pure lion
#

And value?

lusty quest
#

your domain / sub domain

pure lion
#

Alrighttt

golden condor
#

If you want to mask your IP, cloudflare is a good choice (not relevant, I'm just recommending it as I use it for all my domains). They proxy requests and can stop DDoS attacks

pure lion
#

Oo

golden condor
#

Plus it's free

lusty quest
#

you dont need to use it but its anyways a good idea

golden condor
#

^

pure lion
#

Wait is cloudflare free

#

Node hosting?

earnest phoenix
#

cloudflare isn't a host

pure lion
#

e?

earnest phoenix
#

it's just a DNS proxy

lusty quest
#

its a proxy service for DDos Protection

pure lion
#

Oh got it

earnest phoenix
#

almost all services use cloudflare

pure lion
#

Btw for A record the value field is red if I put in my subdomain

lusty quest
#

how does your record looks like? its also possible that you need to set a TTL

pure lion
#

It's on automatic

golden condor
#

What did you put in there? An IP or a domain?

pure lion
#

Value I put IP, host I put @ and TTL 30 mins and there's no errors

golden condor
#

Btw for A record the value field is red if I put in my subdomain
you need to do a cname for this

pure lion
#

Oh got it

golden condor
#

👍

pure lion
#

So now host is the IP and the value is the domain

lusty quest
#

i would suggest to switch to Cloudflare before you start adding DNS records. it can be annoying to migrate later

pure lion
#

Free package okay?

lusty quest
#

(if you want to use it)

#

yes

pure lion
#

Alright, just click add a website?

lusty quest
#

yes

golden condor
#

Yeah

#

You need to change your name servers, cloudflare will tell you what yours are.

pure lion
golden condor
#

Yes

pure lion
#

Sexc

golden condor
#

If you lookup your domain dns once you have moved it to cloudflare, it will show as an IP

#

Which will be cloudflare's proxy

pure lion
#

So now I have a list of the shit on my screen

golden condor
#

Send ss

pure lion
#

A
MX
MX
MX
MX
MX
TXT

#

Okay wait

golden condor
#

Yes they are your existing records

pure lion
#

Cooool

slender wagon
#

can u host discord bots in vercel?

pure lion
#

@golden condor maybeweshouldhurryupandfixthisyummmm

lusty quest
#

looks like a Webspace host.. maybe

golden condor
#

can u host discord bots in vercel?
@slender wagon technically yes

pure lion
#

What do

#

So that aeon can't steal my vps's ip

slender wagon
#

should i give it a try?

golden condor
#

You proxy it

#

Cloudflare proxies it for yoy

pure lion
#

Okay for cname do I include the IP and port?

golden condor
#

You can't do that.

pure lion
#

Oh

golden condor
#

That's not how domains work.

#

Also you have set your IP as 127.0.0.1 and you covered it lmao

#

That's localhost

pure lion
#

x(

earnest phoenix
#

anyone have code of command ban and kick?

golden condor
#

Everyone's local IP is 127.0.0.1

pure lion
#

Which do I use then

earnest phoenix
#

My code doesn't work

pure lion
#

*cries*

golden condor
#

You have to use an actual ip

#

@earnest phoenix we won't spoonfeed.

lusty quest
#

@earnest phoenix any error?

earnest phoenix
#

@earnest phoenix any error?
@lusty quest I already type all | bot don't ban and don't have any error

golden condor
#

Example: 1.1.1.1 is a public IP but 127.0.0.1 and 192.168.x.x are private IPs.

lusty quest
#

i guess your reason could be a issue. or why did you slice at index 22?

pure lion
#

Ohhhhh

lusty quest
#

also you never ban the user

pure lion
#

What can I run in the console to get the IP?

lusty quest
#

did you got a VPS?

pure lion
#

Yeah

golden condor
#

Hold on

#

If you have a vps you should know the ip

lusty quest
#

same IP you use for connecting with SSH

delicate shore
#
    if (!muteRole) {
      try {
        msg.reply(
          `:sheep_dance: No role called Muted found creating one  `
        );
        muteRole = await msg.guild.roles.create({ data: { name: "Muted" } });
        msg.guild.channels.forEach(async (channel, id) => {
          await channel.overwritePermissions(muteRole, {
            SEND_MESSAGES: false,
            ADD_REACTIONS: false
          });
        });
      } catch (e) {
        console.log(e.stack);
      }```
#

this creates a role

#

but don't over write

#

perms

pure lion
#

It doesn't show me the IP, just the connection and port

lusty quest
#

connection?

golden condor
#

What

#

What provider are you with?

pure lion
#

That IP

lusty quest
#

the IP is the ip of your VPS

#

this is the one you need for the A record

golden condor
#

You need the IP of your vps to be able to connect to it?

pure lion
#

UhHhhH

lusty quest
#

you can connect over Domain also

golden condor
#

If you ssh 127.0.0.1 you are just connecting to your own pc

#

you can connect over Domain also
@lusty quest yeah ik

#

I just forgot lol

pure lion
#

Well shit it's my IP

golden condor
#

It's not your ip

lusty quest
#

would be now funny AF if he managed to run a SSH server on his PC and still pay for a VPS

pure lion
#

I mean it shows my IP in acc security

#

Hhhh

golden condor
#

It's localhost

earnest phoenix
#

which provider are you using for your vps

lusty quest
#

@delicate shore Missing Permissions?

golden condor
#

Oh sorry I guess I'll drop everything I'm doing and worship the ground you walk on because you are so important

delicate shore
#

it has

#

admin

lusty quest
#

has the Bot the Permissions to see the Channels?

earnest phoenix
#

I don't know how many times you have to be told to debug your fucking code

pure lion
#

😳

earnest phoenix
#

we're not computers

delicate shore
#

has the Bot the Permissions to see the Channels?
@lusty quest admin

earnest phoenix
#

we cannot evaluate the code

golden condor
#

I don't know why you feel entitled to be helped whenever you need help because you said it, if we are helping someone else, just wait.

pure lion
#

a

golden condor
#

Um

pure lion
#

e

golden condor
#

What vps are you with?

#

Or did you set this up yourself?

#

I'm confused

pure lion
golden condor
#

Pterodactyl isn't a provider

#

That's a panel.

pure lion
#

i cant find where the provider is

#

i think its azure

golden condor
#

Who did you buy it from?

delicate shore
#

where u host the bot

quasi arrow
#

do i have to check if a bot name is available before naming it?

golden condor
#

No, it will tell you if it is unavailable

delicate shore
#

e

golden condor
#

If you want to name it a common name, it will tell you that you can't

quasi arrow
#

👍

lusty quest
#

ohh right this issue @golden condor he got the Bot hosted told him last time already to get the IP

golden condor
#

@pure lion did you buy this server?

pure lion
#

na it was given to me for free by the host of the panel

golden condor
#

Sorry what, I'm confused, can you explain that again (it's too early in the morning) @lusty quest

earnest phoenix
#

uh i really hope you didn't search for a "node host" instead of buying a vps and installing node onto it

#

oh

#

aight

lusty quest
#

i just remembered he wanted to get a domain a while ago but was unable to get the IP of his VPS

#

its not Even a VPS its a docker container running on a Root server

golden condor
#

Iirc, pterodactyl should tell you

earnest phoenix
#

this whole thing seems sketch

lusty quest
#

not the way he got it setup

earnest phoenix
#

yeah

golden condor
#

But this looks like you set it up on your pc

pure lion
#

didnt

lusty quest
#

Ptrodactyl is actually decent for hosting Gameservers. i know a few hosters who use it

earnest phoenix
#

i don't think it's set up properly 💀

pure lion
#

oh no

golden condor
#

I'm pretty confused

pure lion
#

same

lusty quest
#

he got a Host Bride -> Uses same IP as the Host system

earnest phoenix
#

you should just get a cheap vps from a reputable provider instead of going for something sketch

golden condor
#

Can you try type ifconfig in the server

lusty quest
#

will not work

#

its a Docker Container

pure lion
lusty quest
#

will show localhost as ip

golden condor
#

Right

pure lion
#

ohno

delicate shore
#

@pure lion how u got a domain for free

pure lion
#

i didnt

#

x)

lusty quest
#

there are free domains you can get

delicate shore
#

sub domain

#

there are free domains you can get
@lusty quest freenom

lusty quest
#

i know

delicate shore
#

but it alwasy

#

gives me error

golden condor
#

dig +short myip.opendns.com @resolver1.opendns.com

#

Oh wait right won't work

pure lion
#

it returns nothing

lusty quest
#

yea docker is nice for having Services seperated from the Host OS

golden condor
#

Ah shit

lusty quest
#

but annoying to work with if you need infos about the Host

earnest phoenix
#

"free domains" are genuinely bad, a lot of them get flagged for spam and a lot of services ban the TLDs for being widely used by scammers

google also knocks down the domain to low tier search results which means you're never going to have good SEO

golden condor
#

You could go with something like DanBot but I wouldn't recommend it

lusty quest
#

actually you could lookup the Domain of the Host in the Browser console

pure lion
#

ok

lusty quest
#

but i dont think you know how

pure lion
#

nope

golden condor
#

Something is almost always too good to be true if it seems it

lusty quest
#

(its a debugging step for ptrodactyl)

pure lion
#

just gimme da shit

golden condor
#

What is the domain you access it from?

pure lion
#

if it doesnt work ill buy something for my website

#

host.dum.wtf

lusty quest
#

usually press F12 until you get your Browser Debugging Console and search for heartbeats

delicate shore
#

do u need a domain for hosting?

lusty quest
#

iirc

pure lion
#

sexy got it

lusty quest
#

for a website not really but looks better

delicate shore
#

ok

earnest phoenix
#

a domain is just a pointer to the ip

lusty quest
#

also can be used to mask your ip from attacks

earnest phoenix
#

the reason domains are a thing is because it's easier to remember lettering than a bunch of numbers

lusty quest
#

ipv4 is ok but ipv6 is annoying to remember

pure lion
#

where can i find heartbeats :/

golden condor
#

Yes because google.com is easier to remember than 172.217.2.110

#

Which redirects to google.com if you are interested

pure lion
#

i stucc

unreal solar
#

I don't mean to interrupt :/ I've struggling to make a simple check, i'm trying to write a command that only Administrators can use and im floundering

golden condor
#

What lib

unreal solar
#

I'm using the discord.js i've been looking at documentation for the past 4 hours

golden condor
#

I linked the function u need there

lusty quest
#

try something like message.member.permissions.has(`ADMINISTRATOR`)

unreal solar
#

fuuuuuck

#

you're kidding fuck why didn;t i think of that

golden condor
#

Or .hasPermission works as well, whichever you want to use :+1:

unreal solar
#

i was trying to use

#

has & any

pure lion
#

Syntax is && for logical and

lusty quest
#

it can cause issues if the member is not cached when you use .hasPermissions

pure lion
#

So

#

Soooooo

#

Sososososo

#

Better idea to wait for the owner to find the IP if they even have it or look for heartbeats god knows where

#

OH I KNOW WHAT I COULD DO

#

Check my mongodb connections

golden condor
#

Ok

pure lion
unreal solar
#

yo, your fix has fixed literally all of my issues 🙏 thank you kind strangers

pure lion
#

how can i see who connected to my mongodb cluster

golden condor
#

No problem

#

@pure lion you can't

pure lion
#

well shit

lusty quest
#

protect the cluster

#

like allow only connections from your Server as example

earnest phoenix
#

message.guild.id and message.guildID both give errors WHY

#

and there is no documentation on message.guild.id

wary flame
#

Your message object is undefined?

earnest phoenix
#

No

wary flame
#

What error do you get

golden condor
#

@earnest phoenix what lib

earnest phoenix
#

This is what I did in discord.js and it gives the error:
var guildID = message.guild.id;
message.reply(guildID);
This is basically the same but smh doesn't give errors:
message.reply(message.guild.id);

#

@earnest phoenix what lib
@golden condor discord.js

golden condor
#

It might not be in a guild?

wary flame
#

Are you dm'ing the bot

earnest phoenix
#

The error is Cannot read property id of undefined

wary flame
#

Then you are dm'ing the bot?

earnest phoenix
#

No

wary flame
#

Can you show use the whole code? Make sure to exclude your token

#

@earnest phoenix

earnest phoenix
#

Yes i know my index.js file is filled to the brim with clutter

wary flame
#

Can you screenshot the part of the code that is erroring?

#

@earnest phoenix

earnest phoenix
#

one sec i fixed it

wary flame
#

@earnest phoenix what do you use now then?

earnest phoenix
#

I made a hype system for my bot

#

I tried to make it different for every server

#

And amazingly failed

#

So i made it global

misty sigil
#

Is there a way to check for boost?
Lib: discord.js

golden condor
#

Wdym by that @misty sigil

misty sigil
#

server boost

golden condor
#

I mean are you checking how many boosts a server has, who has boosted etc.

misty sigil
#

if the person is boosting

golden condor
#

It should be

finite bough
#

2 easy ways would be check the booster.role.members.size

small peak
#

<GuildMember>.premiumSince is better :/

golden condor
#

member.premiumSince

lusty quest
#

@misty sigil yes

golden condor
#

It will return null if they haven't boosted and a timestamp if they have

lusty quest
#

do you want for user or the count for the guild?

misty sigil
#

for user

tender cargo
#

how can I add a delete msg command

lusty quest
tender cargo
#

tried bulkdelete didnot Wokr

lusty quest
#

did you get an error?

tender cargo
#

ye

wary flame
#

How do I change the background color of the bot long description box?

#

Without fucking up my markdown

honest perch
#

Css

wary flame
#

What class do I use? Adding <style>div.content {background-color: black;}</style> didn't work

#

@honest perch

half bison
#

how to know servercount?

wary flame
#

how to know servercount?
@half bison client.guilds.cache.size (discordjs v12)

ember oak
#

Hey! How can I use other server emojis on my bot? Like how can I use my server emojis on other servers with bot.

half bison
#

ok

pure lion
#

@ember oak if it's animated, then it's like this:
<a :emoji_name: emoji ID >

#

If it's static it's
< :emoji_name: emoji ID >

ember oak
#

Thank you!

pure lion
#

Np

ripe wadi
#

in this example the bot would return "me :)"

honest perch
#

Yes

#

Read the docs

ripe wadi
#

oh wait im dumb

#

i got it

#

actually no

crystal stream
#

Hi guys, can I ask you to add my bot to your servers? (Though empty) For I lack 32 servers to ask for verification from Discord

ripe wadi
#

i dont

pure lion
#

Sup it's me

crystal stream
#

The bot is in Russian, but I plan to add English in the future

pure lion
#

@crystal stream no

#

Go advertise elsewhere

crystal stream
#

Okey

#

Srr

ripe wadi
#

can someone please tell me how i can read the exact status of a user

#

because i tried

#

and it just returns "CustomStatus"

crystal stream
#

Do you mean online or offline?

ripe wadi
#

no

#

like user's custom status

pure lion
#

@ripe wadi it's state (I think)

crystal stream
#

Ahh, I got it

#

I don't know it myself yet

#

Sorry, I don't understand English very well

#

pure lion
#

Idk russian well either ><

crystal stream
#

((This is me to the fact that in my messages I often make mistakes))

ripe wadi
#

i don't think that works

#

it still returns "Custom Status"

earnest phoenix
#

@pure lion try .state

#

not .name

#

.state

pure lion
#

Why did you ping me

#

And I know it's state

earnest phoenix
#

oh wrong ping

#

sorry

pure lion
#

x)it's fine

earnest phoenix
#

@ripe wadi user.presence.activities[0].state

ripe wadi
#

o

#

ill try

#

it works

#

thank you so much my guy

#

<3

earnest phoenix
#

np

pure lion
#

@ripe wadi I'd recommend checking if it's null so you don't add the field

crystal stream
#

How can you display a list of servers on which the bot is located?

#

And their number of participants

sudden geyser
#

What library are you using @crystal stream

tardy cove
#

i use discord js

ripe wadi
#

oh yea i will

#

ty

earnest phoenix
#

Is it API aboose to make my bot DM every single user in the server with a "Hi someone added me to your server" when someone adds it to a server

quartz kindle
#

yes

opal plank
#

'iS iT aBuzE tO mAsS dM UsERs?'

crystal stream
#

What library are you using @crystal stream
@sudden geyser discord.js

sudden geyser
#

Look in the <Client>.guilds.cache collection.

torpid edge
#

does anyone know the documentation or how to make a bot make sound in a vc like octave or rythm

opal plank
#
torpid edge
#

k thnx

opal plank
primal thicket
earnest phoenix
#

stop using json as a database

primal thicket
#

why tho? i think it's easy to use

earnest phoenix
#

because it isn't a database to begin with

primal thicket
#

had no problems with it until now, if it works, why should i exchange it?

earnest phoenix
pure lion
#

There are things easier than json

primal thicket
#

now i understand, thanks

slate wigeon
#

.

earnest phoenix
lusty quest
#

@earnest phoenix what is your issue?

earnest phoenix
#

GuildModel.findOne is not a function

pure lion
#

Ah mongoose

earnest phoenix
#

Getting that error. ^

#

Yessir.

lusty quest
#

im not sure but its possible that it is case Sensetive try Guild

pale vessel
#

isn't it new Schema()?

lusty quest
#

also this ^

pure lion
#

Wait I'll have a look at my crappy retarded poopoo code

earnest phoenix
#

I'm getting the same error: GuildModel.findOne is not a function

pale vessel
#

debug

#

log the model

lusty quest
#

you have an error in your code

pure lion
#

Are you sure you're connecting to the db

lusty quest
#

its new Schema

#

he is

pure lion
#

Add a break point

pale vessel
earnest phoenix
lusty quest
#

ok in your schema is some stuff wrong

earnest phoenix
#

aight imma log the GuildModel then

#

it just logs {}

pure lion
#

Ah

misty sigil
#

great message about json db

pure lion
#

What you're supposed to do

lusty quest
#

ohh wait your model is fine (guild.js)

pure lion
#

const { Guild } = require('./models/guild') // maybe idk it might be a way you're exporting

lusty quest
#

import it as Guild not as GuildModel

pale vessel
pure lion
#

Also it's module.exports

lusty quest
#

yea forget what i said

pale vessel
#

i think it's the model.exports ^

lusty quest
#

nope module.exports

#

this could it be

pure lion
#

Btw any ideas on how to get the IP of my server :/

lusty quest
#

ask the dude who host it

pure lion
#

Offline rn

lusty quest
#

wait

pale vessel
#

wouldn't pinging a website that logs the ip work?

lusty quest
#

since you got a Dockercontainer running a Host Bride

pure lion
#

Flaz how?

lusty quest
#

ping 1.1.1.1 could work

earnest phoenix
#

Also it's module.exports
@pure lion thanks that was the problem.

#

I really appreciate your help guys, thank you. ❤️

pure lion
#

Where do I put it? The console doesn't return anything, ever

lusty quest
#

then rip

pure lion
#

Maybe I could use an exec command

lusty quest
delicate shore
#
  if (command === "lyrics") {
    const Genius = new (require("genius-lyrics")).Client(
  "key")
     

    
    let Name = args.slice(1).join(" ");
const lyrics = new Set();

    if (lyrics.has(msg.author.id))
      return msg.reply(
        `**You are on cooldown you can use this cmd once in 20 seconds. This is to prevent rate limting**`
      );
    
    if(!args[1]) return msg.reply("Tell me a song name")
    
          let first = await msg.channel.send("Loading..Please wait")

    
    Genius.tracks.search(Name).then(results => {
      
     
      let first = msg.channel.send("Loading..Please wait")
     try{
      const song = results[0];
      
      song
        .lyrics()
        .then(lyrics => {
          
          const lol = new Discord.MessageEmbed()
              .setColor("RANDOM")
              .setTitle(`${song.title} Lyrics`)
              .setDescription(
                lyrics.length > 1900 ? `${lyrics.substr(0, 1900)}...` : lyrics
              )
              .setFooter(`Song Creator : ${song.artist.name}`)
              .setThumbnail(song.humbnail)
              .setTimestamp()
        first.edit(lol)
        })```
#

first.edit is not a function?

lusty quest
#

maybe the message is out of scope

delicate shore
#

what

#

does that mean?

#

e

autumn lava
#

@golden vortex

golden vortex
#

Hi

autumn lava
#

Hi

#

:D

golden vortex
#

How are you

autumn lava
#

I'm fine, how are you

golden vortex
#

Fine

pure lion
#

I successfully got IP

#

@lusty quest any idea what to do now?

delicate shore
#

How can I transfer a bot from glitch

#

To Google cloud

lusty quest
#

did you use github?

pure lion
#

Ah shit

delicate shore
#

Do I need to upload

#

It on GitHub

#

did you use github?
@lusty quest
No

lusty quest
#

then install git on your Google VPS

#

then download and upload it

delicate shore
#

What how ?

#

My bot is on glitch

lusty quest
#

yes but did you Uploaded you bot to Github was the question

pure lion
#

a

lusty quest
#

if no idk if you can export it if yes export it and upload it to your VPS

delicate shore
#

no

gray finch
#

It can be exported from glitch

#

But the files are messed up

delicate shore
#

But my project cannot be exporte to GitHub

#

As it was imported

gray finch
#

You download it as a zip

delicate shore
#

From GitHub

gray finch
#

Extract

delicate shore
#

Then ?

gray finch
#

And upload to github

delicate shore
#

Ok ?

#

And env file ?

lusty quest
#

dont upload the env to github

gray finch
#

That's what im saying

#

I just move env data to main index

delicate shore
#

dont upload the env to github
@lusty quest
How will

#

I use it then ?

#

I just move env data to main index
@gray finch
Then u expose it

lusty quest
#

you can create files with linux

gray finch
#

I keep my github private

lusty quest
#

its a normal OS

gray finch
#

No one can touch my files

pure lion
#

e

delicate shore
#

Idk how to use

#

Linux

lusty quest
#

then have fun getting your enviroment running

#

bcs this is a requirement

misty sigil
#

idk how to use linux either

delicate shore
#

;-;

gray finch
#

Why would you need linux lol

misty sigil
#

but i got it working

#

vps runs on linux

delicate shore
#

How ?

lusty quest
#

bcs windows VPS are overpriced

delicate shore
#

How you got it working ?

gray finch
#

I did my bot on win 10, visual studio

misty sigil
#

indeed

gray finch
#

Lol free host at heroku

lusty quest
#

free hosts suck

delicate shore
#

ok

lusty quest
#

he want to make the switch to a proper VPS

delicate shore
#

Mather father manner this ?

gray finch
#

Just add a proc file to your github project

delicate shore
#

ok I export my project to GitHub

#

Without env

#

File

#

Ok ?

#

Then I do something

#

In Google cloud

#

And then how to use Linux for entering my env files ?

gray finch
#

I have 2 bots at heroku running on same dyno for weeks

#

Not even a minute downtime/lag

#

And they big enough

delicate shore
#

They have a limit

#

Of 500 hours per month

gray finch
#

They stream music into my server, and transfer my minecraft chat to discord and the other way

#

You can reach 1000 /month if you just add a fake card

#

And you can create accounts for free

lusty quest
#

this can get you into legal trouble

gray finch
#

No they basically tell you to add a card

#

No verification needed

#

And they give you permanent 1000/month

delicate shore
#

ok

lusty quest
#

you fake a Offical Payment Card -> can be a Federal Crime in some countries

gray finch
#

I put my own card anyway

#

There are a lot of card ids on the internet just for stuff like this

#

But for me heroku works and i'm ok with it

#

They do heavy code 24/7 i'm quite surprised how well work

#

You need 720 hours in a month

#

1000 is more than enough

pale vessel
#

technically it's not 24 hours

honest perch
#

Sounds like legal trouble

gray finch
#

Why is not 24/7?

pale vessel
#

restarts every 24 hours

gray finch
#

It doesn t

slender thistle
#

Did you use random card credentials

gray finch
#

I said you can, but i used mine

slender thistle
#

And encouraging it isn't any better still

delicate shore
#

Yes

gray finch
#

They do nothing with the cards on that website

empty owl
#

How much ram does each discord server use

#

*for bot

lusty quest
#

the Card is used for Identification

gray finch
#

Yea but the ones on internet are always empty

lusty quest
#

i have currently about 175 Guilds and use 95MB of ram (use D.js-light)

empty owl
#

Oh

delicate shore
#

o

#

Wow

pale vessel
quartz kindle
#

ram usage depends a lot on many factors

empty owl
#

212 mb of ram for a simple bot for me 448

gray finch
#

I literally use a bot 24/7 on a live music to my channel

empty owl
#

but my other bot uses 50 mb for 2 servers

lusty quest
#

d.js-light shaves down a lot on caching

gray finch
#

It never disconnect or skip, cause i didnt add functions

lusty quest
#

but tim can tell you more since he made it

quartz kindle
#

there are bots who use 1gb at 100 servers, and there are bots who use 100mb at 3000 servers

empty owl
#

:pog:

quartz kindle
#

it depends a lot on what your bot does

#

and your code, and the library you use

gray finch
#

How do you check ram?

empty owl
#

pm2

#

or something else

#

My server says it on login

quartz kindle
#

there are many ways to check ram, on windows you can use the task manager, on linux you can use top or htop, then you can also use a process manager such as pm2, and you can also get it from inside your process, depending on your language, for example node.js has process.memoryUsage()

gray finch
#

I dont host it

#

I use visual studio, and code javascript

#

but i don t run it from my pc

empty owl
#

What do you run it from

lusty quest
#

visual studio is a editor not a program for running it

gray finch
#

Online host

split nova
#

@quartz kindle u know what it is in python

#

sorry fr tag

gray finch
#

I assume is running on node.js

quartz kindle
#

i dont know about python

gray finch
#

My last deploy was on july 11

#

When i add some updates

split nova
#

ah ok nw

gray finch
#

It's been up since then

#

No daily restart

quartz kindle
#

@empty owl any node.js process uses a minimum of approx 50mb

#

because of the engine itself

empty owl
#

oh okay

#

my server uses 100 mb total because pm2

quartz kindle
#

if you want to see how much memory your actual code is using, including all libraries and files but not including the node.js process itself, use process.memoryUsage().heapUsed

empty owl
#

Got it

quartz kindle
#

if your bot uses voice, or works with images and files, you also need to use process.memoryUsage().external

delicate shore
#

yo @pure lion pls dms

empty owl
#

when you mean files does that include updating sqlite

pure lion
#

Error: listen EACCES: permission denied 0.0.0.0:80
u m

empty owl
#

Files

lusty quest
#

@pure lion what did you want to do?

quartz kindle
#

heapUsed includes the code for sqlite, but not the content of the sqlite database

#

unless you use an sqlite framework or wrapper than caches your database in memory

pure lion
#

super, i tried to start the server

misty sigil
#

you cant hook to port 80

#

without admin perms afaik

lusty quest
#

ohh i just found a Issue

#

you cant use any port

pure lion
#

port 6969 it is

delicate shore
#

can u help me to shift my bot
from glitch to google VPS
my membership expires tom
bot will go down
and not get approved
by top.gg
pls*

lusty quest
#

since you run in a docker Container you are in your case bound to one port unless your host gives you the port you want

celest schooner
#

@delicate shore

delicate shore
#

yes?

celest schooner
#

Is it on GitHub

delicate shore
#

no

celest schooner
#

well I think there’s an option to export to GitHub

#

or something

#

Then

#

You can download node and either clone it

#

or file transfer with winscp or something

lusty quest
#

also taking 1 day for migrating your bot with 0 knowledge about the OS on your new host is a bad idea

celest schooner
#

also taking 1 day for migrating your bot with 0 knowledge about the OS on your new host is a bad idea
^

#

Aren’t most 2 gb ram cheaper than glitch premium

#

Like galaxygate has 2gb for 5 dollars

lusty quest
#

you dont need 2GB even. i use a Digitalocean 1GB droplet and just hit 1 GB with 8 Bots one ShareX uploader and 2 Docker container

celest schooner
#

wait nvm glitch has 5 boosted apps

#

wait wtf 8 discord bots on 1 GB

#

??!???

lusty quest
#

yea?

split nova
#

normal

lusty quest
#

the largest one is at 95MB ram

celest schooner
#

T do you use discord.js light or eris?

lusty quest
#

d.js-light

celest schooner
#

alright

lusty quest
#

but i want to test DiscordGO in the future

celest schooner
#

Is that pretty much the same as discorzjs v12

lusty quest
#

yea but 100% less caching

#

saved me around 200MB ram

celest schooner
#

Is it possible to just switch to discordjs light without changing anything

lusty quest
#

there are a few changes compared to d.js V12

#

since nothing is cached exept guilds you need to fetch users and channels

celest schooner
#

Oh

#

So you can’t use .channels.cache.get()

#

right

lusty quest
#

you can if its cached

#

fetch caches the fetched channel / user if you dont disable it

celest schooner
#

Oh

#

do you use pm2 for all the processes?

lusty quest
#

but it gives you way more control about what is getting cached and when its released from the cache

#

yes

celest schooner
#

Alright I’ll try it out

lusty quest
#

also i run jemalloc for a better ram allocator

#

(not on all processes)

pure lion
#

okay its listening at port 6969

#

but when i put in ip:port it times out

lusty quest
#

is the port linked to your Container?

pure lion
#

its in home/container

lusty quest
#

yes but is the port Allocated to your Container

#

@earnest phoenix did you want to relay messages between Guilds?

pure lion
#

the allocated port to the connection is 6969

lusty quest
#

did your Application listens to the port?

pure lion
#

it creates the server and logs "listening at port 6969"

lusty quest
#

@earnest phoenix this is not as simple. are you familar with a langauge?

#

@pure lion and in ptrodactyl the port 6969 is Allocated to your container?

pure lion
#

i have no idea

#

it just says that the server connection port is port 6969

lusty quest
#

yea this is your Application not your container

pure lion
#

okay

lusty quest
#

if it is not Allocated the Host system will not Pass requests to the port into your container or outside of your container

pure lion
#

does the ip package have port stuff

lusty quest
#

idk

pure lion
#

hmmmmmmmmmmm

mystic orbit
#

asxp

#

as-xp

astral birch
lusty quest
#

br

#

<br> should create a new line

royal portal
#

yes it does

astral birch
#

<br> should create a new line
@lusty quest works, thank you

crystal stream
#

Look in the <Client>.guilds.cache collection.
@sudden geyser
Thz :з

rocky hearth
#

can I use a discord emoji as a author icon image in embeds?

torn ravine
#

@rocky hearth i think you can if you get the emoji image link

rocky hearth
#

@torn ravine So how can I get the emoji image link

delicate shore
#
internal/modules/cjs/loader.js:960  
  throw err;
  ^

Error: Cannot find module 'quick.db'
Require stack:
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\index.js
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\index.js:15:12)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Harjap\\Downloads\\accurate-thin-mango-2020-07-25_134817 (extract.me)\\index.js',
    'C:\\Users\\Harjap\\Downloads\\accurate-thin-mango-2020-07-25_134817 (extract.me)\\server.js'
  ]
}
PS C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)> ```
#

i installed code from glitch

#

and i even did npm install

#

do install packages

#

but did not work

torn ravine
#

@delicate shore use a pastebin service

delicate shore
#

i even did npm i quick.db

torn ravine
#

npm install —save quick.db?

delicate shore
#

npm ERR! arg Argument starts with non-ascii dash, this is probably invalid: [ '—save', 'quick.db?' ]

celest schooner
#

you have to reinstall all the modules

lusty quest
#

--save

torn ravine
#

its just the way iphones types dashes

sudden geyser
#

You should also remove the ? at the end

solemn latch
delicate shore
#

i did

#

but did not work

#

still same error

#
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)> node .
internal/modules/cjs/loader.js:960  
  throw err;
  ^

Error: Cannot find module 'quick.db'
Require stack:
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\index.js
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\server.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
    at Function.Module._load (internal/modules/cjs/loader.js:840:27)
    at Module.require (internal/modules/cjs/loader.js:1019:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\index.js:15:12)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Module.require (internal/modules/cjs/loader.js:1019:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Harjap\\Downloads\\accurate-thin-mango-2020-07-25_134817 (extract.me)\\index.js',
    'C:\\Users\\Harjap\\Downloads\\accurate-thin-mango-2020-07-25_134817 (extract.me)\\server.js'
  ]
}```
lusty quest
#

on wich os?

delicate shore
#

os?

lusty quest
#

on windows you need the build tools

delicate shore
#

what is that

#

but @lusty quest in package.json everyhting is there

#

i just checked

#
    "@discordjs/opus": "^0.3.2",
    "abort-controller": "^3.0.0",
    "asynckit": "^0.4.0",
    "canvas": "^2.6.1",
    "combined-stream": "^1.0.8",
    "covid": "^0.0.1",
    "covid-live": "^1.0.0",
    "covidapi": "^0.5.0",
    "delayed-stream": "^1.0.0",
    "discord-jokes": "^1.0.12",
    "discord.js": "^12.2.0",
    "discord.js-commando": "^0.10.0",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "fs": "^0.0.2",
    "google": "^2.1.0",
    "http": "^0.0.0",
    "mime-db": "^1.44.0",
    "mime-types": "^2.1.27",
    "moment": "^2.27.0",
    "node-fetch": "^2.6.0",
    "novelcovid": "^3.0.0",
    "prism-media": "^1.2.2",
    "setimmediate": "^1.0.5",
    "simple-youtube-api": "^5.2.1",
    "tweetnacl": "^1.0.3",
    "worldometer-coronavirus-info": "^2.2.6",
    "yt-search": "^2.0.0",
    "ytdl-core": "^3.1.1",
    "zealcord.js": "^1.1.2",
    "quick.db": "^7.1.1",
    "genius-lyrics": "^3.0.0",
    "weather.js": "^0.1.0",
    "weather-js": "^2.0.0",
    "google-translate-api": "^2.3.0",
    "node-superfetch": "^0.1.10",
    "cheerio": "^0.22.0",
    "twemoji-parser": "^13.0.0",
    "figlet": "^1.5.0",
    "request-promise-native": "^1.0.8",
    "request": "^2.88.2",
    "random-puppy": "^1.1.0",
    "imageapi.js": "^1.0.5",
    "discord-welcome": "^2.0.1"
  },
  "optionalDependencies": {
    "@discordjs/uws": "^10.149.0"```
#

this all

#

is installed

pale vessel
#

why

#

do you even use commando

opal plank
#

im in confusion

#

property name doesnt exist in channel? wot?

lusty quest
#

you got a ? before name

opal plank
#

so?

pale vessel
#

optional chaining

opal plank
#

that means it can be null

lusty quest
#

yea but in your eval its missing

opal plank
#

es2020

#

its the same

pale vessel
delicate shore
#

but why does it

#

says

#

modules

lusty quest
#

hmm. on now im confused too

delicate shore
#

missing?

opal plank
#

? is conditional chaining

#

istead of checking if its there or not

lusty quest
#

yea i know

opal plank
#

es11 iirc

#

or node 14

#

i think it was added on js now

#

either way

#

name is not a property from channel?

#

it is thoe

sudden geyser
#

What are you looking for Lor

#

Like is your source code good? What do you want to be "good".

opal plank
#

tryitandsee

solemn latch
#

Depends how you start it

delicate shore
#

how can i install

#

all dependencies

#

at once

sudden geyser
#

why do you have so many

delicate shore
#

with npm install?

#

why do you have so many
@sudden geyser me?

sudden geyser
#

just run npm install

#

and yes

delicate shore
#

just run npm install
@sudden geyser in which file

#

because i ran it 3 times

#

nothing happend

lusty quest
#

delete your node_modules folder

delicate shore
#

should i run it in package.json

solemn latch
#

Package.json is a file.
Commands run in folders

delicate shore
#

delete your node_modules folder
@lusty quest there is no

#

such folder

solemn latch
#

You should get an alt to do that with @earnest phoenix
Ban commands take awhile to test, you cant expect others to sit there with you

lusty quest
#

did you got a package.json in the folder?

delicate shore
#

did you got a package.json in the folder?
@lusty quest yes

opal plank
#

@earnest phoenix hand here rq?

earnest phoenix
#

Oh hey

opal plank
#

hey dude, sorry for ping

earnest phoenix
#

It's ok

opal plank
#

have you ran into this before?

#

importing Discord and setting messagea as a Discord.Message type

earnest phoenix
#

Hmm what the, that's Suspicious

delicate shore
#

did you got a package.json in the folder?
@lusty quest i have 2
package.json and package-lock.json

opal plank
#

ikr!

#

im looking in the classes but im not finding anything

lusty quest
#

there is something wrong in what you do

delicate shore
#

me?

opal plank
#

kinda clueless now tbh

lusty quest
#

@delicate shore is your current directory the root directory of your bot? (powershell)

delicate shore
#

tthis is

#

the

#

everything

opal plank
delicate shore
#

@delicate shore is your current directory the root directory of your bot? (powershell)
@lusty quest wym
like
see the ss

rocky hearth
#

can anybody suggest me a free chatbot api, that can respond to the user?

lusty quest
#

this is the folder not the Powershell /commandline

#

google got one

#

but you need to train it

earnest phoenix
#

@opal plank well... Does that messagea.attachments or whatever doesn't error?

delicate shore
#

i got the problem

opal plank
#

nope

delicate shore
#

i never did npm install --save

opal plank
#

its just channel name

delicate shore
#

now i did

earnest phoenix
#

Hmm

delicate shore
#

and it might work

fiery drift
#

hi

delicate shore
#

as it created a folder

#

this time

normal kraken
#

guys when i do import pygame it doesn't work it shows a error in the console when i start it up with pycharm.

fiery drift
#

کوردی تێدیە

opal plank
#

i had to patch guild and client, but neither showed this error with properties

delicate shore
#

no

weary ridge
#

Umm guys you know how if you wanna add a login feature to your website and you get the discord auth and redirect it back to ur web how do I code it to actually log me in?

solemn latch
#

Auth is a complex subject best read from the discord dev site

normal kraken
#

( I have pygame obviously installed and it is installed on python but for some reason it sends me a error )

weary ridge
#

Hmm true

earnest phoenix
#

@opal plank idk much about typescript but what does that <message>.channel? with question mark mean

solemn latch
delicate shore
#

hey @lusty quest what should i do i wanna host bot at my end and i keep getting this error

weary ridge
#

Thanks

solemn latch
#

Np

delicate shore
#

and i am not getting

#

what u said

opal plank
#

? is conditional operator

#

so channel can be null/undefined without error

earnest phoenix
#

Oh

opal plank
#

if it tried to read name from channel(but channel is undefined/null) it returns undefined instead of error

normal kraken
opal plank
#

its the same as js if(channel) channel.name

solemn latch
#

Pygame needs to be installed i presume

normal kraken
#

cause i have pygame installed and it isnt working for some odd reason

delicate shore
#

is quick.db even available?

earnest phoenix
#

@opal plank but it's getting the property of the current channel the message was sent in isn't it?

weary ridge
#

What is pygame lol

normal kraken
#

pygame is a python addon that allows you to make games

delicate shore
#

quick.db is there in vsdc

weary ridge
#

Is it where you code an actual game?

delicate shore
#

or not

opal plank
#

indeed

solemn latch
#

Depends on how you start it

normal kraken
#

@solemn latch i have pygame installed but it isnt working for some odd reason

solemn latch
#

🤷 I dont know python

weary ridge
#

pip

earnest phoenix
#

@opal plank so you don't need to check if it's null or undefined... Because the channel the message was sent in can't possibly be null or undefined

quasi hearth
#

Lor4nd, does ctrl+c work?

weary ridge
#

Gtg

normal kraken
#

rip

opal plank
#

well yeah, thats true

#

i was just trying some stuff to see whats the issue

#

it gets methods from channel class just fine

#

but not name

earnest phoenix
quasi hearth
#

what are you running your bot in?

opal plank
#

its the property thats funky

#

though Js runs just fine

solemn latch
#

Lol

#

What command

quasi hearth
#

if it is in a shell, ctrl+c should stop the process

earnest phoenix
#

ctrl+c is the copy
@earnest phoenix ctrl + c, closes the session, ctrl + d closes the window

delicate shore
#

isn't windows build tools installed with vsdc already

opal plank
#

this is whats bugging me

#

it sees id but not name property

earnest phoenix
#

hehe

opal plank
#

dm indeed i dont think have channel names

misty sigil
#

yes

delicate shore
#

now pls help me

opal plank
#

but even slapping a conditional there doesnt help if its null

delicate shore
#
Require stack:
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\index.js
- C:\Users\Harjap\Downloads\accurate-thin-mango-2020-07-25_134817 (extract.me)\app\server.js```
opal plank
#

and either way it should point me out it CAN be null

delicate shore
#

this is what i keep getting

misty sigil
#

install quick.db

opal plank
#

its simply saying it doesnt exist

earnest phoenix
#

@earnest phoenix , right click

solemn latch
#

How are you running the bot

earnest phoenix
#

@opal plank well... Maybe just check like this
if(<channel>) <channel>.name? I have no other possible idea of how else would this be fixed

misty sigil
#

you're running it on vsc?

delicate shore
#

you're running it on vsc?
@misty sigil yes

misty sigil
#

then turn it off using SQUARE

#

up at the top

delicate shore
#

its simply saying it doesnt exist
@opal plank i did npm isntall 100 times!

misty sigil
#

npm i quick.db

#

there

#

do that

#

in cmd

delicate shore
#

i did that

#

as well

solemn latch
#

With terminal in the right dir?

opal plank
earnest phoenix
#

Bruh wtf

opal plank
#

its not much of a 'is it there'

#

conditional should work just like that

#

its screaming that name isnt a property from Channel Class

delicate shore
#

With terminal in the right dir?
@solemn latch yes

opal plank
#

though it is

delicate shore
quasi hearth
#

just ignore it?

delicate shore
#

i installed

#

that

opal plank
quasi hearth
#

@earnest phoenix your bot should be offline now

earnest phoenix
#

Well... This is why i don't mainly use Typescript... LULW

opal plank
#

lmao

quasi hearth
#

im pretty sure, since you already closed the process

opal plank
#

i might go harass the people over at d.js guild and see if they got smoe clues

delicate shore
#

😭

opal plank
#

but ty either way @earnest phoenix

delicate shore
#

i did that also erwin

quartz kindle
#

you need to type cast it or something

opal plank
#

sorry for the ping

delicate shore
#

still same error

quartz kindle
#

channel as GuildChannel/TextChannel

earnest phoenix
#

Np lol

opal plank
#

wait what

#

oh tim's here

#

lemme try that @quartz kindle

delicate shore
#

erwin i did that still error

earnest phoenix
#

Tim's here to save the day

quasi hearth
#

yes

quartz kindle
opal plank
#

@delicate shore im not talking to you mate, struggling myself with a Ts error currently

delicate shore
#

what

#

how

#

did u see

#

that

earnest phoenix
#

@opal plank wot???

delicate shore
#

and how to fix that

quartz kindle
#

its in the logs you posted... just read it

delicate shore
#

ok

opal plank
#

fuck

#

pinged the wrong person

quartz kindle
#

you need to install windows-build-tools

delicate shore
#

how with npm?

opal plank
#

@earnest phoenix was meant to PG, sorry

#

he pinged me

delicate shore
#

do i need to install using npm if not the how

quartz kindle
#

npm install -g windows-build-tools from an admin powershell

delicate shore
#

this right

#

alr

#

thansk

#

@quasi hearth

solemn latch
#

No

#

Its installing

delicate shore
#

ok

#

ok

digital ibex
#

anyone know why im getting this error? TypeError: req.next is not a function

#

the code is just..

#
res.render('html/signup', { message: 'An error occured, please try again.'});
opal plank
#

LMAo

pure lion
#

whAt

opal plank
pure lion
#

🍿 learning time let's go

digital ibex
#

lmfao

#

thats amazing

quartz kindle
#

messagea?

earnest phoenix
quartz kindle
#

lmao

quasi hearth
#

well req.next is not a function. are you calling that somewhere in your code?

opal plank
#

yeah messagea as a different variable

digital ibex
#

nope

opal plank
#

otherwise it screams redeclaring

#

cuz im already using message

quartz kindle
#

ah its on a promise

digital ibex
#

its saying the line the error is coming from is 117

quasi hearth
digital ibex
#

oh

#

1 sec

delicate shore
#

it has installed

#

the vsc thingy

#

alrdu

viral spade
#

in discord.js, how can i know for a given member, who is in a voicechannel, when was the last time he was speaking?

misty sigil
#

Anyone know how I can fetch someone not in cache? (djs v12)

solemn latch
#

You'd need to track that yourself id think @viral spade

digital ibex
#

change ur clients options

solemn latch
#

Fetch

digital ibex
#

fetchAllMembers: true

solemn latch
#

no just fetch

#

Lol

digital ibex
#

o?

opal plank
#

or request via client.api

solemn latch
#

Fetch requests from the api

misty sigil
#

yes

#

but message.guild.members.fetch works right?

solemn latch
#

Yeah

quasi hearth
#

@digital ibex Are you calling res.render multiple times?

digital ibex
#

no

solemn latch
#

Its a promise

delicate shore
digital ibex
#

yeah

#

but not in the catch

solemn latch
#

Python takes awhile to install

quasi hearth
#

thats whats causing the issue

delicate shore
#

Python takes awhile to install
@solemn latch but i had python 3. somehting installed

#

already

digital ibex
#

also, i log typeof req.next it says function

misty sigil
#

ok ill try it with the m => m.user.tag === stuff

earnest phoenix
#

!msg.member.permissions.has(['MANAGE_SERVER']) -> Invalid bitfield flag or number.

misty sigil
#

its MANAGE_GUILD

solemn latch
#

Python 3 isn't python 2.7

earnest phoenix
#

thanks brav

misty sigil
#

np

delicate shore
digital ibex
#

im doing it like this though

delicate shore
#

@solemn latch ^

digital ibex
opal plank
#

why do i have a feeling im being 200% dumb here?

solemn latch
#

Python 3.7 isn't python 2.7

#

Lmao

delicate shore
#

does it need both?

quasi hearth