#development

1 messages ¡ Page 1842 of 1

rigid maple
#

sorry i kept you busy too

eternal osprey
#

i have this little array setup and want to check if an id is in there: js if(gifusers.indexOf(pingeduser.id)){ return message.channel.send("test") } Why is indexOf not a function?

#

tf was that

earnest phoenix
#

well

#

an easier thing to use would be includes

#

it returns true/false depending on if the value given to the includes method exists in the array

earnest phoenix
limber mica
#

so when trying to register slash commands i get the error no permission and I use this invite: discord.com/oauth2/authorize?client_id=<no id for you>&scope=bot+applications.commands&permissions=8 and my bot has every permission, idk whats wrong

#

In js

eternal osprey
#

If the object.length == 1, why is it not removing the last id? from an object

earnest phoenix
#

What

eternal osprey
#

nvm

#

hey. how do i create a reaction collector without a time limit?

earnest phoenix
#

just dont give it one

eternal osprey
#

smart asf mistty

digital ibex
#

i doubt that'd change anything but 🤷

limber mica
digital ibex
#

what?

pale vessel
#

are you registering guild or global commands

#

ah wait

limber mica
#
const messageCreate = require('./events/guild/messageCreate');

module.exports = {
    async execute(client, message){

localisedCommands = [{name: 'ping',description: 'Pong!'}]


        

        let GUILD_ID = "7754892982200565830"
        let CLIENT_ID = client.user.id
      
            await client.application?.commands.set(localisedCommands, GUILD_ID)
           
            console.log("[BOT-EVENTS] : Bot commands updated successfully!")
            message.channel.send("Updated successfully!")
    }
}
#

code

pale vessel
#

what's the full error?

limber mica
# pale vessel what's the full error?
N:\Desktop\Stealth Dynamics Bot\node_modules\discord.js\src\rest\RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Missing Access
    at RequestHandler.execute (N:\Desktop\Stealth Dynamics Bot\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (N:\Desktop\Stealth Dynamics Bot\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async ApplicationCommandManager.set (N:\Desktop\Stealth Dynamics Bot\node_modules\discord.js\src\managers\ApplicationCommandManager.js:146:18)
    at async Object.execute (N:\Desktop\Stealth Dynamics Bot\register.js:17:13) {
  method: 'put',
  path: '/applications/874990390900576326/guilds/7754892982200565830/commands',
  code: 50001,
  httpStatus: 403,
  requestData: {
    json: [
      {
        name: 'ping',
        description: 'Pong!',
        type: undefined,
        options: undefined,
        default_permission: undefined
      }
    ],
    files: []
  }
}
earnest phoenix
#

Doesnt the bot need permissions in that specific guild

earnest phoenix
#

But if it has Administrator then ig it doesn't matter

boreal iron
#

Missing application commands scope

pale vessel
#

that's not the permission

limber mica
earnest phoenix
#

He has it

pale vessel
#

you need the scope not permission

earnest phoenix
#

yea

#

and he has the scope

pale vessel
#

try reinviting it

boreal iron
#

Ahh alright just guessing u know

limber mica
boreal iron
#

I needed to reinvite the bot, too

limber mica
#

still no fix

earnest phoenix
#

Well

boreal iron
#

Weird…

earnest phoenix
#

You could try asking in the d.js server

limber mica
earnest phoenix
#

I doubt you got no response

#

that server is active

boreal iron
#

Try to create another test guild

earnest phoenix
#

smh

pale vessel
#

make sure you have the correct guild ID too

earnest phoenix
#

Indeed

#

make sure its a guild ID period

limber mica
limber mica
#

that server right now

earnest phoenix
#

O wait I left it

#

My bad

limber mica
#

lmao

limber mica
boreal iron
#

Accidentally added an extra char?

pale vessel
#

maybe he added an extra 0

#

rookie mistake

limber mica
boreal iron
limber mica
#

But now its just not visible

#

slash command aint there

pale vessel
#

Then it worked

boreal iron
#

Then clear your browser cache

#

Needed to do that as well

limber mica
#

im on the appppppp

pale vessel
#

I didn't need to do that

#

Well I use the client so

#

¯_(ツ)_/¯

boreal iron
#

Oh nvm

pale vessel
#

U back to old pfp

#

Aka no pfp

boreal iron
#

Yee my creation was ugly

pale vessel
#

yeah even the creation itself threw up

boreal iron
#

Can’t find a nice one tho

limber mica
#

Still does not work

#

;-;-;-;-;-;-;

#

;;;;;;;;;;;;;------------;;;;;;;;;;;;;;

earnest phoenix
#

then you did something wrong

#

cause guild commands load instantly

limber mica
#
const fs = require('fs');
const Discord = require('discord.js')
const config = require('./config.json');
const messageCreate = require('./events/guild/messageCreate');

module.exports = {
    async execute(client, message){

localisedCommands = [{name: 'ping',description: 'Pong!'}]


        

        let GUILD_ID = "754892982200565830"
        let CLIENT_ID = client.user.id
      
            await client.application?.commands.set(localisedCommands, GUILD_ID)
           
            console.log("[BOT-EVENTS] : Bot commands updated successfully!")
            message.channel.send("Updated successfully!")
    }
}
pale vessel
#

the commands look fine

boreal iron
#

No error?

limber mica
#

how about a rest request instead

earnest phoenix
#

Don't think it matters tbh

#

That essentially already does what you would do

pale vessel
earnest phoenix
#

just not one you formed yourself

limber mica
#

still NOTHING

#

GOD

#

FUCKING

#

DAMMIT

#

can someone help me stop having a stroke

pale vessel
#

self-control

quartz kindle
#

youre setting a global command

#

those take 1 hour

pale vessel
#

they provided a guild ID though

quartz kindle
#

oh you can do it from there

#

theres guild.commands.set as well

earnest phoenix
#

yea

#

you can provide a guild id and it sets it for the guild

#

the discordjs guide is weird though

#

they dont even bother using that

boreal iron
#

Set returns a promise

earnest phoenix
#

Though tim I have a feeling it is still trying to register a global command

#

or they are doing something wrong

limber mica
boreal iron
#

Put a catch in there to see if an error occurs

limber mica
#

dont work

boreal iron
earnest phoenix
#

wdym dont work

limber mica
#

No error, jsut does not work

quartz kindle
#

if an error occured it would throw an unhandled rejection

quartz kindle
#

have you tried reloading your discord app?

boreal iron
#

If he doesn’t suppress them KEKW

quartz kindle
#

i believe someone had that problem

#

and it turned out they needed to refresh their discord to see the changes

boreal iron
#

Well I had this issue too but on the browser bc of the cache

limber mica
#

every time after the bot says it did it right

boreal iron
#

Yeah I know he’s using the app…

limber mica
#

Here is the console.log for my set command

#
Collection(1) [Map] {
  '875132306338226218' => <ref *1> ApplicationCommand {
    id: '875132306338226218',
    applicationId: '874990390900576326',
    guild: Guild {
      id: '754892982200565830',
      name: 'Stuff',
      icon: null,
      features: [],
      commands: [GuildApplicationCommandManager],      
      members: [GuildMemberManager],
      channels: [GuildChannelManager],
      bans: [GuildBanManager],
      roles: [RoleManager],
      presences: PresenceManager {},
      voiceStates: [VoiceStateManager],
      stageInstances: [StageInstanceManager],
      invites: [GuildInviteManager],
      deleted: false,
      available: true,
      shardId: 0,
      splash: null,
      banner: null,
      description: null,
      verificationLevel: 'NONE',
      vanityURLCode: null,
      nsfwLevel: 'DEFAULT',
      discoverySplash: null,
      memberCount: 6,
      large: false,
      applicationId: null,
      afkTimeout: 300,
      afkChannelId: null,
      systemChannelId: null,
      premiumTier: 'NONE',
      premiumSubscriptionCount: 0,
      explicitContentFilter: 'DISABLED',
      mfaLevel: 'NONE',
      joinedTimestamp: 1628718137266,
      defaultMessageNotifications: 'ALL_MESSAGES',
      systemChannelFlags: [SystemChannelFlags],
      maximumMembers: 100000,
      maximumPresences: null,
      approximateMemberCount: null,
      approximatePresenceCount: null,
      vanityURLUses: null,
      rulesChannelId: null,
      publicUpdatesChannelId: null,
      preferredLocale: 'en-US',
      ownerId: '574445866220388352',
      emojis: [GuildEmojiManager],
      stickers: [GuildStickerManager]
    },
    guildId: '754892982200565830',
    permissions: ApplicationCommandPermissionsManager {
      manager: [Circular *1],
      guild: [Guild],
      guildId: '754892982200565830',
      commandId: '875132306338226218'
    },
    type: 'CHAT_INPUT',
    name: 'ping',
    description: 'Pong!',
    options: [],
    defaultPermission: true
  }
#

so i just did .then(console.log)

(sorry for the big message)

#

But it IS the command and its showing as done

quartz kindle
#

looks like its being registered correctly

limber mica
#

wait

limber mica
earnest phoenix
#

?

quartz kindle
#

?

limber mica
#

I think

earnest phoenix
#

is this mans claiming he uses better discord

limber mica
#

i think its fucking me over

#

give me a sec

quartz kindle
#

you're using better discord?

limber mica
#

not anymore

earnest phoenix
#

This guy

limber mica
#

but it was installed

earnest phoenix
#

yea cause you just turned it off

limber mica
#

no it crashes on launch

boreal iron
#

Wtf are u even talking about?

earnest phoenix
#

You know you aren't supposed to admit you use a modified client right

quartz kindle
#

nobody cares lol

pale vessel
#

yeah it doesn't matter

limber mica
#

STILL NOTHING

earnest phoenix
#

yea but there are those who do

pale vessel
#

well they can suck discord's ****

boreal iron
#

Huh client mods aha…

earnest phoenix
#

and will report cause they have nothing better to do

quartz kindle
quartz kindle
earnest phoenix
#

lol

boreal iron
#

If I manipulate the code on my client who the fuck should care about that anyways?
People are weird…

limber mica
#

trying browser

earnest phoenix
#

Its something discord cares about ig

#

idk why

quartz kindle
#

they said they "mostly dont care"

limber mica
#

works on browser?????

quartz kindle
#

there you go

earnest phoenix
#

Then why do they have it on their guidelines or whatever as a no no

boreal iron
#

Lmao

quartz kindle
#

they have to make the rules clear

#

doesnt necessarily mean they are strongly enforced

pale vessel
earnest phoenix
#

Honestly they could resolve this by implementing what better discord does themselves

#

ez

quartz kindle
#

the same way they are doing with guilded?

#

:^)

earnest phoenix
#

oh no

#

guilded must not be mentioned

#

please

limber mica
#

How can i not see it on my client?

earnest phoenix
#

probably a visual bug

quartz kindle
#

clear your client's cache

limber mica
boreal iron
limber mica
boreal iron
#

But don’t modify your client!

#

That goes to Tim

earnest phoenix
#

Why not

#

themes are cool

quartz kindle
#

type %appdata%

#

search for a discord folder

limber mica
#

there is a LOT of icons there

#

folders

quartz kindle
#

there is one named discord

earnest phoenix
quartz kindle
#

and inside it there are a couple with "cache" in their names

#

delete those

#

and restart the app

boreal iron
#

Speaking about the client

#

Mine is fucked up

quartz kindle
#

make sure you're actually closing the app and not just hiding and showing again

#

you can check in your task manager if it was actually closed

quartz kindle
boreal iron
#

Probably need to install a client mod to get rid of the Discord bugs KEKW

limber mica
#

no luck

quartz kindle
#

then wait and try again tomorrow

#

or uninstall and reinstall the app

#

who knows

#

browsercord > app

boreal iron
#

At least it works in the browser

quartz kindle
#

i've always used browsercord, i dont even have the app installed

boreal iron
#

Haaa grandpa I see

#

Me either

quartz kindle
#

/highfive

boreal iron
#

Who fucking wants to install an app if we got a browser version

quartz kindle
#

ye

#

plus browser versions are usually the "master" version

boreal iron
#

OLDSCHOOL rockz

quartz kindle
#

everything else is clones in other langs

#

the world is moving towards the web being your desktop xd

#

soon enough we'll have a browser-based operating system

quasi hearth
#

oh no

quartz kindle
#

and all your pc does is boot into a browser

#

xD

#

actually we already have that in chromiumOS

limber mica
#

YAY!!!!!!!!

#

IT WORKS

lyric mountain
#

like, you can literally install the website since it's react

boreal iron
#

God damn only people above 50y accompanied by their parents
are allowed to ping me okeh

#

shame on you

quartz kindle
#

lmao

limber mica
#

How do i pull specific data from this:

#

[ { name: 'command', type: 'STRING', value: 'gi' } ]

#

AKA how do i pull value from that

earnest phoenix
#

get the first value of the array and then use that to get value

limber mica
earnest phoenix
#

Are you sure that is being returned from args?

limber mica
#

let args = [ { name: 'command', type: 'STRING', value: 'gi' } ]

#

returns undefined

earnest phoenix
limber mica
earnest phoenix
#

huh

limber mica
#

Thats what it says in the console

earnest phoenix
#

Yea but I dont see why

#

What are you doing to it

#

Show some code please

#

I can't keep guessing

limber mica
#
const config = require('../../config')
const Discord = require('discord.js')


//Main module
module.exports = (client, member, interaction) => {
    console.log(interaction.commandName)
    console.log(interaction.options._hoistedOptions)
    const command = client.commands.get(interaction.commandName)
            || client.commands.find(cmd2 => cmd2.aliases && cmd2.aliases.includes(interaction.commandName));
console.log(interaction)
let args = interaction.options._hoistedOptions
if (!args) {
let args = null;
}
console.log(args)
            if (command) command.execute(client, Discord)
    }

#

when i add ANYTHING to the 3rd to last line it returns object object

earnest phoenix
#

and logging args returns object Object

limber mica
earnest phoenix
#

hm

#

I have always been confused on what causes this

#

so im not sure what I can do to help if at all

#

sorry

limber mica
#

fuck

sudden geyser
#

All this does is save 9 characters

quartz kindle
#

lol

earnest phoenix
#

seems cool

boreal iron
# limber mica ```js const config = require('../../config') const Discord = require('discord.js...

let args = interactions.options._hoistedOptions

Holy fucking shit!
You’re trying to access a property which is not supposed to be accessed like you do.
And you’re doing that just because your console has spit that out.

People really NEED to read docs.

https://discord.js.org/#/docs/main/stable/class/CommandInteractionOptionResolver

If you wanna access the property without using the methods then use:

interaction.options.data

limber mica
summer torrent
#

interaction.options.get()

boreal iron
#

Yeah get() if you wanna use the method

crystal wigeon
sudden geyser
#

don't ask to ask pls

crystal wigeon
#

socket.io-client actually

#

so like im trying to use socket.io-client with polling

#

I dont quite understand how do i handle this on the server side

#

like do i define some routes for the connection?

#

couldn't find any examples for socket.io-client with polling

#

they just say change the transports to polling

#

but how do i handle that on the server side

lament rock
#

polling on a socket destroys the purpose of using a socket

#

You should only be sending data to the client when the data's state changes. You should send a full state on socket ready and have the client patch the data on change, so provide enough data for it to do that

lyric mountain
lament rock
#

True. Just use standard ws upgrades

delicate shore
#

um guys

#
app.get("/premium/:file" , async(req,res) => {
  let emailofuser = req.path.file
  console.log(emailofuser)
  let data = await premium.findOne({
    email: emailofuser
  })
  console.log(data)
  if(!data){
    return res.json(["no", "no", "no"])
  }else if(data){
    res.json(["yes", data.plan, data.key])
  }
})
rocky hearth
#

how can I remove n spaces, a |, n spaces in a string with regex?
like hello | there| whats |up, to be just hellotherewhatsup

delicate shore
#

if I console log those details

#

it says this

#

I dont know why this is happening

#

because

#

anyone?

sacred aurora
#

not path

delicate shore
#

ohh

#

no @sacred aurora

sacred aurora
#

you trying to access the file params right?

delicate shore
#

yes

sacred aurora
#

then its req.params.file

delicate shore
#

ok..

#

let me try

sacred aurora
sacred aurora
#

without the .file

delicate shore
#

Yess Thank you @sacred aurora

rocky hearth
sacred aurora
#

np

next eagle
#

Hey does anyone get this error while connecting to MongoDB Atlas using mongoose?

#

I am using the latest version and driver still this error 😕

#

and the credentials are correct because they are working when I supply them to ROBO 3T

next eagle
hot star
#

Yes

next eagle
#

Hmmm I am using NodeJS

hot star
#

Super easy

next eagle
#

oh

hot star
#

Idk about js but it's must be very similar to pymongo I guess

next eagle
next eagle
#

Anyone else pls? Sweatduck

#

Cuz this error is completely obstructing me from proceeding -_-

earnest phoenix
next eagle
#

Still the same

summer torrent
#

do you use atlas?

#

did you whitelist your ip?

#
MongoDB Developer Community Forums

PLEASE HELP L L ☹ few days i try to solve this issue but no success resolved i try to connect my node js app Back-end to mongodbatlas Error: querySrv ECONNREFUSED _mongodb._tcp.xxxcluster.v1ulb.mongodb.net at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19) { errno: undefined, code: ‘ECONNREFUSED’, syscall: ‘querySrv’, hostname: ‘_m...

next eagle
next eagle
#

Thanks to this article I was able to connect to the DB :))

green pebble
#

btw.. is there any good enuf tutorial on custom css for top.gg?
i tried to do some... but i would like a more detailed explanation
please suggest a writeup/yt vid etc

delicate shore
#

Guys whY am I getting this error

#

it thinks my code is this

#

this is the true one

#

I have restarted/clear cached/tried diff browser and everything you can thing of

quartz kindle
#

file was not found

delicate shore
#

see the second and third picture I sent

#

what browser thinks my code is

#

what my actual code is

#

idk why it's like that

delicate shore
quartz kindle
#

is your dev tools cache disabled?

delicate shore
#

btw dim this is off-topic, but you made AstroBot right?

quartz kindle
delicate shore
#

No It's not

quartz kindle
#

disable it

delicate shore
#

okay

#

I did it

#

but still got the error

#

reloaded the tab as well

#

should I just create a new file in Root directory with same name lol

quartz kindle
#

what is the url of app.js?

#

nvm found it

delicate shore
#

k

quartz kindle
#

looks fine here

delicate shore
#

yes

#

idk why that didnt work but I just added auth file in root as well

#

now its working

quartz kindle
#

but the url is still wrong?

#

in your app.js file in the browser?

delicate shore
#

yes

quartz kindle
#

you're using nginx right?

#

do you have any caching settings on nginx?

#

like expires headers

delicate shore
#

lemme see

#

but there is another proble

#

I dont want that

quartz kindle
#

you need to check your rewrite rules

delicate shore
#

yes I am dumb

#

im so done with nginx

#

wtf is wrong

#

bro

#

Im done

#
# the IP(s) on which your node server is running. I chose port 3000.
upstream sadad {
    server MY_IP_ADDRESS:2971;
    keepalive 8;
}

# the nginx server instance
server {
    listen 80;
    listen [::]:80;
    server_name api-dash.pgamerx.com
    access_log /var/log/nginx/yourdomain.com.log;

    # pass the request to the node.js server with the correct headers
    # and much more can be added, see nginx config options
    location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;

      proxy_pass http://sadad/;
      proxy_redirect off;
    }
 }
#

am I doing something wrong here

#

there is no error

quartz kindle
#

looks fine to me

lyric mountain
#

if the site is https why are you using port 80?

delicate shore
#

i found this code online
works for every website for me except this piece of shit

lyric mountain
#

for reference, here's mine

delicate shore
#

i just use cloudflare for managing ssl

lyric mountain
#

you still need to setup ssl on nginx

#

i too use cloudflare ssl

delicate shore
#

ohhh

lyric mountain
#

origin certificate aint it?

delicate shore
#

but problem is I want to use NPM server on nginx

#

I just got a new error

#

never got this one

lyric mountain
#

your css is being imported as html

delicate shore
#

why tho

#

even my ui.js and app.js not working :/

lyric mountain
#

how did you import 'em?

delicate shore
#
    <link rel="stylesheet" type="text/css" href="./public/css/main.css" />
lyric mountain
#

try to remove type

delicate shore
#

okay

#

still didnt work @lyric mountain

lyric mountain
#

weird

#

same error?

delicate shore
#

yes

#

btw

eternal elbow
#

i have a question for react

When I do {visible && <h1>Example</h1>}, I can make an animation using css animation, but when visible=false it goes directly. How can I solve this?

delicate shore
#

I have my code in a bad way

eternal elbow
#

Without animation

#

Sorry my bad english

lyric mountain
#

when visible is false <h1>Example</h1> will not be shown

lyric mountain
delicate shore
#

I just fixed the bad orngaise thingy

#

but still have the error

lyric mountain
delicate shore
#
    <link rel="stylesheet" href="./public/css/main.css" />    
<script src="./public/js/ui.js"></script>
    <script src="./public/js/app.js"></script>
#

how I import stuff

eternal elbow
lyric mountain
#

yes

eternal elbow
#

So how can I make this animated?

lyric mountain
#

that's due to && comparator

delicate shore
#

OHH I JUST REALISED @lyric mountain

lyric mountain
#

you're defining it as: "When visible. render <h1>Example</h1>, else show nothing"

delicate shore
#

I dont need to write /public/

#

because it's the root directory

#

in app.use

lyric mountain
#

oh

delicate shore
#

I dk how to explain it

lyric mountain
#

then it's indeed supposed to simply not render it

delicate shore
#

@lyric mountain it worked but now error is something else 😢

lyric mountain
#

if you want to pause the animation you need to deal directly with the keyframes

delicate shore
eternal elbow
#

When I add a class display: none not working

#

.popup-close {
    transform: scale(0, 0);
    animation: close .7s;
}

.popup-open {
    transform: scale(1, 1);
    animation: open .7s;
}

@keyframes close {
    0% {
        transform: scale(1, 1);
    }
    100% {
        transform: scale(0, 0);
        display: none;
    }
}
#

But

#

Display none not working

lyric mountain
delicate shore
#

line 77 and 78

lyric mountain
#

display is not really interpolable

eternal elbow
delicate shore
lyric mountain
#

like, display doesn't have a half-shown option

#

it's either shown or not shown

#

use opacity for that because it does have many values between 0 and 1

delicate shore
#
dash.pgamerx.com/:1 Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0
eternal elbow
#

Wait

lyric mountain
#

json?

#

see configureClient()

#

what is inside it?

delicate shore
lyric mountain
#

hm

#

show fetchAuthConfig

delicate shore
#

I am on the verge of giving up now

lyric mountain
#

never gonna give up

delicate shore
#

I am so dumb

#

Thanks

lyric mountain
#

np

eternal elbow
#

@lyric mountain

delicate shore
#

finally 😭

quartz kindle
delicate shore
#

holy shit it's working
the dashboard is working 😭

#

thanks KuuhaKu 😭

eternal elbow
quartz kindle
#

you can also add more control to your keyframes

#

for example 0% -> 99% opacity then 99% -> 100% display:none

#

that will fade out first, and only disappear in the end

eternal elbow
quartz kindle
#

👍

lyric mountain
#

optimization-wise I mean

eternal elbow
quartz kindle
lyric mountain
#

ah, the browser doesn't figure out that a totaly transparent object is not visible at all?

quartz kindle
#

it cant, because the object is still there, even if invisible

lyric mountain
#

ic

quartz kindle
#

it still has to account for width/height and document flow

delicate shore
quartz kindle
lyric mountain
#

ah, that's how they make click traps then

#

transparent objects

boreal iron
#

Tim knows CSS? Witch!

lyric mountain
#

TSS

#

tim stylesheets

rose warren
#
opacity: 0;
pointer-events: none;

Does the same thing as visibility: hidden;

quartz kindle
delicate shore
#

Hey guys

#

do you know any npm package I can use for this thing
or exactly what I should do to make this possible

earnest phoenix
#

Leveling?

lyric mountain
#

definitely levelling

#

tbf you don't even need a package

#

just a database and some algebra

hollow depot
delicate shore
#

and be based on previous the total time spent per day

#

and etc

lyric mountain
#

just don't make it random

delicate shore
#

most packages on npm are random

lyric mountain
#

don't use a package

#

that's unnecessary bloat

delicate shore
#

I can do this tho -
Every 12 hours, Fetch message of every user who is in a list
Then check number of messages sent in 12 hours
Then divide them and calculate average messages per hour
if It's less than 20 then add 0.05$ and if it's between 20-50 add $0.1 and so on.
right?

quartz kindle
#

you have to record messages as they are sent

delicate shore
#

oh

#

but like in purge command
we fetch last x messages by y user

lyric mountain
#

do note however that you're opening exploit opportunities

delicate shore
#

so cant I do that?

quartz kindle
#

its not a good idea to fetch X messages backwards

delicate shore
quartz kindle
#

its gonna be very taxing on the api

delicate shore
#

so like on every message
i add 1 in value of messages sent

delicate shore
quartz kindle
#

yes

delicate shore
#

i think quick.db will be my best yk option

#

since mongo can become complicated

quartz kindle
#

you can have a separate storage for daily data

#

on every message you store it on the user's daily table

delicate shore
#

oh yeah quick.db has tables as well

quartz kindle
#

then every 12 or 24 hours you read the daily, convert it and add it on the permanent table

#

then delete/reset the daily

delicate shore
#

makes sense

#

Thanks

lyric mountain
#

if going with quick.db why don't u just jump right to raw sqlite?

#

quick.db structure is...messy to say the least

pale vessel
#

Keyv is good

rose warren
#

Mysql or nothing

lyric mountain
#

nothing is stabler

quartz kindle
#

:^)

lethal trout
#

how to send this without making it code block?

#

nvm i got it

#

```js
code

#

nice

feral aspen
#

Hey.

#
const attitude = new MessageAttachment('./src/other/images/attitude_white_background.png', 'attitude_white_background.png');

const embed = new MessageEmbed()
.setColor(black)
.attachFiles(attitude)
.setImage("attachment://attitude_white_background.png")
        
await message.channel.send({ embeds: [embed] });

I've heard .attachFiles has been removed in the MessageEmbed() class.. how am I supposed to set an image, then?

#

Do I do it like this?

near stratus
feral aspen
#
const attitude = new MessageAttachment('./src/other/images/attitude_white_background.png', 'attitude_white_background.png');

const embed = new MessageEmbed()
.setColor(black)
.attachFiles(attitude)
        
await message.channel.send({ embeds: [embed], files: ['attachment://attitude_white_background.png'] });
#

Like this?

near stratus
#
message.channel.send({ embeds: [embed], files: ['./attitude_white_background.png'] });
feral aspen
#

Wait.. and if I have a MessageAttachment() class?

pale vessel
#

If you have a buffer then use files: [{ attachment: <buffer>, name: "attitude_white_background.png" }]

feral aspen
#

What do you mean, buffer?

pale vessel
near stratus
#

like from canvas

feral aspen
near stratus
#

or puppeteer

pale vessel
#

Change ./attitude_white_background.png to ./src/other/images/attitude_white_background.png

feral aspen
#

Ah.

#

I see, one moment.

#

For some reason.. when an error occurs.. it doesn't show the location of the error like it used to a long time ago.

#
module.exports = async (bot, message) => {
    if (message.author.bot || message.channel.type === "dm") return;

    if (!message.content.startsWith(prefix)) return;

    let args = message.content.slice(prefix.length).trim().split(/ +/g);
    let cmd = args.shift().toLowerCase();

    let commandfile = bot.commands.get(cmd) || bot.commands.get(bot.aliases.get(cmd));
    if (commandfile) try {
        await commandfile.run(bot, message, args);
        console.log(message.content);
    } catch (error) {
        return console.log(error);
        // console.log(err);
    };
};
#

My messageCreate event...

#

I had to manually console log every message content to know the location.. but that isn't happening either. 👀

green kestrel
#

yay, D++ 9.0 is now out 😄

#

i decided not to wait any longer for a pull request i was holding back on

#

with threads officially out, i felt we might get left behind

pale vessel
#

9.0 already?

green kestrel
#

i think theres still a lot of libs without threads, yeah?

#

yeah, i changed our versioning scheme so our major version matches the version of discord api we support

#

instead of being some random bs

#

most of the older libs are already past v9 on their own numbering scheme so wouldnt be able to do that if they wanted to lol

nova basin
#

Help me please

#
const fs = require('fs');
const YAML = require('yaml');
const { oneLine } = require('common-tags');

module.exports = {
      name: 'solotrivia',
      aliases: ['solotriv', 'striv', 'solot', 'st'],
      usage: 'solotrivia [topic]',
      description: oneLine`
        Test your knowledge in a game of trivia (only you can answer).
        If no topic is given, a random one will be chosen.
        The question will expire after 15 seconds.
      `,
  execute(message, args, client) {
    let topic = args[0];
    if (!topic) { // Pick a random topic if none given
      topic = message.client.topics[Math.floor(Math.random() * message.client.topics.length)];
    } else if (!message.client.topics.includes(topic))
      return this.sendErrorMessage(message, 0, `Please provide a valid topic, use ${prefix}topics for a list`);
    
    // Get question and answers
    const path = __basedir + '/data/trivia/' + topic + '.yml';
    const questions = YAML.parse(fs.readFileSync(path, 'utf-8')).questions;
    const n = Math.floor(Math.random() * questions.length);
    const question = questions[n].question;
    const answers = questions[n].answers;
    const origAnswers = [...answers].map(a => `\`${a}\``);
    // Clean answers
    for (let i = 0; i < answers.length; i++) {
      answers[i] = answers[i].trim().toLowerCase().replace(/\.|'|-|\s/g, '');
    }

    // Get user answer
    const questionEmbed = new MessageEmbed()
      .setTitle('Solo Trivia')
      .addField('Topic', `\`${topic}\``)
      .addField('Question', `${question}`)
      .setFooter(message.member.displayName,  message.author.displayAvatarURL({ dynamic: true }))
      .setTimestamp()
      .setColor(message.guild.me.displayHexColor);
    const url = question.match(/\bhttps?:\/\/\S+/gi);
    if (url) questionEmbed.setImage(url[0]);```
#
    let winner;
    const collector = new MessageCollector(message.channel, msg => {
      if (!msg.author.bot && msg.author == message.author) return true;
    }, { time: 15000 }); // Wait 15 seconds
    collector.on('collect', msg => {
      if (answers.includes(msg.content.trim().toLowerCase().replace(/\.|'|-|\s/g, ''))) {
        winner = msg.author;
        collector.stop();
      }
    });
    collector.on('end', () => {
      const answerEmbed = new MessageEmbed()
        .setTitle('Solo Trivia')
        .setFooter(message.member.displayName,  message.author.displayAvatarURL({ dynamic: true }))
        .setTimestamp()
        .setColor(message.guild.me.displayHexColor);
      if (winner) 
        message.channel.send(answerEmbed.setDescription(`Congratulations ${winner}, you gave the correct answer!`));
      else message.channel.send(answerEmbed
        .setDescription(`Sorry ${message.member}, time's up! Better luck next time.`)
        .addField('Correct Answers', origAnswers.join('\n'))
      );
    });
  }
};```
marsh bluff
pale vessel
#

topic, not topics

narrow sedge
#

How do I make sure that the string contains 8 digits , if it is not 8 digits it returns something different

pale vessel
#

You can use regex /^\d{8}$/

#
const digit = "00177013".match(/^\d{8}$/)?.toString() ?? "something different";```
#

If it doesn't match, it'll return null

earnest phoenix
#
const cmdF = ["moderation", "giveaways", "others"]
cmdF.forEach(x => {
const commands = fs.readdirSync(join(__dirname, `commands/${x}`)).filter(file =>
  file.endsWith(".js")
); 
for (const file of commands) {
  const command = require(join(__dirname, `commands/${x}`, `${file}`));
  if (typeof command.name === "object") {
    client.commands.set(command.name, command);
    client.aliases.forEach(x => {
    client.aliases.set(x.name, command)
    });
  } 
}
});
#
module.exports = {
  name: "a",
  aliases: "b",
  async run (client, message, args)
#

Why alisases not works

next eagle
#

The aliases I mean

#

Also shouldnt it be
client.aliases.set(x.aliases, command) ?

pale vessel
#

forEach() is an array method

#

won't work on strings

next eagle
#

Yeah

cinder patio
#

Has anyone worked with marked? I want to write a custom extension but typescript is saying Object literal may only specify known properties, and 'extensions' does not exist in type 'MarkedExtension'.

#

but this is in their docs: marked.use({ extensions: [descriptionlist, description] });

earnest phoenix
next eagle
#

Basically make aliases a list instead of a string

cinder patio
#

further down

#

In the "Custom Extensions" example

spark breach
#

hey there, I am working on a ticket command which creates a channel etc, which works fine. Although I also have a reaction thing when you press it it should close the channel or remove it depending on what one, although it doesn't work, can someone help me fix it?

            switch(reaction.emoji.name){
                case "🔒":
                    channel.updateOverwrite(message.author, { SEND_MESSAGE: false });
                    break;
                case "⛔": 
                    channel.send('Deleting in 15 seconds...');
                    setTimeout(() => channel.delete(), 15000);
                    break;
            }
        });```

If you need more code I'll gladly provide it
Thanks in advance!
quartz kindle
#

looks like the types are outdated

cinder patio
#

How can a package which has 4 million weekly downloads have outdated typings 😭

pale vessel
#

TS users crying when their favorite package has no typings

wary swan
#

if package has no typings it is basicly same as js so we have rights to cry

feral aspen
#
C:\Users\Mohammad Hajjiri\Desktop\Rewrite\node_modules\discord.js\src\rest\RequestHandler.js:298
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (C:\Users\Mohammad Hajjiri\Desktop\Rewrite\node_modules\discord.js\src\rest\RequestHandler.js:298:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (C:\Users\Mohammad Hajjiri\Desktop\Rewrite\node_modules\discord.js\src\rest\RequestHandler.js:50:14)
    at async TextChannel.send (C:\Users\Mohammad Hajjiri\Desktop\Rewrite\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:171:15) {
  method: 'post',
  path: '/channels/758978182807420938/messages',
  code: 50006,
  httpStatus: 400,
  requestData: {
    json: {
      content: undefined,
      tts: false,
      nonce: undefined,
      embeds: undefined,
      components: undefined,
      username: undefined,
      avatar_url: undefined,
      allowed_mentions: undefined,
      flags: undefined,
      message_reference: undefined,
      attachments: undefined,
      sticker_ids: undefined
    },
    files: []
  }
}

I can't seem to find the location of the error.

#

This never happened before V13.

near stratus
feral aspen
#

Usually it's like at the first/second line of the error.

#

at <path>

#

Example.

pale vessel
#

That's a code error

#

The one you got is a REST error

feral aspen
#

Ohh.. I see.

#

Why no location, though?

pale vessel
#

No clue

keen ridge
#

hello guys, does anyone know why approximatePresenceCount is null after fetching a guild?

pale vessel
#

Did you add ?with_counts=true in the query parameter?

keen ridge
#

I am using discord.js

vivid fulcrum
#

on which version are you

pale vessel
#

You actually fetched it right? (guilds.fetch(id))?

keen ridge
#

13

keen ridge
#

here is my code

                const guildInfo = await bot.guilds.fetch(guild.id);

                return {
                    ...guild,
                    icon: formatIconURL(guild.id, guild.icon),
                    onlineMemberCount: guildInfo.approximatePresenceCount,
                    botExists: true,
                    ...dbInfo.toObject()
                };
#

oops

#

one sec

#

There we go

#

the docs say it should be available after fetching a guild

#

I also have the intents

vivid fulcrum
#

it should work just fine

#

with_counts is set to true

keen ridge
#

hmm

#

I'm getting null though

vivid fulcrum
#

are you sure you're using onlineMemberCount on the object you're returning

keen ridge
#

yes

quaint wasp
#

uhh

keen ridge
#

it works fine when I use fetchGuildPreview

quaint wasp
#

what are the api activity changing rate limit is? Was it like every 15 seconds?

vivid fulcrum
#

oh wait

#

it could be that djs is just returning the guild from cache and not making a request in the first place

#

do guild.fetch()

#

await it

keen ridge
#

isn't that what I'm doing?

vivid fulcrum
#

no

#

you're fetching from the client

#

which has a cache lookup built in

#

fetching directly on the guild forces the client to make a request

keen ridge
#

how do I access the guild?

vivid fulcrum
#

...you have it

keen ridge
#

I see that guilds is accessing the guildManager

vivid fulcrum
#

how do you think you're getting its id

quaint wasp
#

Just guild.

#

Or message.guild

pale vessel
#

They did that

keen ridge
#

I am getting it from oauth

#

I guess

pale vessel
#

Here

keen ridge
#

I will have to figure something out

pale vessel
#

I see the problem

#

Like Cry said, the guild is already cached

#

So it won't fetch it

keen ridge
#

I just have access to my client

pale vessel
#

Set force to true

#

await client.guilds.fetch({ guild: id, force: true })

vivid fulcrum
#

it's exactly like just doing guild.fetch()

#

lmfao

quaint wasp
vivid fulcrum
#

it's around that

keen ridge
#

thanks for the help

#

I will figure something out

vivid fulcrum
#

which means the absolute minimum is 1 change per 12 seconds

#

but you should keep it at 15 just to be safe

rocky hearth
#

What naming convention should I use for my theme. I am trying to make different themes using css variables that changes with different theme classes.

quaint wasp
#

,

pale vessel
#

kebab-case

quaint wasp
lyric mountain
#

XxNoobCasexX

pale vessel
#

kebab case is great for CSS

rocky hearth
#

Na na, i mean what the variable should be called for different components?

pale vessel
#

oh lol

#

there's no convention then

keen ridge
#

guys I figured it out

#

lol

#

I am stupid

#

@vivid fulcrum was right

#

ty

lethal trout
#

i am trin to add a code block inside a code block

pale vessel
#

I'd just use js text.replace(/`/g, "\u200b`");

stable eagle
#

How to detect if a string contains zalgo in js?

lyric mountain
pale vessel
#

In digital typography, combining characters are characters that are intended to modify other characters. The most common combining characters in the Latin script are the combining diacritical marks (including combining accents).
Unicode also contains many precomposed characters, so that in many cases it is possible to use both combining diacrit...

lyric mountain
#

or use unidecode

pale vessel
lethal trout
pale vessel
#

You can't have ``` inside codeblocks since it'll close them

lethal trout
#

isnt there some way..

pale vessel
#

But adding a zero-width space between them would treat them as individual characters

#

So it wouldn't destroy the codeblock

pale vessel
boreal iron
lethal trout
pale vessel
#

The input

lethal trout
# pale vessel The input

f!eval message.replace(//g, "\u200b");
message.channel.send("``````js\ncode here\n``````")

like this?

pale vessel
lethal trout
#

like this @pale vessel ?

pale vessel
#

What is message?

#

Just focus on the embed part

lethal trout
lethal trout
boreal iron
#

Names cannot contain the following substrings: '@', '#', ':', '```'.
Names cannot be: 'discordtag', 'everyone', 'here'.

pale vessel
#

Yes

lethal trout
#

which embed?

#

lol

#

i am not even doing any embed

boreal iron
pale vessel
delicate shore
#

I calculate average messages per hour

#

then give them credit accordingly

lethal trout
# pale vessel

bruh dont worry abt the embed... i am talking abt the message above it

pale vessel
#

Then yeah, message

lyric mountain
pale vessel
#

message should be code here

#

That's what you need to replace

lethal trout
lethal trout
pale vessel
#

That's why I asked what message is

#

You want to replace the string

#

The string

#

channel.send("```" + string.replace(...) + "```")

lethal trout
pale vessel
#

Yes yes

lethal trout
pale vessel
#

But there's a problem, one a user copy the text, it won't become a codeblock

delicate shore
pale vessel
#

Since the zero width space will also be copied

delicate shore
#

Spam = Mute for 10 mins

lyric mountain
#

how do you detect spam?

pale vessel
#

So that's impossible

lyric mountain
#

like, instead of an active convo

lethal trout
pale vessel
pale vessel
delicate shore
pale vessel
#

I spoonfed enough

lyric mountain
delicate shore
#

but like it takes 1s for an average sentence to type

#

so logically

lyric mountain
#

not always

delicate shore
#

if they are not spamming

#

but 10 msg in 5 seconds

lethal trout
delicate shore
#

seems pretty much impssoible

earnest phoenix
#

You don't look at how many messages they are sending ig

pale vessel
earnest phoenix
#

Wouldn't you wanna look at the time difference between each message sent by a user and if it meets a certain threshhold possible spam

lethal trout
pale vessel
#

Yeah that won't work

lethal trout
#

pls help

#

pls

pale vessel
#

It won't evaluate the ${}

lethal trout
#

i beg u

earnest phoenix
#

Cause KuuHaKu is right it could be a very active conversation

lyric mountain
#

also there are

#

people

#

who type

#

like this

pale vessel
#

Just use js message.channel.send("``````js\n" + text.replace(...) + "``````");

#

Fucking hell

earnest phoenix
#

Best thing to do would possible be let the people using the bot decide what is spam

north nebula
#

hello

north nebula
earnest phoenix
#

Give them the options of if x messages is sent in n time it is spam

north nebula
#

ola

pale vessel
#

Nah

#

ugh my brain

delicate shore
#

like

#

actualy

#

you do have

#

a point

#

I think slowmode is the best option

pale vessel
#

@lethal trout

lethal trout
pale vessel
#

You need to include the codeblock inside the text

lyric mountain
#

in my bot I simply reduce the gained XP if the user is sending too many messages

#

it's reduced linearly inside a 1s timeframe

#

so like, if you send a message with a window of 0.5s you'll receive only half the XP

lethal trout
pale vessel
#

Sec

delicate shore
pale vessel
#

@lethal trout

#

text is the text

lyric mountain
#

I store the last message's millis

#

current millis - last millis = time between messages

#

if it is below 1s, it gets reduced based on how close it is to 0

delicate shore
#

so I need to create a new property in table as LastMessage

#

and use Date.now()

lyric mountain
#

up to you, I just gave an option

#

for me it fits quite right, but for your activity meter it might not work

feral aspen
#

I've configured and rewriten the channels, roles, and mentions, what else?

#

I don't see anything else, I mean economy shouldn't be toStringed. 👀

lyric mountain
#

embeds don't stringify input anymore (in djs)

#

that's why u need to string it

feral aspen
#

Like what for example?

#

I know arrays is an example.

quartz kindle
#

anything that is not a string

lyric mountain
#

it behaves like typed langs now

feral aspen
#

I used to make an array inside the .addField value.. now I have to add the .join()..

#

...

lyric mountain
#

if it requires a string it requires a STRING

#

put a number and it'll error

lethal trout
feral aspen
lyric mountain
#

ye, welcome to type checking

lethal trout
pale vessel
#

Be patient

quartz kindle
#

^omfg

#

re-added that for you :^)

lethal trout
feral aspen
#

Woops ping.. (sry)

#

Btw.. I realised all my economy has .toLocaleString(), dude I'm saved. 😂 🎉 All is left is 89 other commands.

pale vessel
#

If it doesn't work then I'm done with Discord

quartz kindle
#

what is he trying to do?

feral aspen
#

code.work()

lyric mountain
#

just replace ` with ´ smh

pale vessel
#

Codeblock inside codeblock

feral aspen
#

Is it possible to find variables that has a value as a number in VSC?

lyric mountain
#

don't think so

feral aspen
#

Sad.

rigid maple
#

Loading css in <link>/webpanel but not loading in <link>/webpanel/blabla

#
  app.use(express.static(__dirname + '/styles'));
digital ibex
#

has anyone worked with android studio cuz for some reason, im getting this

#

when i try to add the avd

lyric mountain
#

do you have enough ram allocated?

digital ibex
#

i think so, how do i check

#

?

#

i just pressed auto on everything im pretty sure

lyric mountain
#

how much ram your pc has?

digital ibex
#

6

lyric mountain
#

that's quite low for avd

#

try using an older phone model

#

like samsung galaxy

digital ibex
#

oh alr

lyric mountain
#

or nexus

#

pixel is kinda heavy

digital ibex
#

kk

lethal trout
pale vessel
#

Nice!!

#

I don't care anymore 😎

#

Brain too tired

#

Barely functioning anymore

lyric mountain
#

do you really need to be able to copypaste the codeblock?

rigid maple
#

Loading css in <link>/webpanel but not loading in <link>/webpanel/blabla

  app.use(express.static(__dirname + '/styles'));
lethal trout
digital ibex
lyric mountain
#

weird

#

try using intellij IDEA with android plugin

#

it's essentially the same as android studio, but is by far more optimized

digital ibex
#

kk

lyric mountain
#

and doesn't have dumb key shortcuts

earnest phoenix
#

there is no index.css

rigid maple
#

app.get("/webpanel/:guildID", checkAuth, (req, res) => {

#

this is how i upload

earnest phoenix
#

umm
that's a route
not an html file with link tag to /styles

rigid maple
#

I'm using translation, sorry if there is a problem with my writing.

rigid maple
earnest phoenix
#

could you explain the problem again

#

<link src="/webpanel" /> works but not /webpanel/anything?

rigid maple
#

i am making a website
and this website consists of stages ex: https://google.com/blabla/blabla
/blabla/blabla
Since I use ejs, I have to load the css from the router part

earnest phoenix
#

well

rigid maple
earnest phoenix
#

put that link in the tag

rigid maple
#

While loading the css in the router section, I load it as follows and it cannot go to the 2nd stage.

#
  app.use(express.static(__dirname + '/styles'));
#

2nd stage = /blabla/blabla

earnest phoenix
#

what is the file structure of /styles

rigid maple
earnest phoenix
#
/styles
|_ blabla
    |_ blabla2
        |_ css2
    |_css1
#

like this?

rigid maple
#

/styles
index.css
utilities.css
...

earnest phoenix
#

the problem might be that you are using styles without a slash in your ejs and it defaults to current route/styles

rigid maple
#

Could the problem be caused by this?
when pulling the webpanel page (with cssler);

  app.get("/webpanel", checkAuth, (req, res) => {

when pulling webpanel/guildID (no css);

app.get("/webpanel/:guildID", checkAuth, (req, res) => {
earnest phoenix
#

probably

#

how are you requesting the css in your file

rigid maple
#
app.use(express.static(__dirname + '/styles'));
```do you mean this ?
earnest phoenix
#

no

pallid jungle
#

Error

flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
2021-08-12T18:08:23.599786+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown interaction
2021-08-12T18:08:23.599800+00:00 app[Worker.1]:     at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
2021-08-12T18:08:23.599801+00:00 app[Worker.1]:     at runMicrotasks (<anonymous>)
2021-08-12T18:08:23.599801+00:00 app[Worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-08-12T18:08:23.599802+00:00 app[Worker.1]:     at async RequestHandler.push (/app/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
2021-08-12T18:08:23.599803+00:00 app[Worker.1]:     at async InteractionReply.think (/app/node_modules/discord-buttons/src/v12/Classes/managers/InteractionReply.js:80:5)
2021-08-12T18:08:23.599804+00:00 app[Worker.1]:     at async Client.<anonymous> (/app/commands/embeds/help.js:138:9)
2021-08-12T18:08:23.603090+00:00 app[Worker.1]: (node:4) 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: 3)
2021-08-12T18:08:23.643174+00:00 app[Worker.1]: (node:4) UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown interaction
2021-08-12T18:08:23.643176+00:00 app[Worker.1]:     at RequestHandler.execute (/app/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
2021-08-12T18:08:23.643177+00:00 app[Worker.1]:     at runMicrotasks (<anonymous>)
2021-08-12T18:08:23.643178+00:00 app[Worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2021-08-12T18:08:23.643179+00:00 app[Worker.1]:     at async RequestHandler.push (/app/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
2021-08-12T18:08:23.643179+00:00 app[Worker.1]:     at async InteractionReply.think (/app/node_modules/discord-buttons/src/v12/Classes/managers/InteractionReply.js:80:5)
2021-08-12T18:08:23.643180+00:00 app[Worker.1]:     at async Client.<anonymous> (/app/commands/embeds/help.js:138:9)
2021-08-12T18:08:23.643347+00:00 app[Worker.1]: (node:4) 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: 4)

https://sourceb.in/ErbHjGMJc7 code using discord-buttons discord.js V12

earnest phoenix
#

how the ejs imports the css with link tag

rigid maple
#
    <link type='text/css' rel='stylesheet' href='utilities.css'>
    <link type='text/css' rel='stylesheet' href='common.css'>
    <link type='text/css' rel='stylesheet' href='docs.css'>
earnest phoenix
#

yeah

rigid maple
#

same as other files

earnest phoenix
#

change them to use a slash

pallid jungle
earnest phoenix
#

so /utilities.css /common.css etc

earnest phoenix
#

I have not used discordjs in 4 months

rigid maple
#

only in that file ?

#

one sec pls I'm trying

earnest phoenix
#

try that file and if it works edit all the other files

rigid maple
#

works in other files

#

it just doesn't work in that file

earnest phoenix
#

did you change it to use slash

rigid maple
#

I'm trying now

#

aa

#

it worked thanks

earnest phoenix
#

you're welcome

rigid maple
#

I just changed the css in the file that doesn't appear

#

thanks

earnest phoenix
#

lmfao

lyric mountain
#

@solemn latch idk rick, seems like a scam

earnest phoenix
#

How bot join voice channel on djs

#

To use the voice features of discord.js im pretty sure you need the voice package

#

@discord.js/voice

#

Dont send me link of guide bc i didnt understand anything

digital ibex
#

not to join a vc

earnest phoenix
earnest phoenix
#

I installed voice package

#

you can only get basic info on a voice channel and set its parent and stuff with discord.js without the voice package

earnest phoenix
#

But it still doesnt work

#

I haven't used it before

#

Yes

digital ibex
#

or if it is then i 🥴

earnest phoenix
#

idk if this is something to be used but I notice on the documentation for the voice package there is something called joinVoiceChannel which takes in options that include a channel ID

#

@digital ibex you need on v13

earnest phoenix
#

and split it into its own module

digital ibex
#

tf

#

shrug okay

earnest phoenix
#

V13 so gay

earnest phoenix
#

you could ask there

#

There are much ppl

#

Its still the best place to get answers

#

Many times they don't answer my questions

#

You gotta be patient

#

a lot of people use discord.js so a lot of questions get asked

pale vessel
earnest phoenix
#

oop

digital ibex
#

why is making a mobile app so complicated

#

this is so annoyin i swear

vivid fulcrum
#

yes.

earnest phoenix
#

Well

#

Not really

#

They updated guild.ownerID as guild.ownerId

#

A lot of the changes made were to keep up with the functionality of the new api version that introduced a lot of changes to how it works.

pale vessel
#

Just update your code?

earnest phoenix
#

with the new update there is slash commands, buttons and menus that requires code changes to make things work as easy as possible with the rest of the code base

earnest phoenix
#

By reading the change log

#

Yes

#

But not enough

#

I updated every code outside music

#

It took mine 2 days

digital ibex
#

try eris

earnest phoenix
#

eris is outdated