#development

1 messages · Page 78 of 1

ancient wedge
#

show your slash commands directory

north cairn
#

show what?

ancient wedge
#

folder where your commands are

north cairn
ancient wedge
#

ahhh

#

do you need BotInfo

north cairn
#

yes i do

#

same i did in normal commands and no issue theee

#

AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!

ancient wedge
#

well try moving it out of BotInfo

#

same directory

north cairn
#

not wrking

#

SO FRUSTRATED RIGHT NOW!

#

i think something is wrong with

#

interactionCreate

#

or handler

ancient wedge
#

naw its your ping.js

#

or handler yeah

north cairn
#

whihc one u want see

ancient wedge
#

just send the entire handler man

north cairn
#
const { readdirSync } = require("fs");

const Discord = require("discord.js")

const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { token } = process.env.token;
const clientId =  "992806051806191626";//dont loook here

const ascii = require("ascii-table");
const { Client } = require("discord.js");
let table = new ascii("SlashCommands");
table.setHeading("SlashCommand Name", "Loaded Status");
 const slashCommands = [];

module.exports = (client, interaction) => {

  readdirSync("./SlashCommands/").forEach(dir => { 
 
  console.log(slashCommands)
  
  
  
    const commands = readdirSync(`./SlashCommands/${dir}`).filter((file) =>
      file.endsWith(".js")
    );
    for (const file of commands) {
      const pull = require(`../SlashCommands/${dir}/${file}`);
      slashCommands.push(pull.data.toJSON());
      if (pull.data.name) {
        client.slashCommands.set(pull.name, pull);
        table.addRow(pull.data.name, "✅");
      } else {
        table.addRow(
          pull.data.name,
          `❌`
        );
       
      } 
    }
  });
  console.log(table.toString());
  
  const rest = new REST({ version: '9' }).setToken(process.env.token);

(async () => {
    try {
        console.log('Started refreshing application (/) commands.');

        await rest.put(
            Routes.applicationCommands(clientId),
            { body: slashCommands },
    );
    console.log('Successfully reloaded application (/) commands.');
  } catch(error) {
    console.log(error) 
}
 })();

  client.on('ready', async () => {
    await client.application.commands.set(slashCommands)
  })
};```
#

@ancient wedge @ancient wedge

ancient wedge
#

where tf do you call .execute

north cairn
#

that's in interaction

#

oh u mean

#

like

#

it needed to be here too?

ancient wedge
#

when error happens

#

where is that line

#

show that file

north cairn
#

the eror is not in project

#

it says

#

application did not respond3

ancient wedge
#

because bot crashes, and it crashes becase .execute can't be called

north cairn
#

ye ye

#

how to fix that

ancient wedge
#

find where .execute is called

north cairn
#

want seee interactionCreate?

#
const {MessageEmbed, Collection } =  require("discord.js");
const Discord = require("discord.js")
const client = require("../../index")
client.slashCommands = new Discord.Collection()

const { prefix } = require("../../config.json")
const { QuickDB } = require("quick.db")
const db = new QuickDB();

client.on("interactionCreate", async interaction => {
 
  if(!interaction.isCommand()) return ;
    const command = client.slashCommands.get(interaction.commandName);
    if(!command) return;
        try {
 await command.execute(interaction);
} catch(err) {
          if(err) 
            console.log(err)
          await interaction.reply({content: "A Error Occured!", ephemeral: true})
        }})
#

cmmand.execute

ancient wedge
#

then its definitely command handler

north cairn
#

what the-

#

what's teh realtion

#

realtion*

#

between

#

normal and slash commands

ancient wedge
north cairn
#

well i have a doubt

ancient wedge
#

i have a feeling you didnt write that code

north cairn
north cairn
ancient wedge
#

just try slashCommands.get

north cairn
#

ye that's what is there rightnow

ancient wedge
#

can u just log command?

#

see if it has .execute

north cairn
#

log what

ancient wedge
#

ping command

#

before you call .execute

north cairn
#

console.log what

#

console.log(command)

#

right?

ancient wedge
#

yis

north cairn
#

nothing

#

got logged

ancient wedge
#

well now you know its command handler issue

north cairn
#

in command handler

#

do i need to add

#
const command = [];```
#

which i didn't for now

ancient wedge
#

you need to add command data to slashCommands

#

which your handler doesnt do

north cairn
#

coz i have diff folders nd hndlers for slashCommands

ancient wedge
#

well i can show u how i got it to work

#

one file handles text and slash commands

#

then you just convert it to your code

north cairn
#

not satisfied

ancient wedge
#

bruh if u dont know what you are doing how am i gonna help u :d

north cairn
#

is there any way,i can fix he issue

#

without changing the handlers and all.

ancient wedge
#

fix the issue without fixing the issue

#

hmm, dont think so

north cairn
ancient wedge
#

next time you copy code try to understand what its doing

north cairn
#

i totally understand

#

i just cant solve erros

sharp geyser
#

okay so neither of you know what you are doing

#

@north cairn log the result of your client.commands.get or whatever and send the response

#

I can guarantee it wont be what you think it is

sharp geyser
#

I just told you

#

when you get the command from the collection

#

log the result

north cairn
#

it isn;t gettig no

#

that's y its saying application did not respond

ancient wedge
sharp geyser
#

But earlier you said that execute wasn't a function

#

So theres no way it can be executing ping.js execute function

#

and if it doesn't execute it, then you aren't replying which is why it's saying it didn't respond

north cairn
#

no erros in console.

#
const { MessageEmbed, Client } = require("discord.js");
const { SlashCommandBuilder} = require("@discordjs/builders")

  module.exports = {
    data: new SlashCommandBuilder()
  .setName("ping") 
      .setDescription("Shows Bot's Latency") , 
   async execute  (client, interaction)  {
     console.log(slashCommands)
  let pingem =new MessageEmbed()
  .setThumbnail(message.author.displayAvatarURL({dynamic: true}))
  .setDescription(`🏓 | Pong:
  🔴 Current Ping Of Bot- **__${Math.round(client.ws.ping)} ms__**`)
  .setFooter("Thank You For Using Sheru")
  .setColor("#FF0000")
  await interaction.reply({embeds: [pingem]})
 }
}```
sharp geyser
#

Okay do me a favor just put a console log that logs Hello World or smth at the beginning of your ping.js execute function

#

if it executes we know your cmd handler is working

north cairn
ancient wedge
#

its defo command handler

#

something with this

sharp geyser
#

Ima tackle that after I confirm if it actually is or not

sharp geyser
#

No

#

wait

#

I see you are logging slashCommands does that even exist in the ping.js file?

north cairn
#

instead of that,i log hello world?

#

ok>

#

?*

sharp geyser
#

Yes

#

try and execute the cmd after doing so

#

if it logs Hello World then we know the cmd handler is working and something else is stopping you from replying to the interaction

north cairn
#

nothing got logged

#

@sharp geyser

sharp geyser
#

And now we know its the cmd handler

ancient wedge
#

hmm i wonder if its cmd handler

north cairn
ancient wedge
#

did you even show both handlers?

north cairn
#

no.

#

coz no realtion bwteen slash and normal commands

#

const { readdirSync } = require("fs");

const Discord = require("discord.js")

const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { token } = process.env.token;
const clientId =  "992806051806191626";

const ascii = require("ascii-table");
const { Client } = require("discord.js");
let table = new ascii("SlashCommands");
table.setHeading("SlashCommand Name", "Loaded Status");
 const slashCommands = [];

module.exports = (client, interaction) => {

  readdirSync("./SlashCommands/").forEach(dir => { 
 
  console.log(slashCommands)
  
  
  
    const commands = readdirSync(`./SlashCommands/${dir}`).filter((file) =>
      file.endsWith(".js")
    );
    for (const file of commands) {
      const pull = require(`../SlashCommands/${dir}/${file}`);
      slashCommands.push(pull.data.toJSON());
      if (pull.data.name) {
        client.slashCommands.set(pull.name, pull);
        table.addRow(pull.data.name, "✅");
      } else {
        table.addRow(
          pull.data.name,
          `❌`
        );
       
      } 
    }
  });
  console.log(table.toString());
  
  const rest = new REST({ version: '9' }).setToken(process.env.token);

(async () => {
    try {
        console.log('Started refreshing application (/) commands.');

        await rest.put(
            Routes.applicationCommands(clientId),
            { body: slashCommands },
    );
    console.log('Successfully reloaded application (/) commands.');
  } catch(error) {
    console.log(error) 
}
 })();

  client.on('ready', async () => {
    await client.application.commands.set(slashCommands)
  })
};```
#

here slash command handler

#

anything wrong here? @sharp geyser

sharp geyser
#

You dont have to ping me btw

#

Also, all that is doing is just posting them to discord, since you can try and execute the commands on discord then it definitely works

#

I need to see your interactionCreate event again

north cairn
#
const {MessageEmbed, Collection } =  require("discord.js");
const Discord = require("discord.js")
const client = require("../../index")
client.slashCommands = new Discord.Collection()

const { prefix } = require("../../config.json")
const { QuickDB } = require("quick.db")
const db = new QuickDB();

client.on("interactionCreate", async interaction => {
 
  if(!interaction.isCommand()) return ;
    const command = client.slashCommands.get(interaction.commandName);
    if(!command) return;
        try {
          console.log(command)
 await command.execute(interaction);
} catch(err) {
          if(err) 
            console.log(err)
          await interaction.reply({content: "A Error Occured!", ephemeral: true})
        }})```
sharp geyser
ancient wedge
#

he is trying to export slashCommands

#

its clearly content of the command being wrong

#

or not being read

sharp geyser
#

What are you on about

north cairn
#

tell me what to do

sharp geyser
#

Your collection is literally empty so what are you going to get

#

they dont just magically appear

#

Unless you are setting them somewhere else?

ancient wedge
sharp geyser
#

Then again I don't see anywhere you are doing that

#

so I have no way of knowing, its a guessing game

north cairn
#

what do i do

sharp geyser
#

Anyway if the collection is empty command will be undefined and then your if(!command) return will stop the code there

north cairn
#

how do i put the commands into the collection

sharp geyser
#

This is why you don't copy code

ancient wedge
#

see, told u its copied

sharp geyser
#

when you loop over the commands folder you should set them there

sharp geyser
#

Where? Your code is so messy I can't see it

ancient wedge
#

can you log pull

sharp geyser
#

Man at this point im too tired to continue on, chances are the command isn't being set so then you have no command to call execute on, you can verify this by logging the contents of your slash command collection, if it is there, make sure the interaction.commandName is the same as what is in your collection.

#

Now its nearly 1am so ima go to bed

earnest phoenix
#

this is why you learn js basics before doing anything

north cairn
earnest phoenix
#

doesnt seem like it

ancient wedge
#

dude just log pull variable
im pretty sure problem is around there

civic scroll
#

better yet, just debug

sharp geyser
ancient wedge
civic scroll
#

imagine

#

[object Object]

#

2nd problem: you don't have file validation

plain coral
#

please check!

civic scroll
#

slash commands?

#

it takes time to update the command list

ancient wedge
#

be careful its python

civic scroll
#

it certainly is js

plain coral
#

move.

civic scroll
#

from the screenshot

plain coral
#

only sayuri.

civic scroll
#

what

#

what

plain coral
#

1 hour?

civic scroll
#

iirc it takes 10 mins ~ 1 hour

plain coral
#

exactly my same no solution.

civic scroll
#

for guild-based command it will be shorter

plain coral
civic scroll
#

that's what i remember from the last time i worked with slash commands

next storm
#
    readdirSync("./events/Client/").forEach(file => {
        const event = require(`../events/Client/${file}`);
        let eventName = file.split(".")[0];
        client.on(eventName, event.bind(null, client));
    });```this is my event listener, but this is showing an error that `event.bind` is not a function
#

how can this be fixed?

plain coral
#

That's right, but I haven't received a command for 4 hours.

civic scroll
north cairn
next storm
#

oh wait, i got an unknown file there 💀

plain coral
civic scroll
civic scroll
plain coral
#

xd

next storm
plain coral
#

yep.

sharp geyser
#

A.J actual bot

next storm
#

😂

plain coral
#

never recevied commands

sharp geyser
#

Why are so many people struggling with slash commands they are so easy

north cairn
civic scroll
next storm
civic scroll
plain coral
civic scroll
#

because you write it, doesn't mean it's there

sharp geyser
civic scroll
#

i only saw data and execute fields

north cairn
sharp geyser
#

Sayrui at this point just point him to a better slash command fork and send him on his way

#

:^)

sharp geyser
#

pay me

next storm
civic scroll
sharp geyser
#

I see, I was fixing to cry for you

civic scroll
plain coral
#

..

civic scroll
#

always do the core

#

core is the foundation of features

civic scroll
sharp geyser
#

I haven't really messed with the commands on my bot yet

north cairn
sharp geyser
#

I have been focusing on the important stuff

#

only commands I have are for testing the important stuff KEKW

civic scroll
#

i usually have a custom command loader where it will eliminate all unrelated fields for json

civic scroll
north cairn
civic scroll
#

WHAT

#

wait

#

you don't know what and where to add?

#

did you really write that code

sharp geyser
#

I thought we already established it was copied

#

or were you not here for that

north cairn
#

i didnt uderstand what u said to do @civic scroll

plain coral
#

look is okay?

civic scroll
plain coral
#

but think no recevied commands slash

ancient wedge
#

see its python

plain coral
#

you go move

civic scroll
#

oh

plain coral
#

sigh.

civic scroll
#

it's python

#

my bad

ancient wedge
#

😾

plain coral
#

@civic scroll yeah no problem but explain

#

there look

#

no solution slash commands.

#

sigh.

civic scroll
#

🗿 idk python

plain coral
plain coral
#

there is "on ready"

#

@civic scroll Look

#

example:

civic scroll
plain coral
#

not honest shux

#

but crazy.

ancient wedge
civic scroll
#

okay

#

so

civic scroll
sharp geyser
north cairn
ancient wedge
sharp geyser
#

with discord.py its not recommended to sync in on_ready or setup_hook

civic scroll
#

read what i sent

#

and "think" about it

plain coral
next storm
#

my lavalink isn't starting now smh

plain coral
#

and no see /staff nothing.

civic scroll
north cairn
#

what do i do so that it executes it

ancient wedge
#

ask it nicely

sharp geyser
#

need help?

next storm
#

yess

civic scroll
sharp geyser
#

@plain coral you could take a look at my repo

civic scroll
#

or that

plain coral
#

but already

sharp geyser
#

It can give you inspiration on how to handle this

next storm
civic scroll
#

so i suggest you to do the manual check

sharp geyser
#

I can't help

north cairn
#

someone help me out ahhh

civic scroll
sharp geyser
#

No one wants to touch "your" code bro

north cairn
civic scroll
#

without that we are unable to help

plain coral
ancient wedge
north cairn
#

i knwo it

#

what u talkin abt

#

bruh

sharp geyser
#

I've already tried helping you, but you don't even understand simple stuff

civic scroll
#

@sharp geyser ts is becoming java

sharp geyser
#

How to log hello world

#

💀

north cairn
ancient wedge
#

ok bye

north cairn
#

help me plss

#

ahhhhh

civic scroll
#

actually

#

SlashCommandBuilder already has toJSON

north cairn
#

mf

#

then y

#

u

#

...

civic scroll
#

what

north cairn
#

@civic scroll now say how do i fix

#

it can;t reach the command to execute

#

i think thi is the issue

civic scroll
#

if the command is registered properly

sharp geyser
#

Are you 100% positive that the cmd actually exists in the collection

civic scroll
#

then event handler

next storm
sharp geyser
#

all the java users are offline

next storm
#

💀 okay

civic scroll
sharp geyser
#

tbh i've only seen one java user

civic scroll
#

check permissions

sharp geyser
#

haku is quite literally the only person i've seen use java here

next storm
sharp geyser
#

Seeing "ig" in that sentence is not so reassuring

civic scroll
#

the Undertow

#

i simply followed the stack trace

#
Failed to start bean 'webServerStartStop'
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Undertow
Caused by: java.lang.RuntimeException: java.net.SocketException: Permission denied
Caused by: java.net.SocketException: Permission denied
north cairn
#

here see
i dont think i mentioned wrong collection and the command is in right folder ig

#

@civic scroll

#

@sharp geyser

civic scroll
north cairn
#

13

#

13.8

civic scroll
#

hold on

#

i'm reading my old code

north cairn
#

k ig

civic scroll
#

did you register commands

north cairn
#

my botv literally hve the badge

#

says supports slash commands

earnest phoenix
#

💀

civic scroll
#

slash command is good imo

#

just the library made it wonky

civic scroll
#

i mean as in does it actually load

boreal iron
#

Oh I see sayuri trying hard

#

Instead of creating my logo

civic scroll
north cairn
boreal iron
#

The text of the petition is funny as fuck

civic scroll
#

that's it i'm out

#

i feel like if i keep helping i will bring more harm

north cairn
boreal iron
#

Actually proving that the author of the petition is stupid as fuck

north cairn
#

but not run

civic scroll
#

did you add the command globally

north cairn
#

yes*2

boreal iron
#

Oh I remember this dude

#

What isn't working today?

civic scroll
#

in dms

north cairn
#
  const rest = new REST({ version: '9' }).setToken(process.env.token);

(async () => {
    try {
        console.log('Started refreshing application (/) commands.');

        await rest.put(
            Routes.applicationCommands(clientId),
            { body: slashCommands },
    );
    console.log('Successfully reloaded application (/) commands.');
  } catch(error) {
    console.log(error) 
}
 })();

  client.on('ready', async () => {
    await client.application.commands.set(slashCommands)
  })
};```
civic scroll
#

oh

#

it takes up to an hour to sync command changes

next storm
#

i done sudo java -jar Lavalink.jar, then it worked
but when I'm doing pm2 start java -- -jar Lavalink.jar, it's not working

boreal iron
#

No

#

Not anymore

civic scroll
#

make sure the command metadata is correct

#

then yeah idk

boreal iron
#

Changes are instant

civic scroll
next storm
#

any fix for that?

#

so that it works with pm2

boreal iron
north cairn
#

whre?

#

two times whre

boreal iron
#

client.application.commands.set(...) will update/replace them a second time

next storm
north cairn
#

rmove it?

boreal iron
#

U either import the rest handler or (better) use the internal functions

civic scroll
#

don't sudo

boreal iron
#

Not both

civic scroll
boreal iron
#

The rest can be removed entirely

#

No need to do things 2 times

north cairn
#

oh.

#

so u mean

#
client.on('ready', async () => {
readdirSync("./SlashCommands/").forEach(dir => { 
 
  console.log(slashCommands)
  
  
  
    const commands = readdirSync(`./SlashCommands/${dir}/`).filter((file) =>
      file.endsWith(".js")
    );
    for (const file of commands) {
      const pull = require(`../SlashCommands/${dir}/${file}`);
      slashCommands.push(pull.data.toJSON());
       console.log(pull)
      if (pull.data.name) {
        client.slashCommands.set(pull.name, pull);
        table.addRow(pull.data.name, ":white_check_mark:");
      } else {
        table.addRow(
          pull.data.name,
          `❌`
        );
       
      } 
    }
  });
  console.log(table.toString());
  
  const rest = new REST({ version: '9' }).setToken(process.env.token);

(async () => {
    try {
        console.log('Started refreshing application (/) commands.');

        await rest.put(
            Routes.applicationCommands(clientId),
            { body: slashCommands },
    );
    console.log('Successfully reloaded application (/) commands.');
  } catch(error) {
    console.log(error) 
}
 })();
}
};```
next storm
boreal iron
#

Also like I said you don't need the rest part anymore

next storm
#
3|serum  | [18.12.2022 03:12PM]: ERROR Error: connect ETIMEDOUT ip:2333
3|serum  | [18.12.2022 03:12PM]: WARN Lavalink Node: main1 closed with code 1006,
boreal iron
#

I mean u can keep it, it's okay but then remove client.application.commands.set(...)

next storm
#

my bot doesn't connects with the lavalink

plain coral
#

Is setup_hook

north cairn
#

i asked do i ahve to code all my handler under js client.on('ready' async () => {?? @boreal iron

boreal iron
#

That's ok

#

Commands can be accessed only when the client is ready

#

Now fix the stuff I wrote above at first

north cairn
#

yea wait imma send a sample code first

#

then put there

#
const { readdirSync } = require("fs");

const Discord = require("discord.js")

const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { token } = process.env.token;
const clientId =  "992806051806191626";

const ascii = require("ascii-table");
const { Client } = require("discord.js");
let table = new ascii("SlashCommands");
table.setHeading("SlashCommand Name", "Loaded Status");
 const slashCommands = [];
client.on('ready', async () => {


module.exports = (client, interaction) => {

  readdirSync("./SlashCommands/").forEach(dir => { 
 
  console.log(slashCommands)
  
  
  
    const commands = readdirSync(`./SlashCommands/${dir}/`).filter((file) =>
      file.endsWith(".js")
    );
    for (const file of commands) {
      const pull = require(`../SlashCommands/${dir}/${file}`);
      slashCommands.push(pull.data.toJSON());
       console.log(pull)
      if (pull.data.name) {
        client.slashCommands.set(pull.name, pull);
        table.addRow(pull.data.name, "✅");
      } else {
        table.addRow(
          pull.data.name,
          `❌`
        );
       
      } 
    }
  });
  console.log(table.toString());
  
  const rest = new REST({ version: '9' }).setToken(process.env.token);

(async () => {
    try {
        console.log('Started refreshing application (/) commands.');

        await rest.put(
            Routes.applicationCommands(clientId),
            { body: slashCommands },
    );
    console.log('Successfully reloaded application (/) commands.');
  } catch(error) {
    console.log(error) 
}
 })();```
#

@boreal iron ok???

#

@boreal iron there?

earnest phoenix
#

Did you figure it out or do you still need help?

radiant kraken
#

but it would be good if you tell me what's wrong anyway

civic scroll
#

did you include

/** @type {import(path/to.def).Export} */
radiant kraken
#

what's that

civic scroll
#

that's a way to type the exported object in js

#

so ts won't warn you anymore

radiant kraken
#

i don't think i can document that in js

#

the functions are a part of a Node.js addon in Rust

#

only way would be through TypeScript typings

civic scroll
#

that's ts typing in js

#

suppose i have
export.d.ts

export interface Amogus {
    sus: Sus;
}

amogus.js

/** @type {import('./export.d.ts').Amogus} */
const amogus = {
    sus: new Sus()
};
module.export = amogus;
radiant kraken
earnest phoenix
civic scroll
#

define the source object like i did, and call Object.assign normally

radiant kraken
#

like ```js
const amogus = Object.assign(() => {}, {
something: 69
});

amogus();
amogus.something; // 69

civic scroll
radiant kraken
#

ah

#

so that's what is like in TypeScript typings

civic scroll
#

in fact

#

you can try hover if your editor / ide has intellisense

radiant kraken
#

uh what does the & operator do

civic scroll
radiant kraken
#

doesn't TypeScript have an extends operator? like

interface A extends B {
  ...
}
civic scroll
#

yes

radiant kraken
#

what's the difference

civic scroll
#

extends for interface

#

and & for normal type coersion

#

at least from what i understand

radiant kraken
#

ah alright

#

btw do you have to export types in the main.ts file whenever you're writing a TypeScript library?

#

e.g: ```ts
import type { A } from "./node/src/typings";
export type { A };

import init from "./something.js";
export default init;

civic scroll
#

normally the ts compiler will do that for you

radiant kraken
#

oh alright, thanks sayuri!!!

civic scroll
radiant kraken
#

whats that

civic scroll
#

that's one of ts compiler flag

#

but normally i would just recommend emit the declaration file only for the main export of the lib (the file that exports everything)

radiant kraken
#

the one on tsconfig.json?

civic scroll
#

yes

civic scroll
#

by default it will emit d.ts files for every file in the project

#

so only run it on the export file

radiant kraken
#

oh

#

sadly i cant do that

#

the main source code is in Rust so

civic scroll
#

moment

neon leaf
#

whats the best way to make self expiring entries in postgres & nodejs? the length can vary from 30sec to 24hours or more

radiant kraken
#

@earnest phoenix are you experienced with github workflows?

radiant kraken
# earnest phoenix Yeah

suppose i have a directory like this: ```
README.md
dir/README.md

changes in `README.md` should also affect `dir/README.md` and vice-versa. **I cannot use symlinks.**

how would a github workflow like that would work?
#

should i create two workflows? each watching for the file's changes, copy, and commit them?

#

or should i use a single workflow that uses a script?

#

if so, is there a way for the workflow's script (e.g in Node.js) to retrieve the latest commit's changed files?

#

you know what i think i'm overcomplicating this, i should solve this myself

earnest phoenix
#

You can fetch the changed files, compare, and edit them accordingly

earnest phoenix
digital swan
#

because the function you pass into broadcasteval is ran on every cluster

surreal sage
#

Is Httponly enabled?

earnest phoenix
#

Like for the match?

surreal sage
#

No on the site you're executing it on

earnest phoenix
#

Ah, no

#

It’s https

surreal sage
#

oh

#

I thought browser cookies

#

Are there errors?

earnest phoenix
#

Nope

surreal sage
#

Are the functions being called?

earnest phoenix
#

Yes

surreal sage
#

Does it display something as result?

earnest phoenix
#

Well, it either gives me a huge amount of cookies on cookie clicker or it just doesn’t work

limber siren
#

Anyone know why I am getting this error

boreal iron
#

well commands isn't an array

#

(or a djs collection)

radiant kraken
#

@earnest phoenix wtf is happening

#

scripts is clearly in the root directory

boreal iron
#

null nub

radiant kraken
#

shut up fake

boreal iron
quartz kindle
limber siren
quartz kindle
#

show the register function

limber siren
#
const Discord = require('discord.js');

module.exports = async (client, commands, options = {
    debug: false,
    guildId: []
}) => {

    const log = (message) => options.debug && console.log(message);

    const ready = client.readyAt ? Promise.resolve() : new Promise(resolve => client.once('ready', resolve));
    await ready;
    const currentCommands = await client.application.commands.fetch(options.guildId && { guildId: options.guildId });

    log(`Synchronizing commands...`);
    log(`Currently ${currentCommands.size} commands are registered to the bot.`);

    const newCommands = commands.filter((command) => !currentCommands.some((c) => c.name === command.name));
    for (let newCommand of newCommands) {
        await client.application.commands.create(newCommand, options.guildId);
    }

    log(`Created ${newCommands.length} commands!`);

    const deletedCommands = currentCommands.filter((command) => !commands.some((c) => c.name === command.name)).toJSON();
    for (let deletedCommand of deletedCommands) {
        await deletedCommand.delete();
    }

    log(`Deleted ${deletedCommands.length} commands!`);

    const updatedCommands = commands.filter((command) => currentCommands.some((c) => c.name === command.name));
    let updatedCommandCount = 0;
    for (let updatedCommand of updatedCommands) {
        const newCommand = updatedCommand;
        const previousCommand = currentCommands.find((c) => c.name === updatedCommand.name);
        let modified = false;
        if (previousCommand.description !== newCommand.description) modified = true;
        if (!Discord.ApplicationCommand.optionsEqual(previousCommand.options ?? [], newCommand.options ?? [])) modified = true;
        if (modified) {
            await previousCommand.edit(newCommand);
            updatedCommandCount++;
        }
    }

    log(`Updated ${updatedCommandCount} commands!`);

    log(`Commands synchronized!`);

    return {
        currentCommandCount: currentCommands.size,
        newCommandCount: newCommands.length,
        deletedCommandCount: deletedCommands.length,
        updatedCommandCount
    };

};```
quartz kindle
#

commands is not commands

#

you are passing chalk as the second argument

limber siren
#

oh shit yh I am

limber siren
quartz kindle
#

show events/ready.js

limber siren
quartz kindle
#

show where you run this exported function

boreal iron
#

why are u passing chalk as argument but importing it in any module anyways?

limber siren
#

I fixed it thank you

quartz kindle
#

👍

#

also, FakE is right, you probably dont need to pass chalk to your functions, you can just require it in all files

boreal iron
#

hey hey, capital E not K

#

wtf

radiant kraken
#

no way

boreal iron
#

tiM

quartz kindle
#

there

#

lmao

radiant kraken
#

its impossible that fake is right for once

boreal iron
#

shut up null

#

go do some rust stuff somewhere

radiant kraken
radiant kraken
#

i hate github workflows

boreal iron
#

they hate you, too

radiant kraken
#

so true

earnest phoenix
#

Unless that's the output for something else

radiant kraken
#

it should be the repo's root directory's contents right???

earnest phoenix
radiant kraken
#
name: synchronize readme
on:
  push:
    branches:
      - main
    tags-ignore:
      - '**'
    paths:
      - 'README.md'
      - 'node/README.md'
jobs:
  sync:
    name: Synchronize
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v3
        with:
          node-version: 18
      - name: Run Synchronize script
        run: |
          ls -l
          ls -l ..
          ls -l scripts
earnest phoenix
radiant kraken
#

OH

#

i forgot about those

#

asjdishdfusdfhsdfushfusdhfushfhsdufafjsf

#

why cant github do it by default

earnest phoenix
#

Because not all workflows need to work with the files of the current repository

#

Infact most of them don't work with the current repository files

radiant kraken
#

also

#

@earnest phoenix git diff --name-only HEAD -- HEAD~1?

#

or git diff --name-only -- HEAD HEAD~1?

earnest phoenix
#

There's no need for the --

radiant kraken
#

then what

#

the error message says otherwise

earnest phoenix
#

Remove it and it'll be correct

#

Oh I misread that, I see

#

@radiant kraken what does git log -n 2 log for you?

radiant kraken
#

nah git diff --name-only -- HEAD HEAD~1 worked for me

earnest phoenix
#

That's weird, it shouldn't need the -- separator

#

Not in this case at least

radiant kraken
#

wait

#

didnt work

#

@earnest phoenix how do you get the files changed in the latest commit

earnest phoenix
#

But git diff --name-only HEAD..HEAD~1 should already work, unless HEAD~1 doesn't exist

rare shore
#

how do i stop?

earnest phoenix
#

CTRL + C

rare shore
earnest phoenix
#

do that

#

and it stops

rare shore
#

knk turkum bende

earnest phoenix
rare shore
#

sorry

rare shore
plain coral
#

CTRL + C = stop only terminal: vs studio and linux

lyric mountain
#

vs studio isn't a terminal

#

it only embeds windows' pshell

earnest phoenix
#

Or whatever you specify

slender wagon
#
tabindex="-1"
wheat mesa
#

Read error

slender wagon
#

solved

wheat mesa
#

“Did you mean tabIndex?”

#

That should fix it

slender wagon
#

yeah had the string issue too

wheat mesa
#

Figured

slender wagon
#
tabIndex={-1}
#

is this ok?

#

it said it should be a number so

wheat mesa
#

If the compiler says it’s okay then it’s probably fine

#

It’s just a question of whether or not it does what you want it to do

plain coral
#

@earnest phoenix

#

moment.

earnest phoenix
#

yes

plain coral
#

Look example easy:

#

example ⬆️

#

but is python sorry, you search google

#

discoord js

#

easy tips.

#

think idea tips, you search google discord js how to command error received messages

#

and no need error announce game lol.

earnest phoenix
#

what

plain coral
#

example:

#

exactly.

earnest phoenix
#

have to do with that

#

that's an error handler

plain coral
#

That's right, for example the users and admin (I don't see anything when I see an ad) why are messages better when an error appears.

plain coral
earnest phoenix
#

I already have an error handler

plain coral
plain coral
earnest phoenix
plain coral
#

is tips.

earnest phoenix
#

"Create role [rolename] has been can permissions commands"

earnest phoenix
#

Also

#

the problem with that

plain coral
earnest phoenix
#

is

#

Wait no that's a command error

plain coral
#

@earnest phoenix yes yes but tips.

earnest phoenix
#

I see

plain coral
earnest phoenix
#

I have a global error handler

plain coral
#

only better message error

earnest phoenix
#

example

plain coral
#

Ah

#

maybe yes.

earnest phoenix
plain coral
#

Ah

earnest phoenix
#

it's not an error handler

plain coral
#

i see.

plain coral
#

good job.

#

good.

neon leaf
#

How can I make the node ms package display more accurate timestamps? for example I want "1h 30m" instead of just "1h"

neon leaf
#

looks good, thanks

cursive musk
#

Very very dumb question. I can't think for some reason.

<@ + id + > pings the user right?

How can I show Username#0000 with their ID?

#

I know for a user it is message.author.tag

solemn latch
#

so, did you just answer your own question? 👀

cursive musk
#

So not sure how I can find the tag with just the ID.

#

I've been doing it like this so far.

solemn latch
cursive musk
solemn latch
warm surge
solemn latch
#

is a a user?

cursive musk
solemn latch
#

just do a.tag

eternal osprey
#

hey

#

i tried saving a role id like: 1054164948143579156

#

into sql, but it keeps changing the value to like: 1054164879747068000

#

the type the variable is set to in sql is a BIGINT. Is the id maybe too big for the BIGINT?

solemn latch
#

ID's are numbers, but they are strings not ints.

eternal osprey
#

hu

quartz kindle
eternal osprey
#

sqlite does support bigints

quartz kindle
#

but be careful not to convert them to number at any point

eternal osprey
#

only thing is that it's saving the id wrong for some reason

quartz kindle
#

BigInt(id) and id.toString()

eternal osprey
#

1054164879747068000 instead of 1054164948143579156

quartz kindle
#

never do Number(id)

eternal osprey
#

yup was already aware of that, thanks ❤️

quartz kindle
#

if youre using a literal id, use the n suffix: 7483888594949n

#

not a normal number

eternal osprey
#

i've got no clue what the fuck a n suffix is

#

but that wouldn't matter for my issue would it?

quartz kindle
#

like

#

if youre typing the id yourself, hardcoded in your code

#

either type it as a string or as a bigint literal, not as a number

#

for example

#
"747848584949934" // ok
7477575858858585n // ok
7584858885884848 // not ok
#

notice the n at the end

eternal osprey
#

huh really?

#

My school taught me that it was okay to just handle BIGINTS as normal numbers in the sql query

quartz kindle
#

not in js

solemn latch
quartz kindle
#

sql does support 64 bit ints, but js does not

eternal osprey
#

owh dayum i didn;t know that

quartz kindle
#

if at any point the number becomes a js number, it will lose precision

eternal osprey
#

that's likely what's happening to me

quartz kindle
#

so you have to avoid any conversion to number in js

#

and use bigint or string witu sql

eternal osprey
#

what should i do then? part the ids and add them together eventually?

#

I am not using bigint in js

#

just sql itself

quartz kindle
#

show code

eternal osprey
#
if(interaction.values[0] == 'unverified_update'){
    const filter1 = m => m.member.id == interaction.member.id
  
 
  const collector1 = interaction.channel.createMessageCollector(filter1, { max: 1 });
  interaction.reply({ephemeral: true, content: `Please type the new **Unverified Role ID** down below:\n`})
  collector1.on('collect', m => {
 
    if(m.member.id !== interaction.user.id) return
    db.query(sql`UPDATE serverdatabase SET unverified = ${m.content} WHERE id = ${interaction.guild.id};`)
    collector1.stop()
   return interaction.channel.send({ephemeral:true, content: `:white_check_mark: **Successfully updated the database.**`})
  
  
})

}```
#

It might be that when it gets collected it gets converted.

quartz kindle
#

djs always uses strings for ids

#

never numbers

#

i dont see anything wrong with that code

#

whats the problem? the WHERE id doesnt work when it should?

eternal osprey
#

Well i am saving this id 1054164948143579156

#

but it's returning me a complete other id

quartz kindle
#

show how you save it then

eternal osprey
#

or ..?

quartz kindle
#

how you save the id

eternal osprey
#

uno second

quartz kindle
#

youre not saving the id there, youre using the id to change unverified

#

also

#

your filter is wrong

eternal osprey
#

huh what's wrong with the filter

quartz kindle
#

wait what djs version is that

eternal osprey
#

v13

quartz kindle
#

its createMessageCollector(options)

#

not createMessageCollector(filter, options)

#

filter goes inside the options

eternal osprey
#

but i am definining the filter and adding it inside of the collector?

#
     let pending_role;
      
   
      collector.on('collect', m => {
        console.log(m.member.id)
        console.log(interaction.member.id)
        if(m.member.id !== interaction.user.id) return
  pending_role = m.content     
       ```
#

this is how i save it btw

#

It's because let, changes it to a normal int

quartz kindle
eternal osprey
#

and therefore changing the precision i think

eternal osprey
quartz kindle
eternal osprey
#

Thanks for letting me know!

quartz kindle
#

theres nothing there about saving

eternal osprey
#

then i really have no clue wtf is wrong

quartz kindle
#

first things first

#

the filter should be

#

({ filter: filter1, max: 1 })

#

not (filter1, { max:1 })

#

get it?

eternal osprey
#

yup

#

Changing it rn

quartz kindle
#

pending_role would only be accessible from inside an "end" event for example

#

idk what the rest of the code looks like

eternal osprey
#

I will try to fix those global variables and see whether the same issue occurs

quartz kindle
#

you still didnt show where you actually save the id lol

eternal osprey
#

like the table i created?

quartz kindle
#

where you do insert query

eternal osprey
#

ah one sec

#
 // await db.query(sql`ALTER TABLE serverdatabase DROP CONSTRAINT id;`)
       await db.query(sql`UPDATE serverdatabase
                          SET status = 'enabled', admin = ${interaction.member.id}
                          , date = ${ cDay + "/" + cMonth + "/" + cYear},
                          level = ${level}, unverified = ${unverified_role},
                          verified = ${verified_role}, pending = ${pending_role},
                          timezone = ${timezone};`)
                    //    await db.query(sql`ALTER TABLE serverdatabase ADD CONSTRAINT id;`)
                          ```
quartz kindle
#

uh.......

#

thats literally

#

overwriting your entire database

#

and changing all entries to that

eternal osprey
#

yup

quartz kindle
#

do you only have one entry or what?

eternal osprey
#
  await db.query(sql`
        INSERT INTO serverdatabase (id, status)
        VALUES (${interaction.options.getString('id')}, 'new')
        ;`)```this is the real starter
#

when a new server gets added

#

but as you can see, i only alter the status and id.

#

the rest gets set to null till the owner activates the bot

quartz kindle
#

ok but

eternal osprey
#

and that activation is fucking everything

eternal osprey
#

huuuh

quartz kindle
#

so all servers in your db will be copies

#

all will have the same settings

eternal osprey
#

huh how

quartz kindle
#

because you didnt put a WHERE id = serverid

#

so it sets all of that to all server ids

eternal osprey
#

no

#

we are inserting

#

omg i was looking at the wrong thing

#

sorry

quartz kindle
eternal osprey
#

totally forgot that where yeah

eternal osprey
#

sorru

quartz kindle
#

that one is correct

eternal osprey
#

yup!

#

but yeha this is so fuck strange

#

my collector is collecting the number wrong

#

because inside my collector i am logging the m.content

#

and it indeed shows 1054164879747068000 instead of 1054164879747068004

#

like what the actual fuck

quartz kindle
#

m.content is what you type in the message, did you type the id right?

eternal osprey
#

yeah pretty sure

quartz kindle
#

if m.content is different from what you write in the message then theres something very wrong going on

#

i have never seen that happen

#

show how you are logging it

eternal osprey
#

aight one sec

#
collector.on('end', async collected =>{
      console.log(unverified_role)
        let currentDate = new Date();
        let cDay = currentDate.getDate();
        let cMonth = currentDate.getMonth() + 1;
        let cYear = currentDate.getFullYear();
      // await db.query(sql`ALTER TABLE serverdatabase DROP CONSTRAINT id;`)
       await db.query(sql`UPDATE serverdatabase
                          SET status = 'enabled', admin = ${interaction.member.id}
                          , date = ${ cDay + "/" + cMonth + "/" + cYear},
                          level = ${level}, unverified = ${unverified_role},
                          verified = ${verified_role}, pending = ${pending_role},
                          timezone = ${timezone}
                          WHERE id = ${interaction.guild.id};`)
                    //    await db.query(sql`ALTER TABLE serverdatabase ADD CONSTRAINT id;`)
                          
       
        ```
#

look

#

the 335 is the log in the collector.end

#

the other one is after the unverified_role is being saved

#

is my bigint not big enough or something

#

wtf

quartz kindle
#

how did you define unverified_role?

#

also, how did you define the table serverdatabase

#

show the create table query you used

eternal osprey
#
 await db.query(sql`CREATE TABLE IF NOT EXISTS serverdatabase (
    id BIGINT,
    status STRING,
    admin BIGINT,
    date STRING,
    level INT,
    unverified INT,
    pending INT,
    verified INT,
    timezone STRING,
    PRIMARY KEY(id) 
    );`)```
#

i now even switched over and directly save the m.content into my db

#

but that conversion from m.content to db seems to fuck me

quartz kindle
#

you're using SQLite right?

eternal osprey
#

yeah

#

hmmm wait

#

wiatttt

#

using the addserver i already insert a new guild

#

with the other values being null

#

wait no, i am using update and set

quartz kindle
#

you dont need to set primary key separately

#

id BIGINT PRIMARY KEY,

eternal osprey
#

ah yeah that's right

#

i just like to put all the keys below

quartz kindle
#

also, BIGINT doesnt really matter in sqlite, because sqlite uses variable INT

eternal osprey
#

Owh so i can convert it to int?

quartz kindle
#

all of these are the same as INTEGER

#

the actual size of the number is autodetected by sqlite

#

it doesnt need to be defined manually

eternal osprey
#

Owh but what the fuck is wrong with my code then?

quartz kindle
#

which sql library are you using?

eternal osprey
#

sqlite

#

should i send you the code in pastebin?

quartz kindle
#

sure

quartz kindle
#

not sqlite

#

@databases/sqlite uses sqlite3

eternal osprey
#

owh

#

I didn’t know there was a difference

#

might that be the issue?

quartz kindle
eternal osprey
#

I see

#

What is blob and where can I set it tho lmao

quartz kindle
#

id suggest you use better-sqlite3 instead, which is what i use

#

or just store the ids as strings

#

which is what most people do

eternal osprey
#

Yeah might just do that lmao

#

Tim you’ve been an incredible help

#

Thank you so much

hidden gorge
#

import pydactyl
from datetime import datetime, date, time, timezone

import discord
import pymongo
from discord.ext import commands
from pydactyl import PterodactylClient```
#

?

#

like it works on my other bots

#

fixed

crystal wigeon
#

Is there a way for me to fulfil a promise without using await?

#

Even if I use .then it’s still a promise if I assign to a variable

earnest phoenix
#

If you only want to resolve it without using async/await then yeah you've got %Promise.prototype.then()% but that's not what you want

quartz kindle
#

await gives you the value back to the current context, .then gives you the value in a new context like a callback

crystal wigeon
#

Yeah gotcha, well was trying to reduce the bundle size for firebase auth ill try and post the issue later maybe

#

Thanks a bunch

eternal osprey
#

hey guys

#

i have a question about security:

#

So this is about a side channel attack

#

The question is about how you can use this code to eventually get the password using guesses

late willow
#

Is there a package through which I can know if someone has made a vote or not?

eternal osprey
#

My answer was that, we can put the guess into the function. If the general runtime of the code is really low, it means that the length is not even correct (first if statement, return). If one certain or a bunch of runtimes are somewhat equal but bigger than the ones stuck at the first if statement, it means that they passed the first if and are now into the for loop. If one runtime is the biggest of all, the attacker now knows either a part of the actual password (it came the furthest in the for loop) or the whole actual password.

#

Is this correct?

boreal iron
#

And the channel description and pins

quartz kindle
#

side channel attacks involve observing things around the code, like performance/timing, cpu usage, temperature, power usage, sound, etc...

eternal osprey
#

awesomeee!

#

thanks

earnest phoenix
#

I have this role remove command, but it says that - `TypeError: Cannot read properties of undefi ned (reading 'roles') at Object.execute (/home/runner/Test-bo

t/Commands/Test/r.js:74:35) at processTicksAndRejections (node: inte

rnal/process/task_queues:96:5)`

Code - https://sourceb.in/qSlqdHEVBp

quartz kindle
limber siren
quartz kindle
#

what is the problem?

earnest phoenix
feral aspen
radiant kraken
#

@earnest phoenix apparently git log -n 1 --name-only --pretty=format: logged every file in the repo

#

not the ones changed in the most recent commit

#

instead of this, how about i just make two separate workflows instead?

earnest phoenix
radiant kraken
earnest phoenix
#

I'm starting to think the Git version you've got installed is bugged

#

It shouldn't matter whether it's in a GitHub workflow or wherever

earnest phoenix
#

That's impractical, there's no need

#

What does git rev-list --count origin log for you?

radiant kraken
#

36

earnest phoenix
#

Can you tell me what Git version are you using?

#

Because if git diff --name-only HEAD..HEAD~1 doesn't work then there's definitely a problem here

#

I tried it on multiple different repositories (even extremely large ones) and it works as expected

radiant kraken
earnest phoenix
radiant kraken
earnest phoenix
# radiant kraken

The latest stable is 2.39.0 but I'm not sure if that's gonna make a difference, I have no idea why that method doesn't work for you

#

@radiant kraken try git diff --name-only HEAD~1..HEAD

#

If even that doesn't work, your only luck is git diff --name-only HEAD^ HEAD

craggy pine
#

I'm toying around with slash commands for the first time and I had a quick question on why a certain function I'm creating wouldn't work as it work in v13.
I have a file functions.js which I extend in my index.js to make it globally called using client.<whatEver> so for this case my embeds that I would normally use for errors or success'

  const { EmbedBuilder } = require("discord.js");
  client.successEmbed = async (str, channel, time) => {
    const sucEmbed = new EmbedBuilder()
      .setColor("#00FF00")
      .setTitle("✅ SUCCESS")
      .setDescription(str)
      .setTimestamp()

    if(channel && !time) {
      return channel.send({embeds: [sucEmbed]})
    }

    if(channel && time) {
      const timeOut = await channel.send({embeds: [sucEmbed]})
      return setTimeout(() => {if(channel.messages.cache.find(m => m.id === timeOut.id)) timeOut.delete()}, time)
    }

    //errors here since I'm not passing in channel & time
    if(!channel && !time) {
      return sucEmbed
    }
  }

So for this function I'd normally do

        return interaction.reply({
            embeds: [
                client.successEmbed(client.ws.ping + "ms!")
            ],
            ephemeral: true
        })

but with slash commands I receive the following error. data.embeds[0][LIST_ITEM_VALUE_REQUIRED]: List item values of ModelType are required

I have a similar function that works as intended but w/ less code

  client.quickEmbed = (title, str) => {
    return new EmbedBuilder()
      .setColor('LuminousVividPink')
      .setTitle(title)
      .setDescription(str)
  }

So why would success embed throw this error but quickEmbed doesn't?

#

sorry for a page worth of text. 😅 also ik some of the code is coded in v13 however I'm focusing on the commented part

earnest phoenix
craggy pine
#

oh because I'm not awaiting it errors.

#

Welp ty. Trying out v14 stuff is a little overwhelming so I didn't even think about this. it works.

lament rock
#

make your own Discord lib (don't)

craggy pine
#

Ya I'd rather not.

#

Hell I don't even want to make my own v14 slash command handler at the moment. Literally using a template from github just to toy around with how things work.

craggy pine
#

Another question in regards to slash commands. Do all commands have to follow up with a interaction.reply or is there a way to get rid of the whole sending command... or <bot> is thinking...

earnest phoenix
craggy pine
earnest phoenix
#

You can respond and quickly delete it krWriting

craggy pine
#

Also noticed that. May be what I end up doing LUL

earnest phoenix
#

One thing I don't get is why Discord removed the ACK (Acknowledge) response type to interactions

#

Many things were already using it, but they removed it for no reason

#

The response type 1 (PONG) still seems to exist but the API doesn't accept it Thonk

lament rock
#

which is when you insert the http endpoint

earnest phoenix
#

Ah, so what I'm talking about is something else, the one that was removed

slender wagon
#
Uncaught TypeError: document.querySelectorAll(...).click is not a function

the code:

 document.querySelectorAll("#vidLinks a").click(function(){
#

HALP

earnest phoenix
slender wagon
#

i am tryna convert this shit

#

$("#vidLinks a").click(function(){

slender wagon
#

but how do i add a eventlistener on click on querySelector

earnest phoenix
mighty patrol
#

my help command makes use of the map feature, how can I exclude a category from my help command?

#

this is how I get the directories of the commands

lyric mountain
#

why are u spreading a set to an array?

#

instead of using the set directly

mighty patrol
#

idk I watched a tutorial on it

lyric mountain
#

💀

#

you need to understand why they're doing such things, not copying it as-is

mighty patrol
#

its probably due to the ways its mapping it again but for categories

lyric mountain
#

not really

#

that's usually done to remove duplicates, but it really has no meaning if ur gonna iterate over it anyway

#

it's just wasted processing

mighty patrol
#

So I don't need a set?

#

anyways

#

back to my question

#

how do I exclude a category from showing up?

lyric mountain
#

use filter

#

did u learn how to code in js or are u just blindly pasting things?

mighty patrol
#

I'm not pasting anything

lyric mountain
mighty patrol
#

I'm learning from it

#

thats what a tutorial is for

#

anyways

lyric mountain
#

not in video format

mighty patrol
#

would this work?

lyric mountain
#

try it and see

mighty patrol
lyric mountain
#

well, the thing is, even if ur learning ur probably learning outdated stuff

#

videos are timeless, they don't stay updated to new features

#

you need to do courses or follow written guides, which are usually kept updated on a regular basis

mighty patrol
lyric mountain
#

there are a ton of js crashcourses out there

mighty patrol
#

I don't need a JS crash course

#

I've been coding for 4 years

#

I know the basics

lyric mountain
#

yet dont know how to exclude elements from an array

#

there's no shame in doing courses to get a quick intro on a new language, I do them all the time

mighty patrol
#

I never do it

#

so yea