#development

1 messages · Page 985 of 1

quartz kindle
#

when the bot sends the embed?

vale garden
#

no

#

talking to me right?

quartz kindle
#

yes

vale garden
#

no i just want it to be displayed

#

lol

hasty sparrow
#

The author's icon?

vale garden
#

yep

earnest phoenix
#

I want to know how to create roles
@inland aurora same tbh

quartz kindle
#

you want to add an image to the embed that is not an author image?

#

use .setImage()

vale garden
#

no

#

see

solemn latch
earnest phoenix
#

how do I see how many servers my bot is in?

vale garden
#

like this

#

but its the authors pfp

quartz kindle
#

thats an author image

#

just set it

vale garden
#

yeah ik

#

but

#

only links work

#

for it

quartz kindle
#

yes

vale garden
#
 UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
embed.author.icon_url: Not a well formed URL
#

i got this error

solemn latch
#

Message.author.avatarUrl

hasty sparrow
#

What did you set as URL?

quartz kindle
#

avatarURL()

winter basalt
#

@solemn latch ight

solemn latch
#

Or is it avatarURL

vale garden
#

message.author.displayAvatarURL

quartz kindle
#

its a function

#

()

vale garden
#

oh

#

ok great thnx

hasty sparrow
#

Should've called it "getDisplayAvatarURL", some odd method/property naming clashes

solemn latch
#

I thought it was just
avatarURL

#

Get seems to apply to collections anyway

quartz kindle
#

avatarURL returns null if the user doesnt have one afaik

solemn latch
#

Ah

#

Your right

quartz kindle
#

displayAvatarURL returns the default discord avatar

solemn latch
#

I remember having that issue

slender thistle
#

It doesn't return a default- oh

solemn latch
#

Well, I got some things to fix now

quartz kindle
#

lmao

oblique void
#

how does a bot get verified

honest perch
#

by waiting

mental spade
#

@hasty sparrow i have changed the code to see the correct information.. but still just shows the highest role and not what was removed

#

Would you like to see the new code?

hasty sparrow
#

If you want help with it, sure

mental spade
#

This is the response im getting on any role changes add/remove and the role its adding to is Mod Manager Staff

earnest phoenix
#

Eddie its like a logger?

mental spade
#

Yes @earnest phoenix but also includes other functions

#

But this section of code is really combuzzling me.

hasty sparrow
#

That code makes no sense

#

You check whether the oldMember's role cache contains the oldMember's role

mental spade
#

?

hasty sparrow
#
oldMember.roles.cache.every(function (value) {
  let role = oldMember.roles.cache.find(role => role.id === value.id);
  ...
});
earnest phoenix
#

What the...

wicked pivot
#
if(message.mentions.users) client.messages.math(key, "+", 1, "mentions");```how do you know if a message contains a mentions?
mental spade
#

So would removing the cache from oldMember roles fix the issue?

hasty sparrow
#

What? No

mental spade
#

... im really struggling with this.. sorry 😦

hasty sparrow
#

For removed roles: For each oldMember role, check whether the newMember still has it
For added roles: Do the inverse

#

You had it correct the first time round, just your role conditional was wrong

mental spade
#

Right...

hasty sparrow
#

I'd suggest using .each instead of .every

mental spade
#

So use the same code as earlier just changing it to .each?

hasty sparrow
#

And check whether the role wasn't found, previously you always checked whether it was

mental spade
#

Ok let me have a shot and try it.

earnest phoenix
#

@mental spade when ur bot is done let me know or dm me a inv link i need a logger, i have been looking for 1 for long

mental spade
#

Ok will do @earnest phoenix

#

Thank you @hasty sparrow got it working

earnest phoenix
#

Ahh im not really sure which channel to write this in but does anyone know a good site where I can host a bot 24/7 on

solemn latch
#

any VPS host

#

I use GalaxyGate, because they are cheap, and i have no problems with the service
plus free backups
PogSpin

midnight pike
#

heroku is a free place for hosting your bot 24/7

visual sandal
#

What's the best way to check if 2 arrays are different in JS? would it just be a for-loop indexing thru the arrays or is there something I forgot? lol

solemn latch
#

I've only heard bad things about heroku

slender thistle
#

Won't === be efficient

solemn latch
#

If (array1 === array2)

visual sandal
#

jonin_derp ok

#

nope, it just runs every time

earnest phoenix
#

@midnight pike not 24/7

#

when your dyno runs out

#

they make you pay

copper cradle
#

no

slender thistle
#
[1,2,3] === [1,2,3]
false
``` ok
quartz kindle
#

@earnest phoenix ?

copper cradle
#
[1,2,3] === [1,2,3] && console.log('true');

will never run

earnest phoenix
#

@quartz kindle youre was said remove node modules yesterday

quartz kindle
#

to fix what?

leaden rover
#

I need to find a way to use AWS for my bot, but I have Windows 10 Home :/

obtuse stone
#

do u have a old pc with windows 7 or 10 pro?

leaden rover
#

no

obtuse stone
#

u can use the key on ur pc

leaden rover
#

I don't have one

obtuse stone
#

oh then google free win 10 pro keys 😂

#

jk

leaden rover
#

no

#

ok

solemn latch
#

windows 10 pro keys are like $5 on ebay

obtuse stone
#

facts

leaden rover
#

I can't buy that

obtuse stone
#

bruh

leaden rover
#

2 reasons:

  1. It may be a scam
  2. I don't have the money
solemn latch
#

since when does ebay not side with the buyerr 99% of the time

#

🤔

#

true that

leaden rover
#

Is there an alternative to AWS? I do need to get my bot for 50+ servers

#

Heroku might not be good

solemn latch
#

people use heroku, but ive heard nothing but bad things

obtuse stone
#

here

leaden rover
#

for the free thingy

obtuse stone
#

lol

summer torrent
#

google cloud

leaden rover
#

bruh

#

ok

obtuse stone
#

wait thats home

leaden rover
#

Is google cloud paid?

obtuse stone
#

im dumb

summer torrent
#

it gives you $300 for use

solemn latch
#

i think they give like $300 in free credit or something

leaden rover
#

ok

solemn latch
#

i wonder whats the biggest bot using googles free credit

leaden rover
#

Is there specific settings I need to set? My bot does use ffmpeg

leaden rover
#

ok

river thistle
#

posting bot stats returns bad request with the dbalapi.js module :|

solemn latch
#

whats your code?

earnest phoenix
#

is there anyway to make the bot online 24/7?

quartz kindle
#

a server

#

or leave your computer on 24/7

earnest phoenix
#

option 2: no thanks lmao

solemn latch
#

VPS's are cheap

#

$3-$5 vps's can run a small bot no problem

plush escarp
#

@solemn latch Are you here? I have a question. Check ur DM's

languid pollen
#

Is it possible to customize the existing help-command in discord.py or do i have to make my own?

solemn latch
#

I suggest making a dynamic help command

solemn latch
#

that way, whenever you change something/add a new command, the help command dynamically and automatically adds the new command

languid pollen
#

Aah

mental spade
#

@hasty sparrow may i pm

lusty quest
#

did someone got here a good tutorial for getting x.509 perm files for mongodb? the offical docs are not really helpful

digital ibex
#

hi

#

quick question, how can i make this black thing go more down

#

with css

digital ibex
#

(if that makes sense lul)

lusty quest
#

it says to me i need a x509 cert but not really tell me how to get one

earnest phoenix
#

TypeError: kickMember.hasPermission is not a function

const kickMember = message.mentions.users.first() || client.users.cache.get(args[0]);
        if (kickMember.hasPermission('ADMINISTRATOR')) {
            return message.channel.send({
                embed: {
                    color: colours.error,
                    description: `${kickMember} has \`Administrator\` and cannot be kicked.`,
                },
            });
        }```
#

I have never had this issue

sacred wraith
#

Wouldn't work if the id was wrong and there was no mention..

earnest phoenix
#

i have given a mention

#

lemme try something

#

oh it must be a member property

sinful belfry
#

@digital ibex you could just add a linebreak above the part you want to move down?

#

idk if it is the best way to do it...

digital ibex
#

oh, but how would i do the actual moving down?

sinful belfry
#

what is it supposed to be?

#

like a footer? or sticky footer?

digital ibex
#

but the black bit going down

sinful belfry
#

oh is it like a page separator?

digital ibex
#

kinda yeah

sinful belfry
#

i guess you can try using margins

digital ibex
#

i tried margins, but nothing changes

sinful belfry
#

oh

digital ibex
#

i added ```css
margin-top: 50%;

nimble escarp
#

Anyone who could help me out with AWS?
EFS

sinful belfry
#

-ask2ask @nimble escarp

gilded plankBOT
#

@nimble escarp

Don't ask to ask.
Just ask your question, it wastes time if you say "i need help" or "can someone help me?" instead of just saying what the problem is. Save your time and other people's time and just ask the question.

Please read https://dontasktoask.com/ for an explanation on why this is an issue.

solemn latch
#

percentage only works if everything above isnt percent, right?

nimble escarp
#

It's not a specific problem, I need overall help 🗿

sinful belfry
#

@digital ibex idk but maybe using divs may make a difference?

#

im a noob at css tbh lol

solemn latch
#

^

#

align bottom KappaSmart

sinful belfry
#

@nimble escarp just explain what you need help with

nimble escarp
#

I'm trying to use it as a media storage server, basically to share files with a team (files can be 50 gigs).

digital ibex
#

thats what im doing, lemme show u my css: css .shit-joke { font-family: fantasy; text-align: center; font-size: 50px; } .lost-cat { border-radius: 10px; margin-left: 10% } .bottom { background-color: black; margin-top: 80px; height: 100%; min-height: calc(100vh - 50px); }

nimble escarp
#

But I can't really work out how, since I can't set up a NFS server on the EC2 instance and you can't connect to the EFS server from the outside directly.

#

Tried to set it up as a VPN but it keeps giving me unknown error when connecting.

hasty sparrow
#

@mental spade Sure, but no programming help in DMs

surreal sage
sudden geyser
#

Is the issue the missing space between Welcome or something else. What is the issue.

surreal sage
#

I want to be a space between the text

#

like a \n

#

2 lines

#

1 line for each span

#

nvm my friend helped me

celest basin
#

hello

surreal sage
#

hi

celest basin
#

what is the error here

let TOP = "Token :)"
const DBL = require('dblapi.js');
const dbl = new DBL(TOP, client);
dbl.on('vote', vote => {
client.guilds.cache.get('486336174395359232').channels.cache.get('702922225346412665').send(`New Vote By [${vote || vote.id || vote.user}]`)
});
nimble escarp
#

dbl.webhook.on()

sudden geyser
#

The vote listener is only on the dbl.webhook (which needs a server/webhook running)

celest basin
#

how can i make a webhook

surreal sage
#

thats 1 of the things you should know with discord developing zoomeyes

#

cant show rn

#

my justify content (vertical center) doesnt want to work because my css height doesnt want to work

celest basin
#

i new developer

surreal sage
earnest phoenix
#

a newbie or a help vampire? a secret we'll never know

solemn latch
#

-pleaseTryAndSolveItYourselfBeforeAsking

#

shoot

hardy vector
#

lol

long yew
#

can someone help?

#

how do i get my bot to dm the image of the server a person just joined?

#
setImage(member.guild.displayAvatarURL({ dynamic: true, size: 2048, format: 'png' }))
#

is that correct?

sudden geyser
#

You're probably looking for iconURL

long yew
#

oooooooo

#
setImage(member.guild.displayiconURL({ dynamic: true, size: 2048, format: 'png' }))
#

is that right?

sudden geyser
long yew
#

ok thanks

#

@sudden geyser i just read it all

#

and couldn't find

#

anything about icon.url

sudden geyser
#

The link I showed you jumps to the section.

solemn latch
sudden geyser
#

And it's a method

hoary elm
#

Public Server Lists on a bot can be considered a Privacy Breach correct?

solemn latch
#

ie
!top
showing the top servers?

#

that your bots in

#

yes

hoary elm
#

Thank you just double checking

odd nebula
#

I have big problems with my bot. I wrote a bot to play music from YouTube. Now there is a need to listen to any music via a link from the Internet, but I do not want to rewrite all my code. What can I change in it so that this opportunity appears, while retaining all the commands and answers of the bot. Please, help me.

solemn latch
#

you just asked us to rewrite something because you dont want to do that hmmm

#

maybe you should hire a developer if you dont want to make your own bot features

hoary elm
#

😂

stable nimbus
#

So I'm trying to create an announcement command so what I send with my command sends it to other guilds, my only issue currently is getting the list of guilds my bot is in, this is the error:

    at Client.<anonymous> (C:\Users\dargc\Desktop\Coding\betarpbot\index.js:1301:49)
    at Client.emit (events.js:310:20)
    at MessageCreateAction.handle (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
    at WebSocketShard.onPacket (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
    at WebSocketShard.onMessage (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
    at WebSocket.onMessage (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:310:20)```
----
#

My library is Discord.js@12.2.0

summer torrent
#

show code

stable nimbus
#
            if(message.author.id === ownerid, adminid1, adminid2){
                const guildList = client.guilds.cache();
                try{
                    guildList.forEach(guild => guild.defaultChannel.send(message.content));
        } catch (err) {
            console.log("Could not send message to " + guild.name);
                }
            }
         await message.delete();
         break;
        }```
solemn latch
#

client.guilds.cache
not client.guilds.cache()
i think

sudden geyser
#

The error is self-explanatory. client.guilds.cache can't be called as a function. It's a collection. I also don't think there's a defaultChannel anymore.

solemn latch
#

default channel is gone

summer torrent
#

cache() is not a function

#

cache() is not a function
it is collection

stable nimbus
#

Okay, what about the channel function then? I'll need to fix that.

sudden geyser
#

The if statement is also incorrect. You can't check user IDs like that.

summer torrent
#

also defaultChannel is nullable iirc

quartz kindle
#

that command is api abuse anyway

#

may get your bot banned

solemn latch
#

you could try getting the top channel on the list.
or letting server admins choose a log channel

#

ooo

quartz kindle
#

unless its for private use (ie, you own all guilds)

solemn latch
#

what about dyno always spamming stuff for no reason

#

dyno would send this, like 20 times a day

quartz kindle
#

isnt it opt-in?

stable nimbus
#

I have consts thank link those up, no worries on that.

solemn latch
#

oh maybe

#

i had to ban dyno to get it to stop tbh

quartz kindle
#

lmao

#

i have dyno in a server and it doesnt do that

#

so probably something you or someone turned on

solemn latch
#

ye

#

i never liked dyno anyway

quartz kindle
#

btw remember to drink water

torn ravine
#

no

digital ibex
#

lol

#

quick question

#

how can i remove the unnecessary extra bits on the end?

#

(if i don't respond, please mention)

quartz kindle
#

what extra bits

digital ibex
#

on both ends, where the text ends, probably around 10 pixels and then the white stops and its blue

#

if that makes more sense

midnight blaze
#

does anyone work with express-status-monitor?

#

I am not sure what they mean by
"Monitor can be configured by passing options object into expressMonitor constructor."
Anyone an example how I can access the contructor?

quartz kindle
#

so you want to remove the white background except for around the text?

#

do what i told you before

digital ibex
#

uhh

#

im not sure what u told me before

quartz kindle
digital ibex
#

oh ok

#

o nice, it works

stable nimbus
#

Okay so its almost working, I get it to delete the message but it won't send the message, here is the error:

    at C:\Users\dargc\Desktop\Coding\betarpbot\index.js:1303:62
    at Map.forEach (<anonymous>)
    at Client.<anonymous> (C:\Users\dargc\Desktop\Coding\betarpbot\index.js:1303:31)
    at Client.emit (events.js:310:20)
    at MessageCreateAction.handle (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:386:31)
    at WebSocketShard.onPacket (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:436:22)
    at WebSocketShard.onMessage (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:293:10)
    at WebSocket.onMessage (C:\Users\dargc\Desktop\Coding\betarpbot\node_modules\ws\lib\event-target.js:125:16)```
Here is the code: 
```if(message.author.id === ownerid){
                const guildList = client.guilds.cache;
                try{
                    guildList.forEach(guild => guild.message.send(message.content))
                } 
                finally {
                    await message.delete();
                }
            }```
solemn latch
#

guild.message
makes no sense

#

message.channel.send()

stable nimbus
#

Okay, let me try that.

#

Okay its working now.

earnest phoenix
#
    try {
        let info;
        const al = await message.guild.fetchAuditLogs({
            limit: 1
        });
        let auditlog = al.entries.first();
        if (
            auditlog.action === "MESSAGE_DELETE" &&
            message.author.id === auditlog.target.id
        ) {
            if (auditlog.extra.channel.id === message.channel.id) {
                info =
                    "Possibly removed by " +
                    auditlog.executor.tag +
                    " (Count = " +
                    auditlog.extra.count +
                    ")";
            } else {
                info = "None, possibly has been removed by the author.";
            }
        } else {
            info = "None, possibly has been removed by the author.";
        }
        //info retorna quíen eliminó el mensaje
    } catch (error) {
        console.log(error);
    }

error(?

function () { [native code] }
stable nimbus
#

I need it to send it to other discord servers however, not just to send the same message over and over.

solemn latch
#

you would then need to get a channel from each guild

stable nimbus
#

How would I do that? channel.guild?

quartz kindle
#

there is no default channels anymore

#

the only way is to loop over all channels of each guild and find the first channel that you have permissions to send in

nocturne echo
#

just wondering, how long does approval usually take?

quartz kindle
#

something like guild.channels.cache.find(channel => channel.permissionsFor(client.user).has("SEND_MESSAGE").send())

#

@nocturne echo 2-3 weeks at the moment

nocturne echo
#

MonkaS

#

ok

digital ibex
#

right um... so

#

any ideas why this is happening? the random whitespace on the side...

earnest phoenix
#

width:100%

round garden
#

How can I connect a Discord webhook to a top.gg webhook?

stable nimbus
#
    at Client.<anonymous> (C:\Users\dargc\Desktop\Coding\betarpbot\index.js:1303:36)```
New Code: ```if(message.author.id === ownerid){
                const guild = client.guilds.cache;
                try{
                    guild.channels.cache.find(channel => channel.permissionsFor(client.user).has("SEND_MESSAGE").send(message.content.slice(prefix.length).slice(command.length)))
                } 
                finally {
                    await message.delete();
                }
            }```
digital ibex
#

@earnest phoenix same, nothing changes

earnest phoenix
#

r u on v11 or v12? @stable nimbus

stable nimbus
#

V12

earnest phoenix
#

@digital ibex try position:absolute but be aware that this can cause pain

quartz kindle
#

you removed the forEach

earnest phoenix
#

(with width:100%)

digital ibex
#

kk

quartz kindle
#

it has to be applied to each guild

earnest phoenix
#

guild.forEach(bonk => {bonk.channels.cache.(something)}) would work

#

bonk being the current server

digital ibex
#

lol

earnest phoenix
#

lmao oof

stable nimbus
#

guild.channels.cache.find.forEach(channel => channel
Like this?

earnest phoenix
#

Lol

quartz kindle
#

...

#

.find.forEach is invalid

#

and makes no sense

#

you defined guild as client.guilds.cache

#

meaning guild contains ALL guilds

#

now you have to loop over all of them, and FOR EACH GUILD, apply that code

digital ibex
#

ok uh, where the black thing at the bottom is, i do margin-left: 10px; and it goes right a bit, so i change left to right but nothing chnages, it goes back to default

earnest phoenix
#

do the following

#

for the bottom thingy

#
position:absolute;
bottom:0%;
left:0%;
width:100%;
#

if it works im glad

quartz kindle
#

lmao

digital ibex
#

ahhh

earnest phoenix
#

lmao

#

wtf

#

cursed_css

digital ibex
#

css_hates_me

quartz kindle
#

absolute positioning removes an element from the document flow

digital ibex
#

web_dev_hates_me

earnest phoenix
#

@quartz kindle ik

quartz kindle
#

it becomes "floating"

earnest phoenix
#

add the following ```css
transform:translate(0px,100%);

quartz kindle
#

lmao

earnest phoenix
#

that should shift it down by itself

quartz kindle
#

you're turning his page into frankenstein's monster

earnest phoenix
#

wait no

#

that shifts it up

digital ibex
#

lmao

earnest phoenix
#

there we go

quartz kindle
#

just post your html and css

digital ibex
#

kk

stable nimbus
#

I'm sorry I half know what I'm doing but where would I put it?

digital ibex
#

my css: css .navbar { position:absolute; bottom:0%; left:0%; width:100%; transform:translate(0px,100%); } and the html: html <div class="container"> <div class="column"> <img class="cat" src="https://vetstreet.brightspotcdn.com/dims4/default/e5cdb1e/2147483647/thumbnail/645x380/quality/90/?url=https%3A%2F%2Fvetstreet-brightspot.s3.amazonaws.com%2F17%2F53%2F446d643647739735401463464158%2FBengal-AP-LQYI02-645sm3614.jpg"> </div> <div class="column about"> <h1 class="about-me">About Me</h1> <p class="text">They say im pretty lost, because im pretty and lost. Pretty Lost<br>About me... I am relatively fluent with JavaScript, and I'm currently learning Python and attempting C++</p> </div> <div class="navbar is-dark"> <div class="navbar-item"> Home </div> </div> </div>

#

do u need to see more css or?

quartz kindle
#

remove all that css from navbar

digital ibex
#

kk

quartz kindle
#

what is the css for container?

digital ibex
#

nothing

#

bulma does stuff with it

quartz kindle
#

whats the css it has in the dev tools?

digital ibex
#

when i remove the css for the navbar, its the same but the ends are blue instead of white

#

lemme check

#

it has everything there

celest basin
#

What is this error !!

22.06 21:43:36 [Bot] /bot.js:51
22.06 21:43:36 [Bot] const dbl = new DBL(TOP, { webhookAuth: auth, webhookPort: 3000 }, client);
22.06 21:43:36 [Bot] ^
22.06 21:43:36 [Bot] ReferenceError: auth is not defined
22.06 21:43:36 [Bot] at Object.<anonymous> (/bot.js:51:41)
22.06 21:43:36 [Bot] at Module._compile (internal/modules/cjs/loader.js:1133:30)
22.06 21:43:36 [Bot] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
22.06 21:43:36 [Bot] at Module.load (internal/modules/cjs/loader.js:977:32)
22.06 21:43:36 [Bot] at Function.Module._load (internal/modules/cjs/loader.js:877:14)
22.06 21:43:36 [Bot] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
22.06 21:43:36 [Bot] at internal/main/run_main_module.js:18:47
quartz kindle
#

auth is not defined

celest basin
#
const DBL = require('dblapi.js');
const client = new Discord.Client();
client.login(TOKEN);
const dbl = new DBL(TOP, { webhookAuth: auth, webhookPort: 3000 }, client);
#

ooooooh

earnest phoenix
#

🤦

celest basin
#

how can i find the password .. i'm new developer .. i need help

quartz kindle
#

you create one

#

webhook Authorization

celest basin
#

how can u learn me ?

quartz kindle
#

...

#

go to your bot's edit page

digital ibex
celest basin
quartz kindle
#

no

celest basin
quartz kindle
#

thats the api key, you put that where you have TOP in your code

celest basin
#

ok ok

#

but how can i create the password ?

quartz kindle
#

@digital ibex i need the css for the container

#

@celest basin i already told you

#

in your bot's edit page

#

click edit

#

scroll down

#

until you see webhooks

celest basin
earnest phoenix
#

you put something in Authorization and save it

quartz kindle
#

yes, now you write the password in Authorization

earnest phoenix
#

thats the password

digital ibex
#

i dont have any css for the container

#

its a component in bulma

quartz kindle
#

nothing in the dev tools either?

digital ibex
#

nope

quartz kindle
#

then give it width:100% and text-align:center

celest basin
quartz kindle
#

yes

earnest phoenix
#

yes

celest basin
#

Thaaaaaaaaaaaaaaanks ♥♥♥

digital ibex
#

kk

#

give container width and text align?

quartz kindle
#

yes

digital ibex
#

kk

quartz kindle
#

now give your navbar width:100% too

digital ibex
quartz kindle
#

then your container is not empty

#

it has some css in it

digital ibex
#

the code i edited: css .navbar { /* position:absolute; bottom:0%; left:0%; width:100%; transform:translate(0px,100%); */ width: 100%; } .container { width: 100%; text-align: center; } }

#

oh

#

how do i uh

#

check it or something?

quartz kindle
#

in your dev tools

#

in the elements tab

#

click on the line where container starts

digital ibex
#

kk

quartz kindle
#

also, remove margin-left from cat

#

and remove padding-left from about-me

#

and remove margin-left from about

digital ibex
quartz kindle
#

you want to center things, dont you?

digital ibex
#

o ok

#

yeah

quartz kindle
#

never use left/right margin/padding when centering

digital ibex
#

oh

#

how would i centre things then?

earnest phoenix
#

I've created the 5000 port with "New-NetFirewallRule -DisplayName 'DBLPort' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 5000" code in PowerShell but not working i did everything for the votesystem to work.. this is very sad... What can i do something else?
I think i will do votesystem from Glitch, so it will work?

digital ibex
#

woah!

quartz kindle
#

you always center things using either text-align:center or margin:0 auto

digital ibex
#

thanks a lot tim!

#

how would i extend the bottom bit to go all the way?

#

sorry lol

earnest phoenix
#

width:100% like i said above

digital ibex
#

yeah, i've got that

earnest phoenix
#

tf

quartz kindle
#

remove width and margin-left from navbar-item

digital ibex
#

kk

#

i remove them and thats what it shows

earnest phoenix
#

anyone?

digital ibex
#

oh, i forgot to remove the width

earnest phoenix
#

@quartz kindle can u look a sec??

quartz kindle
#

@digital ibex right click on the white part, inspect

#

show the css

#

@earnest phoenix look what

earnest phoenix
#

I've created the 5000 port with "New-NetFirewallRule -DisplayName 'DBLPort' -Profile 'Public' -Direction Inbound -Action Allow -Protocol TCP -LocalPort 5000" code in PowerShell but not working i did everything for the votesystem to work.. this is very sad... What can i do something else?
I think i will do votesystem from Glitch, so it will work?

#

@quartz kindle This!

quartz kindle
#

is it your home computer? or a server?

digital ibex
#

tim ^^

#

idk why its like 10fps s bout dat lol

#

is that meant to happen?

copper cradle
#

wdym

quartz kindle
digital ibex
#

it link to the top bit

#

OH

#

wait im confused

#

:/

earnest phoenix
#

how i can use fetchAuditLogs()?

quartz kindle
digital ibex
#

oh ok

#

?

earnest phoenix
#

@quartz kindle server :/

quartz kindle
#

bulma already applies a bunch of flexbox elements, you should use them lmao

#

did you right click inspect in the white area?

#

of the navbar

earnest phoenix
#

"bulma" Means "Don'f find" in Turkish :/

#

lol

quartz kindle
#

lol

#

bulma is the wife of vegita

#

which hosting company is your server?

misty sigil
#

anyone know if i'm allowed to send a message containing guild member count to a channel in the support guild?

#

the information doesn't contain an invite or nothing too much

quartz kindle
#

numbers are ok

#

names are not ok

misty sigil
#

alright

nimble escarp
#

Anyone who'd help me with AWS OpenVPN setup? Been trying for hours to get it to work with no success... it'd be easier on a normal VPS anipepehands

celest basin
#

vote.id mean the id of the member who voted ?

quartz kindle
#

yes

celest basin
#

thanks

misty sigil
#

so just number

celest basin
#

yp

misty sigil
#

igotchu

digital ibex
#

@quartz kindle sorry 4 late reply, yeah, i clicked the white thing

#

not the navbar

earnest phoenix
#

which hosting company is your server?
@quartz kindle If you're talking to me, Microsoft Azure, lol.

misty sigil
#

mine is self hosttted

celest basin
#

why this code not work ?

dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
  client.guilds.cache.get('ID').channels.cache.get('ID').send(`User with ID ${vote.user} just voted!`)
    vote.send(`**We thank you for your vote**`)
});
digital ibex
#

do you have a web server?

#

vote.send ??

celest basin
#

i think yp

#

hmmmm

#

this

#

const dbl = new DBL(TOP, { webhookAuth: Pass, webhookPort: 3000 }, client);

digital ibex
#

vote.send wouldn't work..

#

no, thats not a webserver

quartz kindle
#

you cant do vote.send

#

vote is not a discord.js structure

celest basin
#

🤨

#

!!

earnest phoenix
#

Lol

digital ibex
#

i believe top.gg webhooks are actual webhooks - one which require a webserver. i think

quartz kindle
celest basin
#

i'm use pebblehost

quartz kindle
#

@digital ibex dblapi.js creates a webserver for you

digital ibex
#

oh right, mb

#

btw tim, any ideas about my issue?

celest basin
#

how can i create web server

earnest phoenix
#

@quartz kindle I can't understand that, my english isn't good for that :/

quartz kindle
#

@celest basin does that host give you a public IP address and port?

#

or a public url?

celest basin
#

i think you

#

i can create ports

#

and i have the ip address

quartz kindle
#

@digital ibex so when you right click and inspect on that small white area, the dev tools opens the column class? if you hover your mouse over the column class does it get highlighted in the page?

#

show the highlighted column

digital ibex
#

yeah, kk

earnest phoenix
#

How do I update the bots status on the page?

quartz kindle
#

@celest basin so you need to put that ip address and port in your top.gg edit page

#

in webhooks URL

earnest phoenix
#

How do I update the bots status on the page?

digital ibex
quartz kindle
#

@earnest phoenix what status

#

online or server count?

earnest phoenix
#

Like

#

It shows

#

A ???

quartz kindle
#

whats your bot's id ?

earnest phoenix
#

Why

quartz kindle
#

@digital ibex scroll down, does the highlight overlap the navbar?

#

@earnest phoenix if it shows ??? it means the bot is not in this server

digital ibex
#

lemme check

quartz kindle
#

so it was either kicked or banned

#

you can check that with the bot's id, thats why i asked

celest basin
#

@quartz kindle http://147.135.160.192:8099/dblwebhook

digital ibex
celest basin
#

what can i do by this ?

quartz kindle
#

@celest basin you put that in your top.gg edit page

#

in URL

celest basin
#

okey

#

i will do that

#

and try again

earnest phoenix
#

oh ok

quartz kindle
#

@digital ibex now inspect the navbar, and highlight it

digital ibex
#

kk

quartz kindle
#

and the navbar has width 100% right?

#

now highlight the container

digital ibex
#

yeah

#

kk

haughty night
#

Does someone happen to have experience with hbs?

quartz kindle
#

the container seems to have padding or margins

#

and the navbar seems to not even be inside it

modest maple
#

manual css oof

quartz kindle
#

do you still have absolute position or float somewhere?

celest basin
#

any error here
i'm use discord 12

setInterval(() => {
  dbl.postStats(client.guilds.cache.size, client.shards.Id, client.shards.total);
}, 1800000);
digital ibex
#

lemme double check

haughty night
#

cache

quartz kindle
#

you dont need to use postStats

#

dblapi.js does it for you if you give it your client

digital ibex
quartz kindle
#

check it in the dev tools

#

click on the navbar and check the css section

#

also click on the container and check the css for the container

livid rivet
#

okay uh I got a weird bug
I am dev'ing a bot that uses the Spotify API
and I can't seem to get it to work for me
but just me, every one else is fine

#

(just came here from general)

quartz kindle
#

explain

#

you mean a command doesnt work for you?

digital ibex
#

wym by "click on the navbar and check the css section"

livid rivet
#

yeah, I have a command that displays the spotify thing

#

like... song title and album titleor whatever

#

and it works fine for anyone but me

quartz kindle
#

@livid rivet what happens, does the command not run at all?

digital ibex
#

o ok

quartz kindle
#

any errors?

#

anything logged?

#

show code

livid rivet
#

no, it tells me I am not listenig to anything

#

well one sec

digital ibex
livid rivet
#

okay wait I think I got it

#

you gave me the idea tho

digital ibex
#

print something in- oh cool 👍

quartz kindle
#

@digital ibex why does navbar have left:100 and right:100

#

remove those

digital ibex
#

okay

#

now its just width: 100%;

quartz kindle
#

click on container and show the css

digital ibex
#

kk

quartz kindle
#

container has max-width:960px

digital ibex
#

how do i change it?

#

im using the cdn bwt

quartz kindle
#

you will need to either override it with your own, or move the navbar to outside of the container

digital ibex
#

oki, i moved it outside

#

quick question, how do i centre things again?

quartz kindle
#

if the parent has text-align:center, all chilren will be centered as long as they are inline-type elements, aka, display:inline and display:inline-block

digital ibex
#

oh ok

#

:copywrite:

quartz kindle
#

if the element is a block type, ie: display:block, you can give it margin:0 auto, and it will try to center itself by setting automatic margins

digital ibex
#

\©️

#

o ok

quartz kindle
#

there are other types of elements, for example flexbox (display:flex) which have different rules

#

bulma uses flexboxes, you can see in its css

digital ibex
#

oki

magic jackal
#

I've taken too long of a break from coding, I forget, which is the correct way of writing this?

#
module.exports = (client, guild) = {}
module.exports = client, guild => {}```
#

I cant remeber how to use multiple scopes

#

LMAO

#

wait I dont need to pass that

#

nvm

quartz kindle
#

lmao

#

you did exactly the wrong/inverted combination

wicked pivot
#

how do we make a top example 10/500 with enmap

cosmic girder
#

Hay something is wrong when i try to connect my github to heroku

#

Ok ill try that

#

Nope @earnest phoenix

#

Didnt work

distant plank
#

Why i can't add bot owner in top.gg?

cosmic girder
#

Yes

wicked pivot
#

how do we make a top example 10th out of 500 with enmap

        let usermention = message.mentions.users.first() || message.author
        let messages = client.messages.get(`${message.guild.id}-${usermention.id}`, "messages")
        let topFetch = client.messages.map((g) => g.user)
        let top = topFetch.indexOf(usermention.id)+1```
I tested like this but it tells me the number of members in the data and not my ranking
stark viper
#

how do i get it to where i can see how many servers my discord bot is in by coding it

livid rivet
#

what language?

stark viper
#

English

quartz kindle
#

lmao

livid rivet
#

what programming language

stark viper
#

ohhhh visual studio code

quartz kindle
#

thats an editor not a language

stark viper
#

idk

#

i am new to this

quartz kindle
#

which guide are you following?

stark viper
#

um? I am so sorry i don't understand what you mean

quartz kindle
#

are you following a guide or a tutorial?

livid rivet
#

i mean it's most likely C#, am I right?

quartz kindle
#

how did you start to code?

stark viper
#

?

quartz kindle
#

explain which steps did you make until now

stark viper
#

non i have the coding all done the bot on 24/7 i just want a code to where it shows like how many servers my bot is in

quartz kindle
#

did someone code it for you?

livid rivet
#

so it's not your bot

stark viper
#

no it my bot

quartz kindle
#

did you code it?

stark viper
#

yes

livid rivet
#

but then you would know what language it is

quartz kindle
#

which language did you code it in?

stark viper
#

index.js or discord.js

#

right?

quartz kindle
#

so... javascript

stark viper
#

sure

quartz kindle
#

the language name is javascript

#

disocrd.js is the library name

stark viper
#

we will go with javascript

quartz kindle
#

so in discord.js you would count the number of guilds in your guild cache

#

client.guilds.cache.size

stark viper
#

um ok? i just put that in the editor then thats it?

quartz kindle
#

assuming your discord.js is version v12+

stark viper
#

yes

quartz kindle
#

no, you need to code a command that uses said code

#

did you really code your other commands?

livid rivet
#

you just made a complete discord bot and dont know how to implement a line?

stark viper
#

YES

quartz kindle
#

then do the same thing

#

the same way you coded any other command, code a new command, and make it output the result of client.guilds.cache.size

stark viper
quartz kindle
#

then keep doing the same thing

haughty night
#

So, im using oauth2 and going through guilds from the user, but when i loop through it it gives me 1 guild then an empty one then another rinse and repeat

stark viper
#

Also how do i get a command to like have a timmer on it like this btw i am not copieing that i am just trying to do a command and i want a timmer on it like that

quartz kindle
#

you can use setTimeout() to create timers

#

but you need to keep track of their state, to avoid creating multiple timers on the same thing

stark viper
#

ok

quartz kindle
#

so you need to store timer data in an object or similar

#

and if you need your timers to survive bot restarts, you will need a database

stark viper
#

hey tim can we go into a voice chat so i can understand better

halcyon ember
#

how do you reference/require a json file from an upper directory in nodejs

earnest phoenix
#

I'm on v11

quartz kindle
#

whatever you tried to use hasPermission on is null

earnest phoenix
#

permLevel

#
if (!msg.member.hasPermission('ADMINISTRATOR')){
//...
}
}```
Like this.
quartz kindle
#

msg.member is null in dms

#

and can also be null in some situations, like webhooks or system messages

earnest phoenix
#

I see

#

if (!message.member) message.member = await message.guild.fetchMember(message.author.id) 200 IQ

tepid canyon
#

Restarting is 1 thing, but did you deploy the latest version of the branch?

royal portal
#

Does anyone know how to make it so you can use the same commands?

#

for example if(command === "blabla")

#

and then again somewhere

earnest phoenix
#

does anyone know how to get the number of servers your bot is currently in with discord.js?

coarse pelican
#

can someone do a help command by emogis???

earnest phoenix
#

on the current version client.guilds.size doesn't exist

short siren
#

"what language did you code in" -> "index.js" 200iq

coarse pelican
#

bot.js

quartz kindle
#

@earnest phoenix client.guilds.cache.size

earnest phoenix
#

thank you so much

sudden geyser
#

@royal portal I don't understand what you mean. Could you elaborate?

royal portal
#

so lets say you want

#

a command

#

if(command === "hello")

#

and you have if guild not this then return

#

but then if you want it for another guild, i'd have to do if(command === "hello") again

#

so it would be something like

#

if(command === "hello")
if (!['1552918491221309123'].includes(message.guild.id)) return;
}

if(command === "hello")
if (!['12321321321412412'].includes(message.guild.id)) return;
}

sudden geyser
#

You could have it under the same if block. If you wanted to have two separate blocks for some reason, you'd just not use return

#

For example: ```js
if (command === "hello") {
let guilds = [first, second, third, ...others]

if (guilds.includes(message.guild.id)) {
// Do stuff...
} // If you want to return here, you can just add an else { return; }
}```

royal portal
#

im trying to make it so if someone says -hello in guild 1, it will say hello1

#

and if they say -hello in guild 2, it will say hello2

sudden geyser
#

It's still possible to do that under a single if block, or you could use a second one if that's what you want to do. It's just a matter of condition checking and not using return.

quartz kindle
#

you mean guild specific commands?

royal portal
#

yes

quartz kindle
#

you need to check the guild id and respond with some predefined response

#

for example, make an object of responses mapped by guild id

royal portal
#

i've tried most things

#

none worked

quartz kindle
#
let responses = {
  "2794823422":"hello1",
  "3o48573085":"hello2"
}

...
message.channel.send(responses[message.guild.id])
royal portal
#

might as well give up

#

i tried to make it so people can talk from one server to another

#

but it doesnt work if the command names are the same

#

it works if i have another client.on

#

i'll just use it that way

magic jackal
#

just check if the user is the bot user, and check against IDs

royal portal
#

huh

magic jackal
#

Depends on your issue where you run across command names being the same

#

is your prefix different?

royal portal
#

my prefix is -

#

and im not talking about other bots

solemn latch
#

I've seen a bot do this.
But it was something you initiated with a command, and ended later with a command

#

-talktorandomserver
Then when another person did it in another server aswell.
Copy messages from the first server into the second server, and the other way around.
When no one talks for a bit, or someone ends it, end it.

quartz kindle
#

@royal portal you want servers to talk to each other? thats a completely different thing

grand apex
#

hi

#

How can I get information from snekfetch with Windows?

solemn latch
#

I heard snekfetch is deprecated

#

Yep

#

It is

grand apex
#

What:(

#

But the command over Glitch is running, pulling information

celest basin
#

i neeeeeed help

23.06 00:59:03 [Bot] User with ID 684135218537431055 just voted!
23.06 00:59:03 [Bot] /bot.js:71
23.06 00:59:03 [Bot] member.send(`**We thank you for your vote
23.06 00:59:03 [Bot] ^
23.06 00:59:03 [Bot] TypeError: Cannot read property 'send' of undefined
23.06 00:59:03 [Bot] at DBLWebhook.<anonymous> (/bot.js:71:12)
23.06 00:59:03 [Bot] at DBLWebhook.emit (events.js:310:20)
23.06 00:59:03 [Bot] at IncomingMessage.<anonymous> (/node_modules/dblapi.js/src/webhook.js:83:16)
23.06 00:59:03 [Bot] at IncomingMessage.emit (events.js:322:22)
23.06 00:59:03 [Bot] at endReadableNT (_stream_readable.js:1187:12)
23.06 00:59:03 [Bot] at processTicksAndRejections (internal/process/task_queues.js:84:21)
#

how can i fix it ?

#
dbl.webhook.on('vote', vote => {
  console.log(`User with ID ${vote.user} just voted!`);
  let member = client.users.cache.get(vote.id)
  if(!member) return
    member.send(`**We thank you for your vote**`)
});
solemn latch
#

I havent looked at the api much.
But your logging vote.user and its giving the id of the user.
But then you use vote.id.

Wouldn't vote.user give the id you want?

digital ibex
#

anyone know any free domains lol?

solemn latch
#

Freenom

digital ibex
#

hm, can you link me to it please

celest basin
#

can i use vote.user.send ?

digital ibex
#

try it

earnest phoenix
#

No

#

It's just id

solemn latch
#

^

celest basin
#

digital ibex
#

lol

celest basin
#

😕

slender thistle
#

getUser(vote.user).send

celest basin
#

any one know how can i send msg to the user voted me

#

okey

#

thanks

digital ibex
#

woo, can you link me to freenom. can't find any anywhere

slender thistle
#

vote.user is an ID of the user who voted

celest basin
#

i will try

solemn latch
#

How hard did you try?

grand apex
#

A command running on glitch

#

Doesn't work on Windows

digital ibex
#

i go to free and paid, and under the free i have to pay 80p lol

grand apex
#

no error and spelling problems?

celest basin
#

let user = client.users.cache.get(vote.user)
user.send
@slender thistle
this is right ?

solemn latch
#

Some freenom domains are paid

#

Some are free

slender thistle
grand apex
#

😦

digital ibex
#

hm, you know why some are unavailable?

solemn latch
#

They are in use

celest basin
#

hmm i don't have a much trying to vote ! :(

digital ibex
celest basin
#

😂

paper cliff
digital ibex
#

what

solemn latch
#

Sddawededfewefwe is my domain

#

How did you find my domain

digital ibex
#

lmao

solemn latch
paper cliff
#

on what website do you see those?

solemn latch
#

Some amazing domains

paper cliff
#

I see, thanks

lyric mountain
#

Although 99.9999999999995% of domains will give u an "unavailable" error

marsh jewel
#

how to host a website on my pc ?

lyric mountain
#

Use some webserver like tomcat or glassfish

quartz kindle
#

or windows iis

#

or apache

lyric mountain
#

Note that the website won't be available if you turn off your pc

quartz kindle
#

or a node.js express

lyric mountain
#

or apache
@quartz kindle tomcat

#

Lol

marsh jewel
#

yhea, like on my pc

lyric mountain
#

Exactly, the options above allow sites to be hosted in ur pc

marsh jewel
#

but i need to buy domain ?

#

i dont want it to be localhos

#

t

quartz kindle
#

if you want a domain name, yes

lyric mountain
#

If you want a non-ip url, yes

#

It won't be localhost

quartz kindle
#

otherwise, you can use a subdomain service, or a dynamic dns

marsh jewel
#

i think im just gonna host bot on my p

quartz kindle
#

or even your ip address

marsh jewel
#

c

lyric mountain
#

It'll be ur public ip

marsh jewel
#

vpn

magic jackal
#

@sudden sail I'm here 99% of the time in this channel helping or watching

lyric mountain
#

Vpn has nothing to do with hosting lol

sudden sail
#

yea I see you have some activity here tbf

solemn latch
#

Can you even host through a vpn

#

No wait no

quartz kindle
#

you can i guess

#

but your website will be changing ip's as fast as your vpn

#

you could link it to a dynamic dns service for auto-updating its dns

#

that way you could keep a domain name working even while changing ips

earnest phoenix
#

you'd still have client side dns caching so that's not the smartest idea

#

browsers do dns caching and some routers do

quartz kindle
#

well, the ddns service could use dns redirection or something

#

so the client would cache the ddns service

celest basin
#

ooooooof

#

😤

timber linden
#

what do i do in

unique nimbus
#

I mean can't you use a VPS service and then a VPN service

timber linden
#

node.js command promt

celest basin
#

the error still stay

timber linden
#

what do i do in node.js command promt

solemn latch
#

Nodejs isn't a command prompt Hmmm

#

I got a vps, and I only need 500mb of ram, and I got 1GB of ram

timber linden
#

uh actualy

#

node.js command promt

#

i see that in downloads

lyric mountain
#

No no, node.js is a js framework

timber linden
#

wait so is that thing i downloaded

#

a virus..

#

it was

#

in

#

install additonal tools for node.js

#

if so dont worry

#

i got webrot

lyric mountain
timber linden
#

webroot*

lyric mountain
#

Like, the site is literally nodejs

timber linden
#

yes i downloaded that

#

i downloaded it

#

No when i downlloaded it

#

is there suppose to be additional tools for node.js

#

why is their........

#

python

lyric mountain
#

Idk, but python is handy to have in ur pc

timber linden
#

Immma remove it anwyway

#

it got c" to

#

which i dotn use

obtuse jolt
#

Is anybody like extremely good at d.js I mean like really really good at it

#

Like offers paid jobs good

lyric mountain
#

First - not the place to ask that
Second - there's no "extremely good", the difference is knowing how to google properly

obtuse jolt
#

yeah I get the 2nd one but where is the place to ask

lyric mountain
#

Try fiverr or freelancer

obtuse jolt
#

frick

lyric mountain
#

?

obtuse jolt
#

But I want them to add something into my code not make something

lyric mountain
#

Like offers paid jobs good
@obtuse jolt the answer to this are those sites

#

About the "add stuff in my code", it's a bit trickier

#

Also, probably more expensive depending on ur code complexity

obtuse jolt
#

My code is literally spaghetti

#

Sometimes I even forget where things are

#

That’s really saying something

#

oof

lyric mountain
#

Thing is, having to understand people's code involves reading it and finding out how it works, which costs more development time and making the budged fly up a bit

#

Try those two sites, they aren't only for ground up projects, you can also ask for implementations

obtuse jolt
#

I should probably do a rewrite before asking people

#

And hiring

lyric mountain
#

Ain't it easier to do it yourself?

#

Like, what is it?

obtuse jolt
#

I mean I’m trying to see if anybody can create my bot a queue system because the api I’m using has a strict rate limit

#

And I have no idea how

#

And it’s either that or pay €15k a year

lyric mountain
#

That's like, really easy to do

#

You'd spend a lot for little work

obtuse jolt
#

How

#

Tho

#

Because it’s like queuing up file scanning and url scanning and url shrinking

#

And lots of other stuff

#

In js

lyric mountain
#

Make a recurring event (aka timer or cronjob) which checks for queue entries

obtuse jolt
#

how

#

tf

#

I’m so bad at this stuff

#

I can do like databases and stuff but queueing things

lyric mountain
#

Like, every X seconds it gets the head element of the collection, if it exists - execute - else it sleeps until next call

#

For example (not copypaste):

obtuse jolt
solemn latch
#

there are entire libraries for queues too

#

or put each job in an array, when one ends, do the next thing in the array, when its done, remove it.
then repeat

lyric mountain
#
let queue = [];
setInterval(() => {
	if (queue[0]) {
		queue[0].execute();
		remove queue[0];
	} 
}, 5000);
solemn latch
#

^

obtuse jolt
#

What confuses me is like

lyric mountain
#

Note that idfk how collections work in js

obtuse jolt
#

How do I change the position

#

Of the things

solemn latch
#

the order?

lyric mountain
#

Collections will do that for u

obtuse jolt
#

And then get the positions

lyric mountain
#

If you take index 0 the whole collection will move 1 index back

solemn latch
#

^

lyric mountain
#

In my example i used an array because idk how collections work in js

obtuse jolt
#

Bro I will so break my bot doing that

lyric mountain
#

Programming is breaking then fixing it back

obtuse jolt
#

I’ve wiped my database 4 times in 3 days

#

It’s

#

Annoying

lyric mountain
#

Lol

#

How tf

#

Don't u make backups?

obtuse jolt
#

The bot is in like 6 servers

#

no I don’t

lyric mountain
#

Read that

obtuse jolt
#

After 25 I’ll start making timed automated backups

lyric mountain
#

No no, start now

#

Databases are important

#

Data is priceless

solemn latch
#

its also extremely frustrating for users to lose data

lyric mountain
#

I make a backup each day, at the end of the month I compress all backups and send it to me and my devs

obtuse jolt
#

But here’s the thing my bot handles like files and actually has to like sandbox and like 1 slip could duck me over SO bad

solemn latch
#

why do that to yourself

lyric mountain
#

Just a question

solemn latch
lyric mountain
#

Is it a json db?

obtuse jolt
#

It’s a security bot

solemn latch
#

WHY

obtuse jolt
#

It scans files and URLs for viruses

lyric mountain
#

Errr

#

Why do you use a db?

obtuse jolt
#

For storing guild settings

#

Like prefixes and stuff

lyric mountain
#

Ah, ok then

#

Is it a json-based db?

obtuse jolt
#

Yes

lyric mountain
#

Change that

#

Like, now

obtuse jolt
#

I can’t I’ve added it in too much

#

Also I have no idea how

#

To use other ones

solemn latch
#

where do people keep getting tutorials on json databases

sick cloud
#

json is harder than most actual dbs

#

thats the stupid thing

obtuse jolt
quartz kindle
#

json aint that bad if you use it correctly

sick cloud
#

also

#

that's really good

obtuse jolt
#

But to use a queue surely my idea of doing it would be to use json to store queue ids and their file locations and what they actually have to do

lyric mountain
#

Anyway, back to the original question

obtuse jolt
#

I actually haven’t experienced any issues so far

#

Other then cleansing my own databases

#

A lot

solemn latch
#

isnt that a massive problem?

quartz kindle
#

cleansing?

lyric mountain
#

@quartz kindle aka wiping out everything

quartz kindle
#

aka losing everything

#

because of some crash