#development

1 messages ยท Page 1305 of 1

fluid basin
#

yeah I just went to that PR page

#

xD

drifting wedge
#

how can i access files in another folder in the main folder

opal plank
#

hacktober might've been the worst possible time i could've looked to put up PR's evrywhere though.....

drifting wedge
#

so like for example: i have a folder with the bot file and a folder with cogs

fiery canyon
#

just extend the query
@fluid basin but i think that's checks for both queries to be valid

drifting wedge
#

and i have extra files

fiery canyon
#

like is it possible to use an OR

drifting wedge
#

do i put them in the cog folder?

fiery canyon
#

like this query or this

quartz kindle
#

@opal plank not sure, if v8 requires breaking changes, they will be forced to make a v13, and since major versions are rare, they will use it to push as many breaking changes as possible most likely

fluid basin
#

bruh check mongodb docs and examples well since I'm feeling great today:
{$or: [<CONDITION1>, <CONDITION2>]}

opal plank
#

hmmm i see

fluid basin
#

well you don't need to modify query

#

just substitute at where you will need it

opal plank
#

i might go ask them again in a couple days if they want some PR's for typescript

#

free internet points

quartz kindle
#

i dont think they're much interested in TS atm, since djs-next will be 100% ts

opal plank
#

cant hurt to get extra documentation

quartz kindle
#

ye ig

opal plank
#

though what they said is very true

#

if you using Ts, chances are you know what you are doing

#

im not even interested in hacktoberfest tbh

#

i just so happened to get a couple PR's recently, it matched amazingly poorly with hacktober

#

i did some other private repo PR's before for training/practice about documenting libs, but recently ive been trying to get some commits on some stuff more public since im much more confident about it now

quartz kindle
#

what even is hacktober?

#

is it like a competition?

fluid basin
#

hrm basically tl;dr for v8 is just intents and ratelimits for gateway and a bunch of other stuff for api

#

its a festival/event I guess

#

not really a competition

opal plank
#

oh, they got it

#

dammit

fluid basin
#

tfw they increased PR duration x2

opal plank
#

@quartz kindle wink wink hows it going pretty young man, you wouldnt like some bs prs on your lib would ya? ASMarisaWink

quartz kindle
#

lmao

opal plank
#

no stars? yall harsh today yikes

fluid basin
#

they've only got 70k shirts this year

#

also new update you can only submit PRs on hacktoberfest labelled repos or get your PR labelled manually as hacktoberfest-accepted

blissful coral
#

Gotchu erwin

solemn leaf
#

i give uppp

#

holy cow

fluid basin
#

gek

#

updating to v8 gateway is gonna be work

opal plank
#

doubt they'd be deprecating v6 anytime soon

fluid basin
#

thats true

opal plank
#

i'll switch asap though to be safe

fluid basin
#

at least a few months

opal plank
#

i'll check the pros/cons of it

quartz kindle
#

i mean

#

v6 and v7 are both already deprecated

#

just not disabled/removed

clever thunder
#

;-; theres 2558 bot devs..

#

thats alot

solemn latch
#

thats just the online rn devs

clever thunder
#

er well yea

solemn latch
#

theres a lot more than that

clever thunder
#

;-; dang ok

fluid basin
#

v7 didn't really exist (well maybe in clients I suppose)

drifting wedge
#

how do i make a command that is like !pay @earnest phoenix (amount)

#

cuz if i do arg and member

blissful coral
#

uh

#

well

drifting wedge
#

its !pay (amont) @earnest phoenix

blissful coral
#

real money?

quartz kindle
#

v7 jokes

drifting wedge
#

no

quartz kindle
#

xD

drifting wedge
#

just like how can i make the user the second arg

blissful coral
#

fr tim

drifting wedge
#

and the first arg is the amount

blissful coral
#

@drifting wedge just do args[0] and args[1]

drifting wedge
#

where? and im confused

#

im python dudeee

blissful coral
#

What language are you using

#

OH

#

Can't help there sorry

#

LOL

opal plank
#

@quartz kindle when 50% of the changes are table fixed to accomodate the longer descriptions lmao

quartz kindle
#

discord docs are a mess

#

99% of their PRs are docs nitpicks like that

#

lmao

opal plank
#

bruh legit this shit...

#

im not seeing much here that will break the end user experience tbh

#

most of this seems changes in how the connection is handled, most stuff moved to different enpoins, and some stuff has been removed, though it doesnt seem like stuff the general user uses

#

unless im doing a big oversight on something

#

better formatting on errors too

quartz kindle
#

v8 is basically v7 turned official plus some minor changes lol

opal plank
#

thats interesting

#

i havent seen much of v7

solemn latch
#

imagine having the job to fix lineups

quartz kindle
#

what job? just let people with ocd do it for you for free

solemn latch
#

ez

opal plank
#

put something awful in the very top and let them review the rest after being triggered by the first 2 lines

quartz kindle
#

xD

fluid basin
#

tim how does d.js cache currently work?

opal plank
#

not even 3 weeks ago i asked em' the same question, ish

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

fluid basin
#

well yes

sage bobcat
#

One message removed from a suspended account.

opal plank
sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

lol

opal plank
#

you posted that everywhere dude

#

chill

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

i used vpn

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

It auto update time

sage bobcat
#

One message removed from a suspended account.

opal plank
#

thats just advertising at this point

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

How lmao

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

ima redo my os

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

Ye

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

clever thunder
#

I~I

earnest phoenix
#

Apparently what i'm trying todo is Extremely basic SQL, but i'm sat here confused off my tits, on what i actually have todo.

#

the docs are annoyingly confusing..........

clever thunder
#

Ended

blissful coral
#

@clever thunder Why are you reacting to everything

clever thunder
#

it was a shyevent

solemn leaf
#

Can I check if the website is on dark mode?

#

I mean

#

wouldn't the background color chage

clever thunder
#

zane should be a moderator on this server honestly

solemn latch
#

He will get burnt out on helping people like everyone else

clever thunder
#

;-;

#

oki im sorry

solemn latch
#

My first two weeks i was in here 4 to 6 hours a day atleast

opal plank
#

3 months and a half and 23k messages

#

imt not active here whatsoever

oak cliff
#

Please keep this channel on topic uwu

blissful coral
#
.bot-img {
background: transparent;
background-color: rgba(0, 0, 0, 0);
border-radius: 50%;
animation: bounce 1s infinite alternate;
-webkit-animation: bounce 1s infinite alternate;}

.bot-img img {
height: 100%;
border-radius: 50%;
}@keyframes bounce {
from {
transform: translateY(0px);
}
to {
transform: translateY(-15px);
}
}
@-webkit-keyframes bounce {
from {
transform: translateY(0px);
}
to {
transform: translateY(-15px);
}
#

Current css

#

Trying to set border-radius: 50%

#

For some reason not working at all

mild flower
#

how do i add ID functionality

blissful coral
#

For...?

mild flower
#

for example for a user info command i want to able to input an id and make the bot detect the user through id inputted

blissful coral
#
const member = message.guild.members.cache.get(args[0]) || message.mentions.members.first()```
#

args[0] would be the ID argument.

mild flower
#

ok thanks

blissful coral
#

๐Ÿ‘

#

Also you are going to want to do it like this:

#
const member = message.guild.members.cache.get(args[0]) || message.mentions.members.first()
if(!member) return message.channel.send(`Member not found`)
#

@mild flower

#

So it doesn't error if either of the 2 are not fulfilled

mild flower
#

yeah i already had that but thanks

brittle eagle
#

hey

#

So, how do I setup the thing where it can do "1 Vote", "2 Votes". etc?
like autoroles

mild flower
#

So, how do I setup the thing where it can do "1 Vote", "2 Votes". etc?
like autoroles
oop wrong link

blissful coral
#

@brittle eagle You mean each user add a vote?

#

If reactions, just check the amount of reactions

brittle eagle
#

Like whenever someone votes, it will show how many times u vote

blissful coral
#

Oh

#

On top gg?

#

@brittle eagle

brittle eagle
#

yea

#

@blissful coral

blissful coral
#

Database

brittle eagle
#

what that

blissful coral
#

Search for user upon vote, if not found create a new entry for the user with 1 vote

#

Then each time just add a vote

#

Into the database

brittle eagle
#

on the internet?

blissful coral
#

No

#

Search up databases to use

#

MongoDB and MySQL are 2 good ones

#

Then do what I said with one of them

brittle eagle
#

oh

#

ok

#

i will try

#

im still confused

#

is there a vid?

mild flower
#

hey is it possible to get the colour in hex code of the highest role color of a member?

blissful coral
#

@brittle eagle search it up

#

@mild flower yes one sec

fluid basin
#

hoist role color

mild flower
#

ahk

blissful coral
brittle eagle
#

idek

karmic compass
#

if i wanted ot create a class that does the following: ```js
const Data = new Data()

console.log(Data)
would logjs
1.0.0

#

in js of course in case it wasnt obvious

earnest phoenix
#

k

#

is there e a way easy

#

using xyz

open spindle
#

ummmm

#

whaddyamean xyz

karmic compass
#

uh

solemn leaf
#

Is it possible to use Iframes to make video calls on the top.gg website

karmic compass
earnest phoenix
#

i see lots of websites tht hab xyz

open spindle
#

it's in general

#

sorry

#

support

earnest phoenix
#

mee.xyz??

karmic compass
#

its just a domain name

open spindle
#

^

earnest phoenix
#

its paid

#

eehh

solemn leaf
karmic compass
#

yeah

#

all websites are paid

#

??

earnest phoenix
#

is there a way to code one not paid

karmic compass
#

nope

earnest phoenix
#

๐Ÿ˜ฆ

karmic compass
#

unless you have your own server

earnest phoenix
#

wuts dat

open spindle
#

heroku

karmic compass
#

a

earnest phoenix
#

oh

karmic compass
#

server

solemn leaf
#

Is it possible to use iframes to make video calls on the top.gg website

karmic compass
#

uh

open spindle
#

I don't think so?

#

why do you want to do that

solemn leaf
#

bcs funny

open spindle
#

no I dont think so

faint prism
#

all websites are paid
@karmic compass not some like .tk or .ml

karmic compass
#

if i wanted ot create a class that does the following: ```js
const Data = new Data()

console.log(Data)
would logjs
1.0.0

#

lmao excuse me what

faint prism
#

Tk is free domains

karmic compass
#

bro...

open spindle
#

OH GOD WHY DID I LOOK AT YOUR PROFILE PICTURE

#

WHAT IS THIS

karmic compass
#

whomst

#

you mean Auger

open spindle
#

AUGER

faint prism
#

Reverse image searching. It's Tokyo something

#

I don't remember the name

solemn leaf
#

scam

#

it isnt loading

faint prism
#

Freenom is the right site

solemn leaf
#

it isnt loading

faint prism
#

Definitely a wonky one. But it'll get you there

solemn leaf
#

so wait is this fr

#

like I can setup my ip rn

#

mask it with the domain

faint prism
solemn leaf
#

and rock on

sudden geyser
#

@karmic compass if you wanted to do that, you'd probably need to provide your own implementation of the toString method when declaring the class.

faint prism
#

||it redirects to freenom||

sudden geyser
#

The warning sign next to the domain Thonk

solemn leaf
#

Im going to smash my head for how long this takes to load

#

wdym

fervent goblet
solemn leaf
#

Prevent?

fervent goblet
#

yeah

#

the markup gets messed up when the song has [] in it

solemn leaf
#

prevent what

mild flower
#

uh so ive added an if statement at the end of my kick command to verify that the member kicked is still not in the server but it doenst seem to be working
let kuser = message.guild.members.cache.get(args[0]) || message.mentions.members.first()
if(kuser != message.guild.member) return message.channel.send(Eked)

solemn leaf
#

@faint prism it didnt work

mild flower
#

how do i prevent this?
@fervent goblet cant you just substring the []

#

from the titel

fervent goblet
#

no that wont work

mild flower
#

yes thats what im saying

#

just get rid of the [] from the song title

fervent goblet
#

But i still want it there

boreal iron
#

Just escape the string [ and ]

#

Replace [ with [

#

Oh

carmine summit
#

Can I ask a question?

mild flower
#

how do i send a message ONLY when the user specified has been kicked?
if(kuser !== message.guild.member) return message.channel.send(Eked)
i tried this

boreal iron
#

[ with \[

fervent goblet
#

tried that

boreal iron
#

Markdown provides backslash escapes for the following characters:

\ backslash
` backtick

  • asterisk
    _ underscore
    {} curly braces
    [] square brackets
    () parentheses

hash mark

  • plus sign
  • minus sign (hyphen)
    . dot
    ! exclamation mark
mild flower
#

@ me if you have a solution

blissful coral
#

@mild flower ?

#

Wdym

#

Only when kicked?

mild flower
#

how do i send a message ONLY when the user specified has been kicked?
if(kuser !== message.guild.member) return message.channel.send(Eked)
i tried this

#

yeah

blissful coral
#

I am confused

#

Is this a command

#

Or the guildMemberRemove event

mild flower
#

i want only the error to show when this happens

faint prism
#

I've never struggled with dot.tk

sudden geyser
#

When you perform the API action to kick the member, resolve the promise and send it when it's succeeded.

mild flower
#

yes thats what im asking how

solemn leaf
#

@faint prism it finally worked

#

but how do I start up a website l,mao

sudden geyser
#
kick(...).then(() => {
  // do something when the user has been successfully kicked
}).catch((err) => {...}) // do something when the user wasn't kicked```
fervent goblet
#
\[**${nowPlaying.song.info.title.substr(0, 30)}...**\](${nowPlaying.song.info.uri})

@boreal iron i did this and i still get the same issue

mild flower
#

ah k

solemn leaf
#

cant I like

#

host locally

#

ok

#

how do I use vercel

#

can I just make a github ras

#

that is just index.html

#

and nothing in the html file?

#

and just

boreal iron
#

@fervent goblet That doesnโ€™t work.
You need to replace the brackets inside the title not the markdown link []()

#
[**${nowPlaying.song.info.title.substr(0, 30).replace("[", "\[").replace("]", "\]")}...**](${nowPlaying.song.info.uri})
#

If that doesnโ€™t work, too just use ``Title...``

#

Keep in mind to escape both brackets. Itโ€™s just horrible to type code blocks on mobile.

earnest phoenix
#

Hello can anyone help me with this?

@bot.command() async def role(ctx): roles = ctx.guild.roles for role in roles: await role.delete()

#

I am trying to delete all roles in my server with this command

trim saddle
#

what exactly is the problem

cinder stratus
earnest phoenix
#

why would you want to delete all roles ? okeh @earnest phoenix

solemn leaf
#

@earnest phoenix How do I edit the site now

#

I setup a basic html

#

I updated it

#

and commited to github

#

the website didnt change

earnest phoenix
#

@earnest phoenix becuase I am trying a new comamnd where it deletes all roles and catagories and channels

#

Its for migrating my server

#

so.. a nuke bot? ๐Ÿ˜‚

#

Yea

#

But i prefer the name server builder

#

Lol

#

We can't help here, as it's API Abuse,

#

Oof

#

Yea ik

#

Its api abuse

#

I feel like u would use that for bad.

#

^^

#

But

#

I need for migrating server

#

Im stuck on trying to make a mee6 type bot

#

Cuz i am joining my friends server

#

Wait i have a question

#

?

#

I cannot have a comamnd which destroys all channels and catagories and then recretae new channels and categories??

trim saddle
#

that's api abuse

#

regardless of your intentions

earnest phoenix
#

I cannot have a comamnd which destroys all channels and catagories and then recretae new channels and categories??
@earnest phoenix Negative

#

Yikes

#

Kk I am going to remove that command

finite bough
#

@earnest phoenix I am sorry but support for api abuse isn"t given here or in the official discord.js server

earnest phoenix
#

What code software should I use?

#

Whats good for starting

finite bough
#

@earnest phoenix language?

trim saddle
#

I am sorry but support for api abuse isn"t given here for official discord.js server
@finite bough what are you talking about

#

who said anything about d.js

earnest phoenix
#

Like uh discord bot coding language

#

For starters

trim saddle
finite bough
#

same thing anyways

#

lmao

trim saddle
earnest phoenix
#

Im guessing discord.js is good

trim saddle
#

d.js caches everything in sight

finite bough
#

yes

earnest phoenix
#

How do I get discord.js

solemn leaf
#

idk google it

carmine summit
#

What is the best free database to use?

earnest phoenix
#

Idk

solemn leaf
#

db

trim saddle
#

almost any common database is free

#

you just need to host it

carmine summit
#

I have an array with some words in it, How do I get a word by only having a part of a word.

#
let search = 'bana'
let array = ['apple', 'banana', 'car']
#

must return banana

glossy lantern
#

Hello

#

Can anyone tell me how to make bot for lock the channels

#

๐Ÿค”

#

@everyone

earnest phoenix
#

Can anyone tell me how to make bot for lock the channels
@glossy lantern What do u mean

carmine summit
#

update channel overwrites

glossy lantern
#

Like carl can lock the channels like that

#

!lock

earnest phoenix
#

Whats carl?

glossy lantern
#

Carl bot

carmine summit
#

message.channel.updateOverwrite()

#
message.channel.updateOverwrite(message.channel.guild.roles.everyone, {
      SEND_MESSAGES: false
    })
glossy lantern
#

But i want to lock that channel no other can write

#

In that channel

glossy lantern
#

๐Ÿ˜…

#

You know that bot

#

Carl

#

Or duno

carmine summit
#

Just stop

glossy lantern
#

Dyno

carmine summit
#

take the code

#

apste in in your thing

#

boom

#

magic

#

bye

#

case closed

#

nothing to see here

glossy lantern
#

Plssss tell

earnest phoenix
#

HE SENT THE CODfe

glossy lantern
#

๐Ÿ˜ญ

carmine summit
#

SoMEONE KILL ME NOW PLEASE

glossy lantern
#

@carmine summit ok i will

#

๐Ÿ˜‚

earnest phoenix
#

message.channel.updateOverwrite(message.channel.guild.roles.everyone, { SEND_MESSAGES: false })

glossy lantern
#

Ok

#

Thx

#

@earnest phoenix

earnest phoenix
#

all u had to do was scroll up...

glossy lantern
#

Ok

carmine summit
#

myghad

glossy lantern
#

@carmine summit you shut go away from here๐Ÿ˜’๐Ÿ˜’๐Ÿ˜’

carmine summit
#

I have an array with some words in it, How do I get a word by only having a part of a word.

let search = 'bana'
let array = ['apple', 'banana', 'car']

must return banana

earnest phoenix
#

I have an array with some words in it, How do I get a word by only having a part of a word.

let search = 'bana'
let array = ['apple', 'banana', 'car']

must return banana
wym?

#

@carmine summit you shut go away from here๐Ÿ˜’๐Ÿ˜’๐Ÿ˜’
@glossy lantern toxic much

glossy lantern
#

๐Ÿ˜…

carmine summit
#

understand my question

#

im just gon for loop it

#

then includes

#

EZ

earnest phoenix
#

how can i run my bot scripts in my pc
is node.js is good ??

#

Theres some hosting websites or somethinh

solemn latch
#

Nodejs is great

#

You can host locally, but your pc will need to be on 24/7 for the bot to be on all the time

earnest phoenix
#

na how can i run without website

#

iam upgrading my bot

solemn latch
#

Ideally you'd get a vps which costs a bit a month

earnest phoenix
#

You can host locally, but your pc will need to be on 24/7 for the bot to be on all the time
@solemn latch na just for testing

carmine summit
#

i forgot how for loops work,
is the middle parameter i < 10 or i > 10

solemn latch
#

Then yeah just testing thars fine

warm marsh
#

Either

solemn latch
#

^

earnest phoenix
#

guys give me server info best embed code

carmine summit
#

Hm?

earnest phoenix
#

for node,js

solemn latch
#

Could be any conditional statement

carmine summit
#

wdym either

solemn latch
#

We don't spoonfeed code @earnest phoenix

warm marsh
#

If I is greater i-- or if is less i++

carmine summit
#

i++

earnest phoenix
#

We don't spoonfeed code @earnest phoenix
@solemn latch joking buddy

warm marsh
#

Then use the less than

earnest phoenix
carmine summit
#

ok thanks,,, My brain had a compressor. But it doesn't have decompressor

#

so yeah..

#

How do I cancel a for loop, then move on to the next code if an if statement becomes true

#

HELP HELP HELP

solemn latch
#

I think you might want a while loop not a for loop

carmine summit
#

for

#

wait

#

hmmmmmmmm

#

you know what? im just gon use &&

ionic dawn
solemn latch
#

A while loop is just a loop thats an if statement.
A for loop is a loop that runs x number of times(can be dynamic).

carmine summit
#

ok cool it works

glossy lantern
#

Hello command is not working

dark kestrel
#

what are u guys talking about ?

#

Hello command is not working
@glossy lantern show console

#

and code

glossy lantern
#

How to make bot for lock channels

#

Can you help

dark kestrel
#

By googling

#

google how to make a lock channel

#

simple

glossy lantern
#

No lock channels not

#

Bot for.lock channels

dark kestrel
#

THEN GOOGLE

#

IT

glossy lantern
#

I need to devlop bot for lock channels

#

For that i need command

dark kestrel
#

GOOGLE

glossy lantern
#

Ok

carmine summit
#
message.channel.updateOverwrite(message.channel.guild.roles.everyone, {
      SEND_MESSAGES: false
    })
#

THAT SHOULD WORK

#

ORRRR

#

YOUR SERVER IS SET UP INCORRECT

#

FOR EXAMPLE YOU HAVE A MAIN ROLE, THAT HAS CHANNEL OVERIDES

#

THAT WONT WORK

delicate shore
#

why am i getting this error

opal plank
#

update ur shit

#

node AND/OR d.js

delicate shore
#

I think it is updated

opal plank
#

it likely isnt

#

just re-update everything

delicate shore
#

lemme checl

opal plank
#

node and d.js

delicate shore
#

I did npm update

#

and i did

opal plank
#

update NODE too

glossy lantern
#

@dark kestrel i cant find

#

It

opal plank
#

@glossy lantern what do you need?

glossy lantern
#

@opal plank how to devlop bot for locking the channels

opal plank
#

get channel, @ everyeone and overide perm to SEND_MESSAGE to deny

#

read that

glossy lantern
#

@opal plank ok thx sit

#

Sir

opal plank
delicate shore
#

@opal plank should i update to latest one?

#

or stable one

#

node

#

I am talking about

dark kestrel
#

message.channel.roles.cache.forEach() maybe

#

that will work

opal plank
#

depends on you, i use latest

#

you should prob use LTS

delicate shore
#

Alright thanks

dark kestrel
#

LTS ??

delicate shore
#

latest

opal plank
#

@dark kestrel bad idea, try NOT to use forEach(), like, EVER

#

use better loop functions

dark kestrel
#

.filter( r => !r.permission.has("ADMIN"))

#

this is good 2

#

jk administartyor

opal plank
#

what do you want to do?

dark kestrel
#

filter the role that has admin ignore them and permission overwrite the rest

opal plank
#

also im fairly certain cache is a map, and im also rather confident filter() isnt part o Maps in JS

#

either spread it or iterate thru its entries/values

dark kestrel
#

.cache = collection :/

opal plank
#

which is a MAP

#

if you didnt know

#

filter() might be added to Collection

#

but filter() isnt native to Maps iirc

earnest phoenix
#

a collection has a filter method

#

yeah

opal plank
#

im farily certain filter just spreads the map and runs your function on it

#

lemme see

delicate shore
#

I just got this error

#

what can I do now

#

I need to shift to stable one i think

opal plank
#

bingo

delicate shore
#

Waht

opal plank
#

not talking to you

#

did you use STL?

#

TSL

#

something along those lines, i keep forgetting

#

LTS

solemn latch
#

LTS

opal plank
#

almost there

delicate shore
#

TSL
@opal plank i use this

#

Latest

opal plank
#

LTS

delicate shore
#

sudo n latest

opal plank
#

what?

delicate shore
#

thuis

#

this*

trim saddle
#

@languid dragon before you go to bed i need help with another thing

#

shut up i know it's only 1 PM

languid dragon
#

yes

trim saddle
#

this what i have currently

.drop {
    position: absolute;
    min-width: 160px;
    z-index: 1;
    display: none;
    margin-top: 2%;
    flex-wrap: wrap;
    background-color: black;
    padding: 10px;
    float: right;
    border-radius: 10px;
    overflow: hidden;
} 

.drop a {
    text-decoration: none;
    text-align: left;
    padding: 13px 17px;

}
.drop i {
    margin-right: 4px;
}
earnest phoenix
#

Ok so im using visual studio code, how do I fix this, SyntaxError: C:\Users\trent\Desktop\Momt's Mod\Data\config.json: Unexpected end of JSON input at parse (<anonymous>) at Object.Module._extensions..json (internal/modules/cjs/loader.js:1049:22) at Module.load (internal/modules/cjs/loader.js:879:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:903:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (C:\Users\trent\Desktop\Momt's Mod\index.js:4:27) at Module._compile (internal/modules/cjs/loader.js:1015:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10) at Module.load (internal/modules/cjs/loader.js:879:32)

opal plank
#

@earnest phoenix your json is malformed

earnest phoenix
#

Which part

opal plank
#

dunno, check it

#

your IDE should tell you @earnest phoenix

earnest phoenix
#

When I look at debug console it shows, (node:12716) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided. at WebSocketManager.connect (C:\Users\trent\Desktop\Momt's Mod\node_modules\discord.js\src\client\websocket\WebSocketManager.js:133:26) at Client.login (C:\Users\trent\Desktop\Momt's Mod\node_modules\discord.js\src\client\Client.js:222:21) <node_internals>/internal/process/warning.js:40 (node:12716) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) <node_internals>/internal/process/warning.js:40 (node:12716) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. <node_internals>/internal/process/warn

opal plank
#

read the error @earnest phoenix

earnest phoenix
#

Ficed, ty

#

fixed*

#

How do I handle Discord system errors/exceptions? (not command errors) in discord.py?

#

for example, when the bot hasn't got the required perms

pale vessel
#

check your bot permissions before trying to execute something

trim saddle
#

@earnest phoenix

@bot.event
async def on_error
bleak glacier
#

@earnest phoenix

opal plank
#

@bleak glacier wrong channel

bleak glacier
#

ok

true ravine
#

Idk if this is the right channel to ask in, but I don't have of the accepted forms of ID for bot verification so how am I meant to verify?

#

I know it's not related to topgg I'm just asking

pale vessel
#

probably can't then

#

you can create a support ticket but i doubt they can do anything about it

true ravine
#

This is so sad

pale vessel
#

you can ask your parents

true ravine
#

Nah I don't want them to have verify me lol I'm old enough I just don't have it lul

pale vessel
#

well, good luck

true ravine
#

Thanks

tardy hornet
#

hm??

#
case 'warn':
  let user = message.mentions.users.first()
  if(!user) return message.channel.send(`you did not mention a user!`)
  if(!args.slice(1).join(" ")) return message.channel.send(`you did not specify a reason!`)
  warns.findOne({ guild: message.guild.id, user: user.id})
    if(err) console.log(err)
    if(!data){
      let newWarns = new warns({
        user: user.id,
        guild: message.guild.id,
        warns: [ 
            {
              moderator: message.author.id,
              reason: args.slice(1).join(" ")
            }
        ]
      })
      newWarns.save()
      message.channel.send(`${user.tag} has been warned with the reason of ${args.slice(1).join(" ")}. \`\`\`they have now 1\`\`\` warn.`)

    }else{
      data.warns.unshift({
        moderator: message.author.id,
        reason: args.slice(1).join(" ")
      })
      data.save()
      message.channel.send(`${user.tag} has been warned with the reason of ${args.slice(1).join(" ")}. they now have \`\`\`${data.warns.length}\`\`\` warns.`)
    }
  break;

ReferenceError: warns is not defined

hazy sparrow
#

warns is not defined

misty sigil
#

@tardy hornet may I suggest you read your code

#

and your error

hazy sparrow
#

^

#

Also nothing related to that; you should probably use a command handler

opal plank
#

nothing better than doing this

#

@hazy sparrow

hazy sparrow
#

300 lines uwu

misty sigil
#

Oh what the fuck is that

opal plank
#

thats my index

#

for the twitch cluster project

valid frigate
#

vertical scaling

#

we must ask ourselve, how efficient is this in the long run

#

it presents a single point of failure in a larger infrastructure and thus thanks for coming to my ted talk that clustering is only a temporary solution

tardy hornet
misty sigil
#

install quick.db then?

delicate shore
#

@tardy hornet npm i quick.db

misty sigil
#

@tardy hornet read. your. errors.

tardy hornet
#

its npm install quick.db right?

misty sigil
#

yes

delicate shore
opal plank
#

token leaks

#

yikes

tardy hornet
#

that what i was going to ask

opal plank
#

imagine having your token leaked

delicate shore
#

Heh I had already reset it

#

before uploading

#

to github

tardy hornet
#

imagine having your token leaked
@opal plank who?

#

me???

delicate shore
#

no

tardy hornet
#

please god not me

delicate shore
#

Me

tardy hornet
#

oh lol

delicate shore
opal plank
#

the only messages from clyde that i get are supportive messages saying your bot sucks and you should feel ashamed mmulu

tardy hornet
#

what????????????

#

i download it

#

and still

opal plank
#

clearly not in the right folder

#

or you mispelled it

#

isnt it quick-db?

tardy hornet
#

i did npm install quick.db

opal plank
#

nah, its definetly quick.db

#

did u install it on the wrong folder/path?

tardy hornet
#

how do i check?

opal plank
#

you got your terminal open?

carmine summit
#
const overSend = m =>{
  let array = m.match(/.{1,3}/g);
  array.forEach(str => message.channel.send(str))
}
```How can I define message?
tardy hornet
#

yes

opal plank
#

screenshot it

delicate shore
#

Can i ask one thing

opal plank
#

no

delicate shore
#

Ok I will ask 2 then

opal plank
#

just ask it

lament nimbus
tardy hornet
#

wait

lament nimbus
#

I dont understand

tardy hornet
#

its only for phyton @opal plank ?

opal plank
#

erm, i assumed you were on js

delicate shore
#

First : What is contribution on github

I made a public repo

Now i want people to help me make code better
I have seen many repo's do contribute thingy
Can someone explain me how it worked

carmine summit
#

ello ello

tardy hornet
#

yes

opal plank
#

then....?

#

what does py have to do with it?

carmine summit
#
const overSend = m =>{
  let array = m.match(/.{1,3}/g);
  array.forEach(str => message.channel.send(str))
}
```How can I define message?
tardy hornet
#

that what

opal plank
#

you installing it under among us emojis

tardy hornet
#

how do i install it on something else ?

opal plank
#

cd and navigate thru the proper folder

#

or open the terminal in the folder right away

delicate shore
#

First : What is contribution on github

I made a public repo

Now i want people to help me make code better
I have seen many repo's do contribute thingy
Can someone explain me how it worked
@delicate shore
Do i give them my account access?

#

so they can make pull

#

requests

earnest phoenix
opal plank
#

@delicate shore check git/githup PR's

delicate shore
#

PR's?

opal plank
#

pull requests

#

or merges

delicate shore
#

Ohh

carmine summit
#

can I ask??

tardy hornet
#

@opal plank like made a folder there call quick.db

opal plank
#

no

#

nonono

#

whats your bot folder?

earnest phoenix
#

Lmao

carmine summit
#

uh

tardy hornet
carmine summit
#

can someone help me

#

please

earnest phoenix
#

HAHAHAHAHAA

opal plank
#

thats the ACTUAL folder?

#

for the bot?

tardy hornet
carmine summit
#

cAn SoMEoNe HelP ME

earnest phoenix
#

you need a folder containing the commands from the bot

opal plank
#

im not even gonna ask why your display is screwed like that

carmine summit
#

XDDDDDDDDDDDDD

earnest phoenix
#

im not even gonna ask why your display is screwed like that
@opal plank AHHAHAHAHAHAHAHAHA

tardy hornet
#

my language is spaghetti

opal plank
carmine summit
#

HELP HELP HEPL HELP HELP

#

PLEASE

earnest phoenix
#

I'm currently working on a bot for my server, and you know all the programming languages

carmine summit
#
const overSend = m =>{
  let array = m.match(/.{1,3}/g);
  array.forEach(str => message.channel.send(str))
}
```How can I define message?
opal plank
#

time for some coding now

carmine summit
#

uhhh

#

HELP?

valid frigate
#

id like to have some friendly debate in the effectiveness of clustering node.js processes

#

with anyone whos down to do so

fluid basin
#

clustering is an optional "feature" that nodejs provides

#

you can run your processes manually as well

valid frigate
#

hmm this is true

#

do you believe that it would scale well

carmine summit
#

uh

#

how do I split my string to arrays that has a maximum of 2000 characters?

fluid basin
#

yeah definitely @valid frigate, clustering is basically multi-processing which takes up all cores of your CPU/server

#

how do I split my string to arrays that has a maximum of 2000 characters?
get the first 2000, then skip 2000 and get the next 2000, etc, etc

hasty mulch
#

In Python, how would I get a cooldown error working with retry_after?

twilit horizon
#

I have a 123mb ram and 3 gb storage server to host discord bot . Anyone needed??

hasty mulch
#

123MB of RAM?

twilit horizon
#

yes

hasty mulch
#

@slender thistle Seems sus

slender thistle
#

@twilit horizon What do you mean by "give it free"?

twilit horizon
#

yes

slender thistle
#

In Python, how would I get a cooldown error working with retry_after?
I'd suggest implementing your own cooldown system or using commands extension's

#

... unless that's what you mean

hasty mulch
#

Still need the error message working

#

The cooldown is fine, itโ€™s the error I need help with

slender thistle
#

Digging up the docs but laptop is misbehaving

#

give me a minute

hasty mulch
#

K, you know my DMs are open

vital thunder
#

Hi how do i make bot

#

PIng me if you know

silver lintel
#

how to filter letter from string? so 'hello everyone' and remove e becomes 'hllo vryon'

pale vessel
#

you can use .replace() or split the string by "" and use array.filter()

#
"hello everyone".replace(/e/g, "");
"hello everyone".split("").filter(x => x !== "e").join("");```
#

oop i just assumed you use javascript

#

but it's the same concept in any other languages

silver lintel
#

yay it works ty

pale vessel
#

nice man glad i could help

manic imp
#

help

#

how can i make deposit command

#

i cant explain whats the problem

#

lmfao

silver lintel
#

you would just take the wallet bal and deduct a value and add it to bank

manic imp
#

using quick.db

pale vessel
#

same concept

#

get the data, update, save the new value

manic imp
#

i alr make but if i deposit nothing deducting in my money

raw silo
#

hi, not sure whether this has been asked before. What's the best practice to run a bot in a production and test at the same time? So have a live current version of a bot that users use now, but have another version that I improve and want to test at the same time?

#

can I have 2 bots (with 2 different tokens) under the same application?

slender thistle
#

Two options:

  1. Use one bot account, commands are attached to specific channels or a guild and a separate prefix. You would have to make sure the testing version is also restricted only to you if the channels/guild is/are public. Ratelimits might be an issue at some point, though, as you will use the prod bot account.

  2. Create a separate bot account that can't be invited anywhere by non-owners and use it. Ratelimits will be less of an issue.

raw silo
#

so in the second approach I create a new application and a new bot in discord

slender thistle
#

Mhm

raw silo
#

๐Ÿ‘

earnest phoenix
#

"can i have 2 bots (with 2 different tokens) under the same application?" Sadly that's not possible but there's an approach to this, create a private API where only you can use it, and send the main bot's data to the api, and pull that dafa from the second bot

#

So you can do tests

slender thistle
#

You can run multiple bot scripts under one token, which is the first option I listed

#

since a token is attached to a Discord application

earnest phoenix
#

It's possible to run 2 bots with the same token but anything you do on the second bot will also happen in the first, because they're using the same token

delicate shore
#

How to release my bot as a npm package

#

Mean if someone does
Const xyz = require('xyz')
xyz.token("")

#

So the bot will work

#

Wuth same function

#

As my bot

shrewd glen
#

k

earnest phoenix
#
<Your entire bot here>

module.exports = {
token: function token(string) {
<client>.login(string);
return <client>;
}
};```
zenith pecan
#

someone knows how to do a cooldown in command handler?

open rune
#

try using setTimeout

zenith pecan
#

I've used it, but it still doesn't work for me

earnest phoenix
#

Best way to set cooldowns is to use a database

open rune
#

^

#

if you have database, try it

earnest phoenix
#

@earnest phoenix you can just use a map for cooldown data

silver lintel
#

I use collection but I'm pretty sure I'm wrong

open rune
#

map or collector are temp database tho

earnest phoenix
#

I know, map prototypes reset when you restart the bot

#

i doubt 5 second cooldown remainders will matter when the bot restarts

open rune
earnest phoenix
#

yellow button

open rune
#

nah

#

it's only when it get hover

earnest phoenix
#

button:hover {background:yellow}

open rune
#

yes

zenith pecan
#

try what it says in Discord.js guide but I skip the command and the reply

open rune
#

background-color*

earnest phoenix
#

@zenith pecan Show code?

open rune
#

discord.js guide sometimes doesn't help me much

#

but stackoverflow did

zenith pecan
#

is the same as the one in the Discord.js Guide

earnest phoenix
#

Just show it

open rune
#

put your source code here without lacking your token

zenith pecan
#

it won't let me connect, that's why

earnest phoenix
#

Connect to wot?

open rune
#

maybe it's too big

#

?

#

try github and give us the link if so

earnest phoenix
#

Or hastebin

zenith pecan
#

to Glitch

#

there I host it

earnest phoenix
#

Well rest in pepperonis

open rune
#

afaik, glitch is not that good, am I wrong?

earnest phoenix
#

Glitch is the best only for free hosting, but it's not efficient because it's not meant for bot hosting

zenith pecan
#

it's because whoever did it does it in Glitch

earnest phoenix
#

So you copied someone's bot?

zenith pecan
#

haha no, we do it together

open rune
#

ok, back to the point, "source code"

zenith pecan
#

and we don't know how to do a cooldown, that's it

earnest phoenix
#

That's why we said provide source code as you said it doesn't work and bypasses the check

#

So we can check what the problem is

zenith pecan
#

Well, as soon as my partner connects I will let you know since he does not let me enter the Project

open rune
#

or I will tell you about my logic for cooldown
I used setTimeout to add cooldown logic with it, and some function for the timer. I also use collectors

zenith pecan
#

Okay

open rune
#
const embed = new Discord.EmbedMessage() // Set up your embed code
.setColor('#rgb')
.setDescription('description')
msg.channel.send(embed).then(message => {
  setTimeout(() => {
    // fill it with whatever you want
  }, <cooldown>); // put the cooldown inside
})

This is what I currently using.

#

so, the setTimeout() will affect how long it should be work again

zenith pecan
#

and it works fine?

open rune
#

it works fine, however, I didn't copy paste all my code here

#

so, there are probably some mistakes

zenith pecan
#

Okay

vital thunder
zenith pecan
#

@open rune and how do I put the reply message?

open rune
#

message.reply(' ') ?

zenith pecan
#

the message that says how much time is left

open rune
#

use function for that

#

you do know how to get result of a function right?

zenith pecan
#

more or less

delicate shore
#
<Your entire bot here>

module.exports = {
token: function token(string) {
<client>.login(string);
return <client>;
}
};```

@earnest phoenix
Oh

#

In the main file ?

#

Right ?

#

And I can upload it as a npm package ?

#

But like I check ./storage.json

#

So do I need to change the oath

#

Path*

#

To something like node_modules/ehwiekd/usiejeid

#

Something like this

earnest phoenix
#

What?

#

hey

#

hi

delicate shore
#

What?
@earnest phoenix
Means that only code will work without changing location of any files ?

earnest phoenix
#

You don't need to change to location of the file

delicate shore
#

Alright

#

And then I can upload my npm package ?

#

@earnest phoenix one last thing
Like currently my bot is open source
People clone it and put their token in config.json
So will the config.json file effect npm package ?

#

If I put this code in the end

#

module.exports = {
token: function token(string) {
<client>.login(string);
return <client>;
}
};```
earnest phoenix
#

It's not like you have to detect that file

delicate shore
#

Means M

earnest phoenix
#

Lemme edit it so it warns them if they don't provide a token or an invalid one

gentle lynx
delicate shore
#

Ok

#

No

#

@gentle lynx send code

gentle lynx
#
  try {
        var reg = new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?")
        if (reg.test(message.author.presence.activities[0].state)) {
            if (!message.member.hasPermission(`MANAGE_MESSAGES`)) {
                message.delete()
                message.author.send(`${message.author} You have an advertisement set as your custom status, and as such you are being prevented from chatting ![NM_peepoOfficer](https://cdn.discordapp.com/emojis/762046769831215184.webp?size=128 "NM_peepoOfficer")`)
            }
        }
    } catch (e) {

    }```
earnest phoenix
#
<Your entire bot here>

module.exports = {
token: function token(string) {
if (!string || typeof string !== "string") throw new TypeError("Expected a token, and it must be a string");
try {
<client>.login(string);
} catch(err) {
throw new Error("An error occurred when trying to login, error: " + err);
}
return <client>;
}
};```
#

@delicate shore Here

delicate shore
#

Ok thanks

#
  try {
        var reg = new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?")
        if (reg.test(message.author.presence.activities[0].state)) {
            if (!message.member.hasPermission(`MANAGE_MESSAGES`)) {
                message.delete()
                message.author.send(`${message.author} You have an advertisement set as your custom status, and as such you are being prevented from chatting :NM_peepoOfficer:`)
            }
        }
    } catch (e) {

    }```

@gentle lynx

Which message are u deleting ?
I mean
Is the command being executed

#

Or is it in an event

gentle lynx
#

it's in the message event

delicate shore
#

I mean what is execution

gentle lynx
#

if somebody has an ad in their status their message will get deleted and the bot will DM them

#

but the bot DMs them twice

#

and i got this error

earnest phoenix
#

It's because you're trying to send the message while the user's message is being deleted

gentle lynx
#

should i put the message deletion after the DMing?

earnest phoenix
#

resolve the promise

#
  try {
        var reg = new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?")
        if (reg.test(message.author.presence.activities[0].state)) {
            if (!message.member.hasPermission(`MANAGE_MESSAGES`)) {
                await message.delete()
                message.author.send(`${message.author} You have an advertisement set as your custom status, and as such you are being prevented from chatting :NM_peepoOfficer:`)
            }
        }
    } catch (e) {

    }```
gentle lynx
#

ah ok

#

thanks

summer acorn
#

how do I check if a port is in use using express

delicate shore
#

I have a file

#

package.json

#

you can see

drifting wedge
#

how do i like change EVERY mongo db post in a db?

slender thistle
#

Every document?

earnest phoenix
#

@delicate shore Are you running npm publish in the directory where the files are?

drifting wedge
#

Every document?
@slender thistle so basically im making a Intrest command

#

which every 32 hours, it multiplies everyone's bank by 1.02*

slender thistle
#

updateMany with {} as the filter

drifting wedge
#

{would be like all the ids?}

#

like how would i get the ids?

#

also would it be easier for it to just be a command?

#

like they run !intrest

#

etc\

slender thistle
#

ehh

#

Why would you need the IDs? Do you want to update filtered documents?

balmy anchor
#

Hi guys
Do u know how to disable permission to a role?

#

d.js lib

earnest phoenix
#
<Role>.setPermissions()```
balmy anchor
#

I tried it

#

But I cant disable permissions with this

earnest phoenix
#

You mean, you want to remove permissions from a role?

balmy anchor
#

Yes

#

like make permission "false"

earnest phoenix
#

It's possible to do something like this

<Role>.edit({
permissions: {
allow: [<allowed permissions>],
deny: [<denied permissions>]
}
});``` i think
balmy anchor
#

Okay, I'll try thx ๐Ÿ˜„

faint prism
#

role is undefined

balmy anchor
#
let role = message.guild.roles.cache.find(r => r.name === "Muted");
#

that's what i used

faint prism
#

Is there a role with the name "Muted" ?

#

Try to add some console.log output, or set a breakpoint

balmy anchor
faint prism
#

Does that mean it always attempts to create a new role currently?

balmy anchor
earnest phoenix
#

Because creating a role returns a promise

#

await it

balmy anchor
#

the role creation?

earnest phoenix
#

Yes

faint prism
#

also, that else if won't continue where the if left off. It'll skip the logic inside if a previous conditional is true

next flax
#

hello

balmy anchor
next flax
#
const bot = new Discord.Client();
const token = "";
bot.on("ready", ()=>{
let channel = bot.channels.cache.find((x) => (x.id === "759428694711336960"))   
channel.join()
bot.user.setPresence({ activity: { name: 'Playing Music ', type: "PLAYING" }, status: 'dnd' })
console.log(`${bot.user.tag} is setup `)
});

bot.login(token); ```
#

whats wrong

faint prism
balmy anchor
#

I've already awaited it

#

owo

earnest phoenix
#

What's the problem tho

next flax
#

it says invalid token

#

thou its valid

balmy anchor
earnest phoenix
#

Oh

#

@balmy anchor permissions: ["SEND_MESSAGES"]

balmy anchor
#

so?

#

i dont understand lol

earnest phoenix
#

It shouldn't be an object

#

Just an array

balmy anchor
#

so i should use a permissions calc ?

earnest phoenix
#

No

faint prism
#

it says invalid token
@next flax sounds like it isn't though. Have you tried regenerating the token and trying again?

next flax
#

HM

earnest phoenix
#
permissions: {
allow: [],
deny: ["SEND_MESSAGES"]
}```
โ†“
```js
permissions: []```
#

@balmy anchor

balmy anchor
#

So to deny the perms i will need to use <Role>.edit()?

warm marsh
#

You can also pass it when creating the role.

earnest phoenix
#

You can't choose to allow or deny permissions on role, you can either set the role to allow it or don't set the permission to deny it

balmy anchor
#

You can't choose to allow or deny permissions on role, you can either set the role to allow it or don't set the permission to deny it
So How can I do it?

warm marsh
#
<RoleManager>.create({
  data: {
    permissions: new Discord.Permissions(0)
  }
});
earnest phoenix
#

Or just js permissions: []

warm marsh
#

permissions takes any permission resolvable.

#

So could just put 0.

balmy anchor
#

@warm marsh but how do I define the permission I want to use?

warm marsh
#

permissions: ["PERMISSIONS_HERE"]

balmy anchor
#

I've already tried it

#

and it didnt worked

earnest phoenix
#

Either calculate the permission's bitfields you want to set or use their flags

balmy anchor
#

Yeah, I've already understand this but I want to deny a permission and not allow it

earnest phoenix
#

To deny a permission from the role, don't set the permission

balmy anchor
#

It's working, Thx ๐Ÿ˜„

#

Sorry for wasting ur time tho

earnest phoenix
#

It's okay

balmy anchor
#

It's me again,
Does anyone knows how to deny role's permissions at all the text channels in the current guild?

#

I saw something like this but it just creates a channel

finite bough
#

@balmy anchor are u trying to make a new role or editing a given role

balmy anchor
#

im trying to edit a specific role's permission at all channels in the guild

finite bough
#

overwritePermissions

balmy anchor
#

yes but how do I get all channels?

#

for loop it?

shell sand
#

Im trying to figure and find a bot that does response and reminds like this

finite bough
#

yea

shell sand
balmy anchor
#

i tried something like for looping it

#

but it didnt worked

finite bough
#

u can also use forEach()

earnest phoenix
#

Don't do a loop as instant, put timeouts

#

Because it's API abuse

balmy anchor
#

something like forEach(<Guild>.channels) {
//CODE
}
?

#

Because it's API abuse
@earnest phoenix I still dont understand what api abuse means OwO

cinder sandal
#

can you please put the code in a code block (3 `)

faint prism
#

Voltrex Master#0001 I still dont understand what api abuse means OwO
@balmy anchor discord.js is a library to handle interactions with the discord api
It makes api calls for you. Like how your browser handles talking to websites for example

cinder sandal
#

this is hurting my brain

dark kestrel
balmy anchor
#

ok

cinder sandal
#

putting code in plain text and not in

code blocks```
is hurting my brain
shell sand
#

@cinder sandal here

faint prism
#

Much better. Looks like Discord now lol

cinder sandal
#

โฌ†๏ธ

trim saddle
#

@cinder sandal you

#

are you any good at css

earnest phoenix
#

@balmy anchor Best way to do this is

let channels = [...<Guild>.channels.cache.array()];

let permissionSetInterval = setInterval(() => {
if (!channels.length) return clearInterval(permissionSetInterval);

channels[0].overwritePermissions(<overwrite here>);

channels.splice(0, 1);
}, 180000);```
balmy anchor
cinder sandal
#

i did css some years ago

#

but i forgot the whole css thing