#development

1 messages · Page 1132 of 1

delicate shore
#

but i had few probelms

earnest phoenix
#

that looks ugly as shit

delicate shore
#
var radio = require("./radio.json");
   var rstat = radio[command]
        var inChannel = false;

        if (command === "radio") {
          
          
           msg.channel.send( "__**Available radio stations:**__", function () { 
                for(var fxes in radio) {
                    var info = "**!" + fxes + "**";
                    var usage = radio[fxes].usage;
                    
                    var name = radio[fxes].name;
                    if (name) {
                        info += "\n\t" + name;
                    }
                    
                    var url = radio[fxes].url;
                    if (url) {
                        info += "\n\t" + url;
                    }
                    msg.channel.send(info); // message.author
                }

           });
        }
        
        if (rstat && inChannel) {
                if (bot.voiceConnection.playing) {
                    bot.voiceConnection.stopPlaying();
                }
                bot.voiceConnection.playFile(rstat.url);
                
        }
        ```
karmic compass
#

does anyone know how to make it so when catching an error it doesn't put anything in the console?

#

/shut down

#

heres my coded btw

earnest phoenix
#

don't... print the error

karmic compass
#

const obj = await fetch(`https://api.mojang.com/users/profiles/minecraft/${args[0]}`).then(x => x.json()).catch(() => {message.reply('This is an invalid name!') return})

earnest phoenix
#

Bruh

karmic compass
#

it does that but then it shuts down

delicate shore
earnest phoenix
#

Put a try catch

delicate shore
#

this is what my bot sys

karmic compass
#

good idea

earnest phoenix
#

And don't log it

#

why are you mixing promise pattern and async/await

delicate shore
#

me?

earnest phoenix
#

misterdepth

delicate shore
#

op

earnest phoenix
#

what problem do you have PGamerX

delicate shore
#

u can see

#

it won't say anything

earnest phoenix
#

ill help if the problem ain't dumb KEKW

delicate shore
#

isntead of that

#

ok

#

u can help

earnest phoenix
#

what is the code

delicate shore
#
var radio = require("./radio.json");
   var rstat = radio[command]
        var inChannel = false;

        if (command === "radio") {
          
          
           msg.channel.send( "__**Available radio stations:**__", function () { // message.author
                for(var fxes in radio) {
                    var info = "**!" + fxes + "**";
                    var usage = radio[fxes].usage;
                    
                    var name = radio[fxes].name;
                    if (name) {
                        info += "\n\t" + name;
                    }
                    
                    var url = radio[fxes].url;
                    if (url) {
                        info += "\n\t" + url;
                    }
                    msg.channel.send(info); // message.author
                }

           });
        }
        
        if (rstat && inChannel) {
                if (bot.voiceConnection.playing) {
                    bot.voiceConnection.stopPlaying();
                }
                bot.voiceConnection.playFile(rstat.url);
        }
        ```
#

NOTE I found this on tuotorial

#

and changed it a bit

earnest phoenix
#

Then

#

Bruh

delicate shore
#

if u want original code

#

then i can tell

#

Bruh
@earnest phoenix for what

earnest phoenix
#

NOTE I found this on tuotorial
@delicate shore then the tutorial is wrong

delicate shore
#

oh

#

sure?

karmic compass
#

trying a few things

earnest phoenix
#

Let's of outdated tutorials on YouTube

delicate shore
#

oh

#

:(

#

so now what should i do

#

what's the error

earnest phoenix
#

What are you trying to make also

delicate shore
#

radio comambnd

#

commadn*

#

commadn

#

command*

earnest phoenix
#

so now what should i do
@delicate shore make it yourself

#

radio comambnd
@delicate shore what does it do

#

I'd suggest forking over the $3 for a VPS or just not bothering at all

#

Or just run it locally

karmic compass
#

uh techincally

#

if you have a smaller bot you can use heroku

delicate shore
#

;-

karmic compass
#

but more professional use bots with warn systems and databases then like

#

you probably can't

earnest phoenix
#

It says "No. Not even Heroku." because the free tier is shit

thick gull
#

i hate heroku

tulip ledge
#

Use an old android phone and trn it into a vps

thick gull
#

it’s not good

karmic compass
#

i mean for me its been reliable so far

#

im just using it rn bc

#

i cant get anything else atm but

thick gull
#

im probably just gonna host off of a laptop

#

I have like 6 laptops

karmic compass
#

i'll look into digitalocean tho

solemn latch
#

an android isnt a VPS, it would just be a server at that point

tulip ledge
#

True

solemn latch
#

unless your virtualizing an android

#

which would be intresting

opal plank
#

@karmic compass im here but in and out

karmic compass
#

oh ok

#

i got things to work

tulip ledge
#

Yeah would be cool actually

opal plank
#

solving some stuff in other servers + some irl stuff showing up

karmic compass
#

yeah i thought so

opal plank
#

so its working now?

karmic compass
#

i put most of my code in a try function, and yeah

#

because i did a catch, it terminated bc of the catch, but then i did try and catch, but it terminated because of global variables, and now most of the code is in the try function and ITS WORKINGGG

#

insert undertale showtime music here

opal plank
#

niice

tulip ledge
#

Wait what are u try catching?

#

Cuz try catch is pretty inefficient

#

As it tries the code first znd if theres no errors or issues it runs it

#

Effectively running the code twice making it 2 times slower

cinder patio
#

It doesn't run it twice

#

it runs it once, and if it fails, it runs the catch statement

tulip ledge
#

Oh it was explained to me differently

karmic compass
opal plank
#

yup

#

i hate that it doesn show the glasses ontop though

karmic compass
#

i don't know, seems to be with the api i use

#

i use crafatar

opal plank
#

its fine, the important part is that its working now

karmic compass
#

yeah

#

well thank you for helping me

opal plank
#

*i still hate that it doesnt have my aviator glasses though angeryBOI *

karmic compass
#

let me look at something

tulip ledge
#

Lemme see there might be a way to do it

karmic compass
#

oh looks like it's just with API in general

#

but yeah

#

that would be nice

tulip ledge
#

I’d think u need to add like a parameter or something

#

Idk how it works

#

But it should be possible

solemn latch
#

layers have always been an issue with displaying minecraft chars

tulip ledge
#

Oh

#

Add ?overlay to the url

#

@karmic compass

summer acorn
#
            message.guild.members.fetch().then(async guildMembers => {
                var members = guildMembers.filter(member => member.displayName !== sanitizer(member.displayName));
                var failedMembers = [];
                members.forEach(member => {
                    let newNick = sanitizer(member.displayName);
                    console.log(newNick)
                    member.setNickname(newNick).catch(err => failedMembers.push(member.user.tag));
                });

the nickname isn't being changed, even though the new nickname is different.

tulip ledge
#

Or if ur already specifying things in the url add &overlay

summer acorn
#

There are also no errors for some reason

tulip ledge
#

Any errors,

#

O k

summer acorn
#

even though there are supposed to be 1

vivid plover
tulip ledge
#

Ok this wont solve ur solution but please use let instead of var and I’d also suggest pushing user id’s instead of tags as users can change there tag but not their id’s

#

What does member log?

#

In the for loop

#

foreach loop*

summer acorn
#
  1. lets are not going to not work with what I am doing.
  2. It's a one-time usage for the tags.
karmic compass
#

woopsie

#

went to grab something

#

oh okay let me check tha

#

t

summer acorn
faint prism
#

So hype to switch from my DB being a Json Serialization List<UserRecords> to a proper DB

karmic compass
summer acorn
#

those are the typable versions of them

karmic compass
#

@tulip ledge

#

(sorry for ping)

opal plank
#

postgres ftw @faint prism

tulip ledge
#

Aprixia those are names u need the member object to change the nickname

summer acorn
#

I have the member object

tulip ledge
#

Should work yes @karmic compass

faint prism
#

Well, I can make postgres context with that interface. The issue was my interface sucked previously and wasn't desgined well

tulip ledge
#

Thek why does member log a string?

summer acorn
#

Like literally, 4 of the original amount was changed

tulip ledge
#

And not an object

summer acorn
#

debugging

opal plank
#

how t postgres 101. spam tables. insert shit. done

tulip ledge
#

Log the type of member

summer acorn
#

I logged the nickname to change it to

#

oh for cryin' out loud

solemn latch
#

perfect postgres usage

tulip ledge
#

I asked to log member

summer acorn
#
message.guild.members.fetch().then(async guildMembers => {
                var members = guildMembers.filter(member => member.displayName !== sanitizer(member.displayName));
                var failedMembers = [];
                members.forEach(member => {
                    let newNick = sanitizer(member.displayName);
                    console.log(newNick)
                    member.setNickname(newNick).catch(err => failedMembers.push(member.user.tag));
                });
#

member.displayName

tulip ledge
#

Log

foggy gazelle
#

hey, I'm just wondering. is there a good coding app for mobile? bc i wanna start coding

tulip ledge
#

Member

opal plank
#

perfect postgres usage
ikr lmao

summer acorn
#

obvious object

tulip ledge
#

Oh

summer acorn
#

And I've already logged member

tulip ledge
#

Didnt see that lol

summer acorn
#

none of them are undefined

#

bruh

#

I'll just go ask a cert

tulip ledge
#

Alright then

#

I was tryna help but sure go ahead

silent berry
#

does anyone know any good command handlers for js

summer torrent
#

use framework

silent berry
#

@summer torrent can you link please

summer torrent
silent berry
#

thank you

amber fractal
#

I would suggest that you also learn how to make one, it's a good coding challenge that will also teach you some basics of modules and other basic node concepts

final jay
#

Does anyone know how I can identify in which voice channel the bot is?

summer torrent
#

which lib

solemn latch
#

your libraries docs will tell you how

harsh moon
#

I dont know what I did to fix it but thx for the help guys

faint prism
harsh moon
#

nope

solemn latch
#

why are you using find the djs 11 way and the djs 12 way?

harsh moon
#

I did it in v12

solemn latch
opaque eagle
#

Me over here with eris

solemn latch
#

djs 12 way

harsh moon
#

well thats how it works in v12 lol

#

if it works im not changing it XD

vernal rivet
#

Isn't it message.guild.roles.cache.find or am I just being dumb right now?

misty sigil
#

afaik it is that

faint prism
#

Man offloading ML engine to perspective api would def reduce the CPU overhead

harsh moon
#

well they say it is that but that shit did not work for me

solemn latch
#

well, this is a bad template, others, please just use

guild.roles.create("roledata")
  .then(newRole => msg.member.addRole(newRole))
  .catch(console.error);
#

iirc that should be correct

harsh moon
#

but what if you want certin colors or perms huh

solemn latch
#

create can take role options

harsh moon
#

nah that shit dont work for me

solemn latch
#

nah, you just never did it

harsh moon
#

I already tryed that

solemn latch
#

🤔

#

your code was wrong, which is what we where trying to tell you

vernal rivet
#

What version are you?

solemn latch
#

and its still wrong, you just ifing it into the correct place

#

it works, for the wrong reasons

harsh moon
#

that stuff was returning some bullshit error so either your wrong or my console was having a good smoke of some pot

stiff stream
#
      case 'creatrole':
        message.delete()
        if(!message.member.roles.cache.get('726773901064929313') && !message.member.hasPermission('ADMINISTRATOR')){
            message.reply('you dont have the premissions to use this command!');
            return;
        }
        if(!args[1]) return message.channel.send('you need to type what the role name should be.').then((message) => {
            setTimeout(function() {
            message.delete()
          }, 3500)})
        
        message.guild.createRole(PREFIX.length + "addrole".length)
        break;

what is the problem?

solemn latch
#

we told you exactly what caused those errors

harsh moon
#

and you were wrong everytime

solemn latch
#

but you seemed to focus on the wrong part

#

lmao

vernal rivet
#

Is there an error?

harsh moon
#

I followed all your istructions and had to find it myself

stiff stream
#

Is there an error?
@vernal rivet me?

vernal rivet
#

Both

stiff stream
#

yes

solemn latch
#

you understand, your using functions from both djs v11 and v12 right?

harsh moon
#

the way I fixed it was by using the msg.guild.create

#

not msg.guild.roles

vernal rivet
#

Should be message.guild.roles.create()

harsh moon
#

nope

#

wrong

#

very wrong

stiff stream
#

ty

harsh moon
#

its msg.guild.create

solemn latch
#

the docs say otherwise

harsh moon
#

add the roles it wont work

misty sigil
#

the docs do indeed say otherwise

vernal rivet
#

Guild doesn't have a method called create

solemn latch
harsh moon
#

Im telling you some of that shit someone was smoking some pot while creating it

solemn latch
#

its perfectly correct

#

your just confusing djs versions

stiff stream
harsh moon
#

then why did it not work for me in the latestr version huh

vernal rivet
#

message.guild.roles.create()

solemn latch
#

then why doesnt it work for ron?

#

lmao

misty sigil
#

obv not the latest version

harsh moon
#

oh really you want to play that bs

vernal rivet
#

It's different if you are in v11

stiff stream
#

im in v12

harsh moon
#

im in 12

#

tell me its not the same version

vernal rivet
#

Then it's what I said message.guild.roles.create

harsh moon
#

I dare you

misty sigil
#

it’s message.guild.roles.create()

solemn latch
#

docs say your wrong

harsh moon
#

docs are high af

solemn latch
#

we can go look at the github

#

then

harsh moon
#

all those yt vids or git hub links or other shit everyone was high af

vernal rivet
#

||can also look at the d.js guides||

solemn latch
#

you know the github is where the package comes from right?

harsh moon
#

guides are high af too

misty sigil
#

nah you are by the seems of it

harsh moon
#

then why does my code work then?

vernal rivet
#

What does it look like?

harsh moon
#

tell me why would it work if its wrong?

misty sigil
#

idk but message.guild.roles.create works for me

stiff stream
harsh moon
#

thats right my shit is right

misty sigil
#

and message.guild.create doesn’t

harsh moon
#

it does

stiff stream
#

its make the roles name is "new role"

harsh moon
#

if it did not explain why mine works

vernal rivet
stiff stream
#

how do i make it so it will make the role name what i type

misty sigil
#

docs say your wrong bud

harsh moon
#

I can give you the bot link and show u

stiff stream
#

how do i make it so it will make the role name what i type
@stiff stream

vernal rivet
#

What does your code look like progame

stiff stream
#

me?

vernal rivet
#

Nah, the other person

solemn latch
#

look the code even exactly says its guild.roles.create()

vernal rivet
#

Are you using args Ron?

stiff stream
#

want me to send the code?

vernal rivet
#

Yes

stiff stream
#
      case 'creatrole':
        message.delete()
        if(!message.member.roles.cache.get('726773901064929313') && !message.member.hasPermission('ADMINISTRATOR')){
            message.reply('you dont have the premissions to use this command!');
            return;
        }
        if(!args[1]) return message.channel.send('you need to type what the role name should be.').then((message) => {
            setTimeout(function() {
            message.delete()
          }, 3500)})
        
          message.guild.roles.create(PREFIX.length + "addrole".length)
        break;
#

here you go

harsh moon
solemn latch
#

no one says your code doesnt work

#

lmao

harsh moon
#

shit thats an aactually person

earnest phoenix
#

can you not post your bot invite link

harsh moon
#

sorry dude

earnest phoenix
#

Why my bot not here

vernal rivet
#

You are using args. Just put args[1] in the create method

earnest phoenix
#

Can I add?

solemn latch
#

your bot needs to be approved

earnest phoenix
misty sigil
#

Why my bot not here
@earnest phoenix because it’s not approved

solemn latch
#

before its added here

earnest phoenix
#

Ok

stiff stream
#

?

#

You are using args. Just put args[1] in the create method
@vernal rivet

#

?

earnest phoenix
#

I applied on 3 August

#

Still

stiff stream
#

there?

vernal rivet
#

Yes

earnest phoenix
#

lmao it takes time smh

stiff stream
#

in what part?

solemn latch
#

3+ weeks is the queue time

misty sigil
#

it’s 3+ weeeks lmao

harsh moon
#

I applyed like 10 days ago XD

solemn latch
vernal rivet
#

In replace of everything in ()

stiff stream
#

ok

earnest phoenix
#

Well I just shifted to mongo db

#

ok good for u

solemn latch
#

oo fun stuff

stiff stream
#

the args with ! in the start right?

earnest phoenix
#

Now I wanna shift my quick db commands to mongo is it possible?

#

yes it is

stiff stream
#

In replace of everything in ()
@vernal rivet with ! in the start?

earnest phoenix
#

How to ?

misty sigil
#

yes

earnest phoenix
#

wdym how?

vernal rivet
#

Yes

misty sigil
#

Well uh wdym

earnest phoenix
#

no code has been given and you ask how???

misty sigil
#

if u don’t know how

earnest phoenix
#

Wait a min

#

learn how to use mongodb

#

that's how

#

How do I change the size the image displays in an embed object

stiff stream
earnest phoenix
#

Because

#

How do I change the size the image displays in an embed object
@earnest phoenix use options

#

???

#

Oh wait i got it

hoary umbra
harsh moon
#

like I said you have to use the edit command and have a delay for adding the role to a person

earnest phoenix
#
exports.run = async (client, message, args) => {
  if (!message.member.hasPermission("ADMINISTRATOR")) {
    return message.channel.send(
      "You should have admin perms to use this command!"
    );
  }

  const user = message.mentions.members.first();

  if (!user) {
    return message.channel.send(
      "Please Mention the person to who you want to warn - warn @mention <reaosn>"
    );
  }

  if (message.mentions.users.first().bot) {
    return message.channel.send("You can not warn bots");
  }

  if (message.author.id === user.id) {
    return message.channel.send("You can not warn yourself");
  }

  if (user.id === message.guild.owner.id) {
    return message.channel.send("You jerk, how you can warn server owner --");
  }

  const reason = args.slice(1).join(" ");

  if (!reason) {
    return message.channel.send(
      "Please provide reason to warn - warn @mention <reason>"
    );
  }
  let warnings = db.get(`warnings${message.guild.id}${user.id});
  if (warnings === 3) {
    return message.channel.send(${
        message.mentions.users.first().username
      } already reached his/her limit with 3 warnings);
  }

  if (warnings === null) {
    db.set(warnings${message.guild.id}${user.id}, 1);
    user.send(You have been warned in ${message.guild.name} for ${reason});
    await message.channel.send(You warned ${message.mentions.users.first().username} for ${reason}); //DO NOT FORGET TO USE ASYNC FUNCTION
  } else if (warnings !== null) {
    db.add(warnings${message.guild.id}_${user.id}, 1);
    user.send(You have been warned in ${message.guild.name} for ${reason});
    await message.channel.send(You warned ${message.mentions.users.first().username} for ${reason}`
    ); //DO NOT FORGET TO USE ASYNC FUNCTION
  }
};```
hoary umbra
#

omg

earnest phoenix
#

holy

#

This is the code xS

#

xD

vernal rivet
#

Ummm probably needs to be in a object. Try {name: args[1]}

earnest phoenix
#

I sent my source code

hoary umbra
#

bruh

earnest phoenix
#

i said learn how to use mongodb

#

From where?

#

I wanna learn

#

But couldn't from YouTube

#

docs?

#

google

#

Ok

stiff stream
earnest phoenix
#

Will try

harsh moon
#

remove the !

vernal rivet
#

Oh without the !

stiff stream
#

k

harsh moon
#

..

vernal rivet
#

My bad

earnest phoenix
#
embed:{
   image:{
      url : "spaghetti",
      options : {
          width: 1024,
          height: 1024
}
}
}
#

aren't you supposed to pass data and then the name

#

Have I typed it korrekt

#

uhh

#

Me on mobile can't test

vernal rivet
#

It's the other way around

stiff stream
earnest phoenix
#

Bruh

vernal rivet
#

Still?

earnest phoenix
#

Isn't it supposed to be

harsh moon
#

you have to edit it .....

vernal rivet
#

Where is the doc when I need it

earnest phoenix
#

message.guild.roles.create({
stuff
});

harsh moon
#

you cant create roles witht he name/color/perms...

earnest phoenix
#

that is the syntax right

harsh moon
#

you have to edit them after creating a blank one..

earnest phoenix
#

Use then function

vernal rivet
earnest phoenix
#

How to get developer role

#

.then(role =>{});

solemn latch
#

have a verified bot

vernal rivet
#

Bottom example

earnest phoenix
#

Oh

harsh moon
#

have fun failing if none of you want to listen XD

solemn latch
#

your wrong

earnest phoenix
#

Yep

solemn latch
#

everyone says your wrong

earnest phoenix
#

Also

solemn latch
#

🤷‍♂️

harsh moon
#

enjoy being a failure XD

earnest phoenix
#

ack

#

ackapoo

#

My bot under verification in top.gg + applied for bot verification too

vernal rivet
earnest phoenix
#
embed:{
   image:{
      url : "spaghetti",
      options : {
          width: 1024,
          height: 1024
}
}
}

Me on mobile can't test

#

F you discord

#

Can't out code blocks in quotes

vernal rivet
#

Rip

earnest phoenix
#

Have i put it correct

#

You said i need to put the size inside options

solemn latch
earnest phoenix
#

No

#

I tried the second

#

Lemme just see the docs

vernal rivet
#

It's the second one

stiff stream
#

@vernal rivet ty for helping

vernal rivet
#

Np

earnest phoenix
#

Wrong page i used the embed object

#

Not messageembed

stiff stream
#

is it ok if i will ask one more question?

earnest phoenix
#

Yep

stiff stream
#

thx

earnest phoenix
#

You can ask 100 questions

#

Unless you demand or be rude

stiff stream
#

i will use one and save 99 for later

vernal rivet
#

Don't ask to ask, just ask

earnest phoenix
#

Yep

#

Ask

stiff stream
#

how to i make that the bot will make the role as the color that the person says?

earnest phoenix
#

Umm

#

Do this

vernal rivet
#

arg[2]

earnest phoenix
#

(just a template not spoonfeeding)

vernal rivet
#

args*

#

Lol yea

earnest phoenix
#

WHY THE HECK ARE YOU PUTTING AM EXCLAMATION

#

! means opposite in js

vernal rivet
#

Only use them if your saying not, or opposite

stiff stream
#

tyyyyyy

earnest phoenix
#

so you'll get errors if you use it outaide of if statements

stiff stream
#

there is one morew problem

#

i sayed blue.

earnest phoenix
#

Use hex

#

Or rgb

opal plank
#

also delete() has optional arguments for selt delete

earnest phoenix
#

Make it check if the user sent a common color name

opal plank
#

without needingin to setInterval

earnest phoenix
#

Then make a role with the hex color

stiff stream
#

Make it check if the user sent a common color name
@earnest phoenix how?

vernal rivet
#

Hex

stiff stream
#

how?

earnest phoenix
#

Check if args[2] is equal to a color name

#

I hope you know if statements

vernal rivet
#

You can use a Color package, most accept names, and can convert to hex

earnest phoenix
#

^

solemn latch
#

i belive discord will actually take blue as a color.
it may need to be all caps

earnest phoenix
#

Maybe

vernal rivet
#

That's for embeds

earnest phoenix
#

Discord.js accepts color values for stuff

solemn latch
#

it says it accepts BLUE

vernal rivet
#

I just checked, roles.color is type of number

solemn latch
#

unless the docs are just trolling us

stiff stream
#

like this: if(!args[2]) =
blue
red
yellow
(etc) return;
?
I WILL SET THAT EACH COLOR = TO his name

solemn latch
#

the example is BLUE

vernal rivet
#

Oh it is

#

I am being dumb

solemn latch
#

the github also says BLUE

stiff stream
#

like this: if(!args[2]) =
blue
red
yellow
(etc) return;
?
I WILL SET THAT EACH COLOR = TO his name
@stiff stream ?

vernal rivet
#

I guess it is a string

solemn latch
#

i think discord stores it in a specific format

pale vessel
solemn latch
#

ay

#

yeah

vernal rivet
#

Yee

solemn latch
#

try doing it again but with BLUE @stiff stream

#

not blue

#

brb

vernal rivet
#

Why not BlUe

gusty patrol
#

@earnest phoenix Hello again, did you find a way to launch your bot I'm in wonder

#

I'm sorry 😦

hoary umbra
#

Wait, who is trying to figure out the give and remove roles?

solemn latch
#

a few people

earnest phoenix
#

@earnest phoenix ahm u can't learn a lib or programming language

#

it is infinity

#

ok that acceptable

#

:))

solemn latch
#

ive been working with js for awhile, still learning daily

#

they where working on creating and deleting roles iirc

#

also, the whole, no spoonfeeding rule

pale vessel
#

please upgrade

solemn latch
hoary umbra
#

ffs

#

Sorry for being nice

vernal rivet
#

Rip

solemn latch
#

😻 thanks for trying atleast

hoary umbra
#

mhm

#

10 years later

earnest phoenix
#

pls wait 3weeks+

hoary umbra
#

lol

earnest phoenix
#

u need tu

vernal rivet
#

||100 years later||

hoary umbra
#

😄

earnest phoenix
#

i dont beg u

hoary umbra
#

ok

safe totem
solemn latch
#

your bots page

misty sigil
#

by going to dev portal

solemn latch
nimble kiln
#

You should also get a Discord-System-DM when it reaches 75 servers

safe totem
#

It’s in 75

nimble kiln
#

Unless it got flagged for "inorganic growth" or something, but I'm going too far off topic

safe totem
#

Might take some time

solemn latch
#

they typically send that dm at 76 guilds

#

you can apply at 75 tho

safe totem
#

Okay

ancient falcon
#

how do I embed rust in python

earnest phoenix
#

wat

#

what's the rate limit for deleting channels?

solemn latch
#

probably pretty low for deleting channels

earnest phoenix
#

maybe 10

solemn latch
#

10 what

misty sigil
#

10

solemn latch
#

ok, 10

misty sigil
#

your bot cannot legally delete more than 10 channels /s

earnest phoenix
#

10channels

#

oh okay

solemn latch
#

10 channels ever?

earnest phoenix
#

Are you guessing?

solemn latch
#

10 a minute

earnest phoenix
#

Look at docs

#

Just look docs

#

of discord

misty sigil
#

10 a minute seems reasonable ill check the docs

solemn latch
#

do the docs say ratelimits?

earnest phoenix
#

idk

#

Ye

solemn latch
#

do you mind pulling it up?

#

i was told that wasnt public info

#

and couldnt find it

#

docs said to check the rate parm sent with every response

earnest phoenix
#

Ye

solemn latch
#

you don't get access to those in djs iirc

earnest phoenix
#

You do

#

Ive hit ratelimits a few times (error loop) 😂

solemn latch
#

you get acess to the ratelimit event

earnest phoenix
#

With or without

#

It tells you you’ve been rate limited

#

With an object saying when u can request again

solemn latch
#

so, that doesnt tell you the actual rate limit

#

ie, status changes is 4 per 20 seconds

#

or 5 per 20 seconds, cant remember

earnest phoenix
#

It tells u how many requests uve sent

safe totem
#

Just got the DM from discord, bots getting verified

earnest phoenix
#

Congrats

safe totem
#

Still don’t have the bot dev role here tho idk, it got added earlier

earnest phoenix
#

Just to ruin the fun; your gonna wait like a month or more for it to get verified

solemn latch
#

so, your saying the way you get the ratelimit value is by hitting the rate limit?

earnest phoenix
#

Thats how i remember it

#

But it isnt a fixed value iirc

safe totem
#

I thought they promised 5 day return

earnest phoenix
#

You get heavier punishments as you go iirc

#

@safe totem lol

#

Ive been applied for a month no response

solemn latch
#

generally speaking, you the first ratelimit value is the one you expect

safe totem
#

Damm

stiff stream
#

what is wrong here?

solemn latch
#

i guess ill go hit the ratelimit intentionally to get the ratelimit value

earnest phoenix
#

You tell us, what’s the error?

stiff stream
earnest phoenix
#

@stiff stream first, addField expects 2 values

solemn latch
#

message.user doesnt make any sense does it?

radiant kraken
#

yes i think

earnest phoenix
#

Also why are you using avatarURL()?

solemn latch
earnest phoenix
#

Look for MessageEmbed while you are on docs

solemn latch
#

no .user property

stiff stream
#

Also why are you using avatarURL()?
@earnest phoenix what i should use?

earnest phoenix
#

Look above at what Woo said

solemn latch
#

avatarURL() can be null

earnest phoenix
#

so,you can use displayAvatarURL()

stiff stream
#

i changed it to this

solemn latch
#

message.author.avatar is just an id

#

if you want just an id, thats fine

stiff stream
#

no i want the logo

solemn latch
#

avatarURL() can be null if the User doesnt have one

earnest phoenix
#

Why are you using addField for an image 😖

stiff stream
#

haaaaaaaaaaaa

earnest phoenix
#

use setImage?

solemn latch
#

i really would suggest using the docs

stiff stream
#

i really would suggest using the docs
@solemn latch that you sent?

solemn latch
#

yeah they cover what things do

stiff stream
#

ok ty

#

everything there is to send a link

solemn latch
#

whatcha mean?

jolly wave
#

E woo you are still here

thick gull
#

hello gamers

restive lily
#

@misty sigil hi

misty sigil
#

hello

#

so basically, quick.db is a sqlite based file storage

thick gull
#

im bad at database so i will be stalking you

misty sigil
#

it's better than using a json db

stiff stream
#

whatcha mean?
@solemn latch its not showing what is to send the logo, only links.

misty sigil
thick gull
#

is there any examples i can see

solemn latch
#

if you look at the docs, setfield is for text

thick gull
restive lily
#

ok ty

solemn latch
#

if you want to use an image, you need to set the image

restive lily
#

do u know if it will work with the picture i sent? @misty sigil

solemn latch
#

which you can find by looking at the methods and properties

misty sigil
#

what?

ancient nova
#

does anyone how to make a one-time popup for every refresh to popup (javascript) or css

restive lily
thick gull
#

what ?

slender wagon
#

error: TypeError: message.guild.members.get is not a function

misty sigil
#

nah

ancient nova
#

does anyone how to make a one-time popup for every refresh to popup (javascript) or css

misty sigil
#

its stored in a file

#

that makes it faster afaik

ancient nova
#

hmmmmmmmmmmmm

thick gull
#

im gonna use quick.db looks nice

slender wagon
#

does anyone how to make a one-time popup for every refresh to popup (javascript) or css
@ancient nova i think with the warn thing

thick gull
#

this is why you stalk this server:)

misty sigil
#

yea quick.db is ez

#

mongodb is slight harder

ancient nova
#

no I mean for a website I'm creaing for my bot

slender wagon
#

yes ik

ancient nova
#

I need a one-time warning popup

#

so you know how to make something like that

slender wagon
#
alert("your message here!");
sinful belfry
#

you can just store something in the local storage to say if the user has seen it or not

#

and only display if they havent seen it

ancient nova
#

I need a custom made one

jolly wave
#

I have commands called usercount,servercount, members that are not working idk why

ancient nova
#

I'm using window.prompt

restive lily
#

@misty sigil is there a docs for it or website or video?

jolly wave
#

help

misty sigil
#

theres docs

thick gull
#

There’s a website

misty sigil
thick gull
misty sigil
#

^ that too

ancient nova
#

I need a warning popup, it means that before you enter the website you have to tick that you're 18 year old (something like that)

jolly wave
#

Can anyone help me

misty sigil
#

what do you need

slender wagon
#

error: TypeError: message.guild.members.get is not a function
@slender wagon

jolly wave
#

Still the same

#

Commands that don't work

misty sigil
#

ok

ancient nova
#

a one-time popup window

misty sigil
#

what code

jolly wave
#

BRB

#

I am on phone

misty sigil
#

i do not have a magic crystal ball

jolly wave
#

I'll make a hastebin

#

Wait

ancient nova
#

I don't know the code that's what I'm asking for it

misty sigil
#

use cookies

jolly wave
sinful belfry
#

i don't think cookies would be needed for a onetime popup window

solemn latch
#

well, hold on

ancient nova
#
window.alert("Welcome to Insta House Mom, Best Moderation & Entertainment bot\n\nWarning: The animations of this website may cause symptoms of epilepsy")
solemn latch
#

this site is 18 plus?

ancient nova
#

something like that but with custom-made layout

sinful belfry
#

just store whether they've seen it in the local storage

#

or session storage

solemn latch
#

most 18+ sites you should probably pop it up every time

ancient nova
#

@solemn latch no I wanna create epilepsy warning popup

solemn latch
#

ah

jolly wave
#

ah

#

E

thick gull
#

You should just do it every time you visit tbh

sinful belfry
#

^

ancient nova
#

yeah

jolly wave
#

@misty sigil are u here

ancient nova
#

how do I do that

misty sigil
#

yes i am

solemn latch
#

onload alert

jolly wave
#

Oh

solemn latch
#

?

jolly wave
#

So

ancient nova
#

can anyone send me an example code? can be in css or javascript

misty sigil
#

im just looking at this elseif chain

jolly wave
#

Wdym

#

Ah

misty sigil
#

and 3 message events, and the if you send yes it restarts the bot

jolly wave
#

Yes

#

But the restart command is fine

thick gull
#

gonna try and optimize my code it’s a mess rn

misty sigil
#

and how you just respond to ram

jolly wave
#

The usercount servercount and members aren't

misty sigil
#

using message.content

thick gull
#

last cleanup was yesterday i add a lot of useless things

jolly wave
#

Also ram

misty sigil
#

y'know i'm just pointing out errors that'll get you denied

jolly wave
#

Actually

#

No error in the output

#

Just broken commands

misty sigil
#

instead of this js let ucount = client.users.cache.size message.channel.send('I am currently watching ' + ucount + ' users.') have you tried ```js
message.channel.send(I am currently watching ${client.users.cache.size} users)

jolly wave
#

Let me try

#

But I don't think it will

#

If you look at the broken command called members

#

It's almost the same code

misty sigil
#

did i point out that on line 66, that client.on message you are building an embed for every message sent

jolly wave
#

?

misty sigil
#

i'd advise just putting the profile along with your elseif chain

jolly wave
#

Idk how

eternal flame
#

someone must help me to port forward, i have it forwarded on my router but its still a lh 🤷‍♂️

jolly wave
#

I tried but failed

misty sigil
#
client.on('message', message => {
  const embedProfile = new Discord.MessageEmbed()
    .setColor('#0099ff')
    .setTitle(`${message.author.username}'s Profile`)
    .setAuthor(`${message.author.username}'s Profile`)
    .setDescription(`${message.author.username}'s User Informations`)
    .setThumbnail(message.author.displayAvatarURL())
    .addFields(
      { name: '\u200B', value: '\u200B' },
      { name: 'ID:', value: `${message.author.id}`, inline: true },
    )
    .setImage(`${message.author.displayAvatarURL()}`)
    .setTimestamp()
    .setFooter(`Every stats of ${message.author.username}`);

  if (message.content === "?profile")

    message.channel.send(embedProfile);

})``` and afaik this sends the embed profile every message
#

at least it should

jolly wave
#

I don't understand

misty sigil
#

nice use of displayAvatarURL tho

jolly wave
#

Thx

sinful belfry
#

@eternal flame check your computer firewall to check that it isn't blocking it there

eternal flame
#

where would i find it and what do i do-

sinful belfry
#

you're trying to port forward to your computer, right?

eternal flame
#

im trying to port forward a local host so it cna be public, if thats what you meant then yes

sinful belfry
#

and what is that host

#

your computer?

eternal flame
#

oh

#

yes

solemn latch
#

windows?

eternal flame
#

yessir

sinful belfry
#

check if your antivirus firewall is blocking ports

solemn latch
#

windows has a firewall

sinful belfry
#

or the windows firewall

solemn latch
#

by default

jolly wave
#

hi

solemn latch
#

||hi||

jolly wave
#

How do u do that

ancient nova
#
hi
slender wagon
sinful belfry
#

does this look like the right channel to be asking that?

jolly wave
#

oof no

sinful belfry
#

^

eternal flame
#

ok im making a port rule

#

so

#

would it be

#

private public or domain

slender wagon
#

how do i uninstall a package lmao

eternal flame
sinful belfry
#

npm uninstall [package name]

#

(assuming ur talking about an npm package)

eternal flame
#

i use npm uninstall

#

ye

slender wagon
#

npm uninstall [package name]
@sinful belfry ty and yes i'm

sinful belfry
#

@eternal flame that looks fine

#

pretty sure you can just leave them all ticked

eternal flame
#

ok

sinful belfry
#

but only 'private' is needed

#

(doesn't really matter tho)

eternal flame
#

how do i

#

know if

#

its

#

forwarded

#

just check it on a different device or

sinful belfry
#

there are 'port checker' tools which can tell you

eternal flame
#

yeah im on one now

#

it says its open

sinful belfry
#

but better if you try hosting a webserver and serving a webpage through it on the port

#

epic

eternal flame
#

i need a tutorial on this

#

so

#

as it is

#

right now

#

ive forwarded the port

#

can i access it from a different device

#

it still says local host so

sinful belfry
#

you should be able to do yourip:port

eternal flame
#

im testing on my raspberry pi (great tool for hosting bots) and chromium says this site cant be reached

#

oh

#

ok

sinful belfry
#

and then you can access whatever is listening on that port

#

unless you've specifically created a webserver which loads a webpage, any web browser will not load it

eternal flame
#

so

#

wait

#

ive just done the my ip thing

#

and you have just said this im sure but i dont understand because i stupid

#

is this supposed to happen?

sinful belfry
#

why have you forwarded the port, may i ask?

eternal flame
#

yes

#

oh

#

i thought you asked me

#

im forwarding it so i can make an api with bot stats

#

also

#

maybe later so i can develop a webpage

#

im not that smart tho

#

not yet

sinful belfry
#

ah so do you have a webserver running on that port yet?

eternal flame
#

nope™

#

thats why isnt it

misty sigil
#

yes

eternal flame
#

lemme do that rq

sinful belfry
#

yeah just setup a quick express server or something similar and serve a simple webpage with it

#

that is probs the best and easiest way to check that what you've done has worked

coral palm
#

hey

#

anyone help me here: throw err;
^

Error: Cannot find module 'C:\Users\Utilizador\Desktop\languid-noisy-teller-2020-07-26_170114 (1)\index'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
at Function.Module._load (internal/modules/cjs/loader.js:840:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}

misty sigil
#

hi

coral palm
#

hi

sinful belfry
#

you're requiring a module which doesn't exist

#

you either need to install it or check your file paths are correct

misty sigil
#

It seems he wants to require the index file

#

which has no module

#

but thats afaict

pure lion
#
const verify = require('./privateRoutes')

router.get('/', verify, (req, res) => {
    res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});

//private routes file
const JWT = require('jsonwebtoken');
require('dotenv').config()
const config = process.env

module.exports = function(res, req, next) {
    const token = req.header('auth-token');
    if (!token) res.status(401).send('Access Denied!');

    try {
        const verified = JWT.verify(token, config.secret);
        res.user = verified;
    } catch (e) {
        res.status(400).send('Invalid token');
    };
};

its not running the func and im not sure how to pass in req and res

misty sigil
#

just module(res, req) in your app.get afaik

pure lion
#

inside da ting?

eternal flame
#

im following a yt tutorial and it still nto workin

pure lion
#

dont

misty sigil
#

ye

pure lion
#

use

#

yt

#

™️

eternal flame
#

and i know its an operator issue

#

thats true

pure lion
#

jeremy

torn ravine
#

can I manually shard my bot

pure lion
#

im still getting error but now its h t m l ified

torn ravine
#

I want a shard for dbl because its erroring

pure lion
#

how big is your boat

#

2500?

earnest phoenix
#

gold i told you already not to use your own home ips as your webservers lol

torn ravine
#

like 11 servers

#

lol

pure lion
#

wh-

#

:l

solemn latch
#

maybe a bit early to start sharding

earnest phoenix
#

throw the maybe out

pure lion
#

I want a shard for dbl because its erroring
n o

torn ravine
#

I have a sharding manager so I won’t have to worry about sharding when the time comes

misty sigil
#

a shard one shard for discord bot list

pure lion
#

also lmao helpme ;-;

misty sigil
#

discord bot list shard one single shard for discord bot lsit

#

why would you want that

eternal flame
#

OH WAIT NOOO

#

IT WORKEDD

pure lion
#

f a m e

#

and

#

f o r t u n e

torn ravine
#

my bots errorin on me

pure lion
#

im so close

#

someone gimme help

#

ple

#

se

#

a

solemn latch
#

why not fix the bots error?

#

🤔

pure lion
#

^

eternal flame
#

ok so

#

i have it

#

on a web server

#

now

#

i need tok

torn ravine
#

I don’t think its in my control

eternal flame
#

change the name

#

from my ip

#

to soemthing

#

even wrose

solemn latch
#

you mean a domain?

eternal flame
#

yes

solemn latch
#

you have to buy domains

pure lion
#

freenom

earnest phoenix
#

a domain is just a pointer to your ip

solemn latch
#

excluding freenom

earnest phoenix
#

it's still going to be widely exposed

solemn latch
#

^

pure lion
#

because you cant afford a webserver use freenom x)

solemn latch
#

anyone who has your domain has your ip

earnest phoenix
#

you're asking for your router to be fried or to be dox'd

pure lion
#

anyone who has your domain has your ip
including aeon

eternal flame
#

what have i started

pure lion
#

but bruh im so cose

#
res.status is not a function```
eternal flame
#

so for the webserver

pure lion
#

:)

#

:))))))))))))))))))))))))))))))))))))))

eternal flame
#

oop

pure lion
#

:_)

earnest phoenix
#

that's overpriced

#

lol

eternal flame
#

yeah

#

i have a xyz for 10 bucks a year

pure lion
#

HeLMe

earnest phoenix
#

How does one fix client.shard.id?

#

It comes up as undefined

thick gull
#

question about hosts:

can i just like share a folder from my desktop to a host and edit it without any issues? or is there something else i gotta do

solemn latch
#

it super depends

#

typically, you need to install dependencies

pure lion
#

woo have you any idea how to help?

solemn latch
#

im not sure what your doing ngl

pure lion
#

auth

eternal flame
#

i need someone to help me change it from ip:port to an actual domain

solemn latch
#

you need to get a domain

pure lion
#

use a reverse proxy too

earnest phoenix
#

buy a vps, buy a domain, setup nameservers

eternal flame
#

well i do have 1

earnest phoenix
#

a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with their codes

eternal flame
#

ok so

#

i have a domain

solemn latch
#

okay, then add an a record

earnest phoenix
#

stop trying to host a website from your home address

solemn latch
#

that points to your ip

pure lion
#

i will make aeon ddos you

#

:)

eternal flame
#

i dont plan on keeping it as my ip

#

im not stupid

earnest phoenix
#

someone answers me please

#

a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with their codes

solemn latch
#

just curious, have you made anything yet?

eternal flame
#

yes

#

i have an api

solemn latch
#

you dont really need a domain until your ready to publically share

#

okay, you should REALLY have a host before having a public api

#

api's get a lot of abuse, having it on your home network is a really really bad idea imo

misty sigil
#

also in my opinion

eternal flame
#

abuse as in: ?

pure lion
#

jeeeeermey gheep meeeeeeeee

misty sigil
#

abuse as in: ?
@eternal flame dee doss

eternal flame
#

oh

#

right

solemn latch
#

inb4 banned for impersonating mods

earnest phoenix
#

Hola?

pure lion
#

d e e d o s

solemn latch
#

you can have multiple folders

eternal flame
#

ive never been ddosed or doxed and i dont want to

solemn latch
#

well, your kinda encouraging it

eternal flame
#

youre prob right

solemn latch
#

get a host before doing any of this

pure lion
#

*cries*

earnest phoenix
#

@solemn latch me dices ami?

pure lion
#

i literally want to pass in some shit

solemn latch
#

this is an english speaking server

pure lion
#

and have it work

earnest phoenix
#

sorry sorry

pure lion
eternal flame
#

i have a .xyz domain so

earnest phoenix
#

what I was saying was that if you told me

solemn latch
#

a domain isnt a host

earnest phoenix
#

DDoS & people just being dumb fucks & requesting farrrrr more than they should, even on accident @eternal flame

eternal flame
#

yeah ik

earnest phoenix
#

"Accident"

eternal flame
#

is host gator good

#

or

solemn latch
#

i know a few people that used it, some liked it, some didnt

earnest phoenix
#

Ehh idk personally

eternal flame
#

what host do you use

solemn latch
#

i use galaxygate

#

i really like them

eternal flame
#

ill look at em

earnest phoenix
#

Same here, & they have a dedicated + active Discord server for support

solemn latch
#

they are having some stock issues on their regular vps's should be in stock again sometime in the next week

earnest phoenix
#

They are currently out of stock but ping a mod in their server & they can put in an extra server for you 9 out of 10 times

#

Literally did that yesterday & they did it in like 10 minutes

solemn latch
#

the high frequency stuff is also available too

#

beautiful ryzens pogey

pure lion
#

can hav help?

#

res.status is not a function

#
const router = require('express').Router();
const verify = require('./privateRoutes')

router.get('/', (req, res) => {
    verify(req, res)
    res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});

module.exports = router;
earnest phoenix
#

someone answer me please
a question eh all the codes have to be in the same folder or you can create another folder and run the 2 with its codes
and how would that be? someone explain to me please I'm new to this

solemn latch
#

where are you doing res.status

earnest phoenix
#

codes

pure lion
#
const JWT = require('jsonwebtoken');
require('dotenv').config()
const config = process.env

module.exports = function(res, req, next) {
    const token = req.header('auth-token');
    if (!token) res.status(401).send('Access Denied!');

    try {
        const verified = JWT.verify(token, config.secret);
        res.user = verified;
    } catch (e) {
        res.status(400).send('Invalid token');
    };
};
``` here woo
earnest phoenix
#

Yeah I figured that'd happen

pure lion
#

line 13, in the catch blocc

solemn latch
#

your req and res are backwards

pure lion
#

they aaaaaaaaaaaaare?

solemn latch
pure lion
#

oh nO

#

it works

solemn latch
#

we did it reddit

pure lion
#

strange

#

its not saving the header

#

or something

#
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
```fuck
solemn latch
#

yeah, cant do that

pure lion
#

why cant i have nice things

#

idk what to do x)

solemn latch
#

you should authenticate BEFORE sending stuff

pure lion
#
router.get('/', verify, (req, res) => {
    res.json({ posts: { title: 'my first auth app', description: 'developed by Dice' } })
});

isnt that what this is doing?

eternal flame
#

ok so

#

if

#

should i

#

buy galaxy gate

pure lion
#

oh i know whats up

solemn latch
#

i like them, currently have two of their vps's

eternal flame
#

ok

#

ima buy

solemn latch
#

planning on getting a dedi from them eventually.

torn ravine
#

anyone use mongoose for db?