#development

1 messages · Page 1815 of 1

proven lantern
#

are there any vps services that use quantum processors?

proven lantern
#

combinations grow too fast

boreal iron
#

Well DBs can handle that, yeah

#

The question is if you got enough space waitWhat

earnest phoenix
#

Real question is, what exactly are they doing that requires that many calls

proven lantern
quartz kindle
#

when you index is bigger than your data

boreal iron
#

Yeah unfortunately

proven lantern
boreal iron
#

That’s the issue with the table

quartz kindle
tulip ledge
#
nodemon bot.ts -e ts --dev 
[nodemon] 2.0.12
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: ts
[nodemon] starting `ts-node bot.ts --dev`
'ts-node' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...
proven lantern
#

@quartz kindle no combinations, not permutations

tulip ledge
#

Anyone knows how to solve?

crimson vapor
#

is ts-node installed globally?

earnest phoenix
#

you need to install ts-node in the project

#

you don't need it globally

tulip ledge
#

I'm pretty sure I installed it globally

#

I'll try again

quartz kindle
#

if youre on windows, restart your cmd

tulip ledge
quartz kindle
#

👍

earnest phoenix
#

tim is god in development channel

tulip ledge
#

Also,

package.json:
"dev": "cd src; nodemon bot.ts -e ts --dev",

ERROR:
> topazrpg@1.0.0 dev C:\Users\Yarne\Desktop\TopazRewrite
> cd src; nodemon index.ts -e ts --dev

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! topazrpg@1.0.0 dev: `cd src; nodemon index.ts -e ts --dev`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the topazrpg@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Yarne\AppData\Roaming\npm-cache\_logs\2021-07-18T21_39_46_512Z-debug.log

This does not seem to work when I do npm run dev but when I cd to src and run the nodemon index.ts -e ts --dev it does work

quartz kindle
#

dont do cd src

#

do something like nodemon ./src/bot.ts

tulip ledge
#

ok

long crow
#

enquiry.includes('\\\\') fokin backslash

#

(╯°□°)╯︵ ┻━┻

woeful pike
woeful pike
#

The only thing quantum computers are better at doing than regular computers rn is pretending to be a quantum computer

proven lantern
#

i hope they can use quantum stuff to get rid of lag

#

someday

earnest phoenix
#

2069: Potato Quantum Computer

split hazel
#

they are used in production but not in the way you'd expect

#

there's only so much you can do with a few bits that can have 3 states

#

they can only do certain calculations much faster than normal computers but they aren't that useful for most

weary thorn
#

Hello everyone, I have a query is there any way to translate the arkbuddy bot from ARK is for a server that I am creating in Spanish, and I would like to modify the bot so that it works in my community, I have no problem doing it on my own and assigning it to the creator of the bot! Thank you. PS I don't know if here is the right place in this discord

#

PD: sorry for my English

#

@cedar badge

errant flax
#

whats the best db for like temporary data..
like i want to make a reminder for ex. then itll delete the reminder a couple of mins or something whats the db for that bonk

errant flax
#

?

#

wuz that

#

wait is it possible to do that in mongodb or no

earnest phoenix
#

@errant flax it's temporary data so you can store in a djs collection in ram and it'll get deleted when you want and when the bot restarts

errant flax
#

what if i dont want to be deleted when the bot restarts wawa_huh_confused

#

thats why im talking about db bonk

proven lantern
#

try memcached

#
rose warren
errant flax
#

can mongodb even store like temporary data

lean bane
#

pls bal

errant flax
rose warren
#

Just have it check periodically for expired reminders and ping the user when they're expired then delete from the table

errant flax
#

how would i do that hmm

#

i have done with setInterval but its too inaccurate bonk

rose warren
#

How is it inaccurate?

#

How often are you checking?

errant flax
#

is it ok if i checked like every 5-10 mins?

rose warren
#

Why not check every 60s?

wanton flicker
#

my friend told me that having a bot game in dms may violate ToS, is this true

errant flax
#

jk

wanton flicker
#

I believe he said you can't spam someone with dms or smth, but i'm not sure.

rose warren
#

It's fine to send DMs to a user if the user has initiated the command.

earnest phoenix
#

Spamming the api isn't allowed.

rose warren
#

Every minute isn't API abuse

earnest phoenix
#

But dming a user is not if they did what mac said

#

I know this.

#

They probably misunderstood what their friend said by spamming.

wanton flicker
#

hm ok.

rose warren
#

As long as it doesn't get rate limited it's ok

wanton flicker
#

yeah also about rate limited, is it increased rate for bots? and can a bot only get ratelimited in one channel? in other words, how does bot ratelimiting work :D

earnest phoenix
#

I think discord ratelimits you on the api itself, so ti doesn't matter what channel its in.

wanton flicker
#

hm.

rose warren
wanton flicker
#

ok thanks :D

earnest phoenix
#

There is also that

wanton flicker
#

hm. so just to make sure, ratelimit covers all sorts of requests from discord? basically anything that the bot does in discord.

earnest phoenix
#

Ratelimits cover the api, if you spam it you get ratelimited and have to wait.

#

Spam it too much they reset your token iirc on the first offense.

wanton flicker
#

so what exactly does the "api' mean here, im not really clear

earnest phoenix
#

You don't know what an api is?

wanton flicker
#

nono as in what are some examples of what is going to be counted into the ratelimit count

#

btw what notif will you get when bot is accepted :D

wheat mesa
cedar raptor
#

I got my first bot approved. I'm happy

wanton flicker
devout vapor
#

hello hello :3
so i have this part on my bot that asks for a user's reply within a few seconds and if it's not replied, it will end. the problem that i'm having now is that: how do i put in delays between messages inside that await messages portion because using settimeout did not seem to work as it clashes with my await messages' timer D:

this is what i have and the "delay here" is where i want to put a slight delay between each message.

msg.channel.awaitMessages(m => m.author.id == taggedUser.id, {max: 1, time: 30000}).then(collected => {
msg.channel.send(`One message`)
//delay here
msg.channel.send(`One message`)
//delay here
msg.channel.send(`One message`)
//delay here
msg.channel.send(`One message`)
}).catch(collected => {
                msg.channel.send('No reply after 30 seconds, duel is cancelled!');
                });
errant flax
prime bronze
# devout vapor hello hello :3 so i have this part on my bot that asks for a user's reply within...

i have this function use for cases like this...
i put await before your msg.channel. etc because they return promises (if i am not mistaken) so it's a good idea to await them, so if they throw an error try/catch will catch it (instead of missing it). I think you can skip the await before msg.channel.send() safely if you are using .catch() .. if that is your preferred style

function sleep(sec) {
    return new Promise(resolve => setTimeout(resolve, sec*1000));
}

// your code...

try {
  await msg.channel.send(`One message`)
  //delay here
  await sleep(5);
  await  msg.channel.send(`One message`)
  //delay here
  await sleep(5);
  await  msg.channel.send(`One message`)
  //delay here
  await sleep(5);
} catch (error) {
 console.error(error)
}
devout vapor
#

OOOOO:

devout vapor
prime bronze
#

hope it works out

earnest phoenix
#

any example for a express app post request which needs a token

prime bronze
#

cool, would ve nice when it comes to the LTS version

lyric mountain
#

also, if what you want is precision (and not having to setInterval everywhere), you could use some cron library

vivid fulcrum
#

if you want to remove stress from your database

#

pull all reminders at once into memory once your application boots up

#

and either setTimeout for every single one

#

or have an interval checking your memory every few seconds for the due ones

vivid fulcrum
cinder patio
#

yeah imo that'd be the easiest way

#

A single interval also works but it's gonna be slower

vivid fulcrum
#

you save memory at the cost of using more cpu power

feral aspen
#

Hello. 👋

#

Do you guys have a function whereas I can pass out an argument that specifies the amount of seconds to wait before each function/method I do?

#
functiona()
// wait for about 20 seconds
functionb()
feral aspen
#

Oh.. I didn't realise this was discussed before.. thanks.

worn sonnet
#

Just a doubt i have

#

can message id be same for message id in other channels?

#

I'm thinking of using a message id as Primary Key for DB

cinder patio
#

all message IDs are unqiue

#

doesn't matter where they come from

worn sonnet
#

ah a 18 digit number unique for each and every msg on discord

cinder patio
#

yeah.

worn sonnet
#

and i see this thing here
* Message id isn't unique to the system, that is why the only way is to loop through all available channels, since message id is only unique to the channel. It is possible (quite unlikely though) to match two distinct messages with the same id from two different channels.

copper cradle
#

They don't know what they're talking about then

cinder patio
#

yeah that's wrong

copper cradle
#

All ids are unique

worn sonnet
#

Oke alr then i guess it's safe to use msg ids as Primary Key

cinder patio
worn sonnet
#

Ooof Thanks now that's reassuring

regal creek
#

whats the best non-caching http library in python?

lyric mountain
#

http request or webservice?

regal creek
#

whats the difference?

#

http request pretty sure

lyric mountain
cinder stratus
#

Hey, I am trying to create something like even if my bot restarts it will join the voice channel and start playing from where it left. I am just confused like how to implement this any suggestion or any basic idea will be of great help.

earnest phoenix
#

@cinder stratus store the voice channels and the queue in a database then when the bot restarts join all of them and start playing the music

cinder stratus
#

Okay, but the main issue is rate limits it will be around 600-700 connections so any timeout suggestions?

earnest phoenix
#

@cinder stratus literally the rate limit for the timeout?

cinder stratus
#

Yeah so I don't get rate limited if it becomes like spam or something to the gateway

#

Because I have got my bot hit with 429 many times

#

and I don't want those anymore

cinder stratus
earnest phoenix
#

i dunno

cinder stratus
#

I meant my db structure

#

or schema blah blah

#

Alright I'll write some code

quartz kindle
#

use a separate process for voice

#

like lavaplayer/lavalink does

#

that way even if the bot process disconnects, the voice process is still connected

cinder stratus
#

I use lavalink

quartz kindle
#

then your bot should not be disconnecting from voice

cinder stratus
#

Like if it restarts it disconnects

small tangle
#

what are the sizes of an embed image to not getting cropped on mobile?

pale vessel
#

They get cropped since there's a thumbnail set

#

Not sure if you can fix that without removing thumbnail

small tangle
#

wait interesting

#

lemme check

pale vessel
#

Only on mobile though

#

Stupid discord

#

Unless I'm completely wrong and it's on desktop too lul

#

Never had issues with that on desktop NGL

small tangle
#

no youre right

#

on desktop fine with

#

and its getting cropped with thumbnails on mobile wow

#

thanks :)

tired panther
#

on Hover, how do I get it shown over the black field?

#

Here are the css

 .shard-button.ressource{
     /*Margin & padding*/
    overflow: hidden;
    float: right;
    color: white;
  }

  .shard-button.ressource span{
    max-width: 0;
    -webkit-transition: max-width 1s;
    transition: max-width 1s;
    display: inline-block;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    opacity: 0.5;
  }

  .shard-button.ressource:hover span{
    max-width: 25rem;
    opacity: 1;
  }

lyric mountain
#

use absolute position and opacity: 0 the button div

#

then add onMouseEnter to the black field to set said div to opacity: 1

tired panther
lyric mountain
#

well yeah, you need to adjust the positioning

#

right: 0 should do

#

or whatever pos you want

small tangle
#

why are embeds on mobile so dumb? goaSadness

tired panther
lyric mountain
#

margin-right will add margin to the right

#

what do you mean "remove the black field"?

tired panther
#

btw margin-right works

small tangle
#

thats wasnt clear in your question to be fair LuL

lyric mountain
#

you cant have absolute pos if you want it to share space with the black box

tired panther
#

can I make something like a splash/opacity on the black element just with css when the Settings button is on hover?

or do I have to listen on html events?

lyric mountain
#

what

quartz kindle
#

yes you can do it with css only

tired panther
# lyric mountain what

When I hover on the settings button, it extends and gets to a button tray.

Currently it looks ugly, bc it is over a text. So my Idea would be to decrease the opacity of the black element, when the button tray is extended.

I know that this is possible with html Event listeners, but I dont know if you can change the props of two css element on one action.

lyric mountain
#

also, add some padding for the black box

#

buttons are too aligned with the margins

quartz kindle
#

you can change multiple elements with a single action but only children elements

#

for parents and siblings you need js

lyric mountain
#

"how to remove child from parent with fork"

tired panther
quartz kindle
#

you have to put the hover on .shard-button

#

you cant change siblings, only children

#

actually

#

try this

#
.shard-button:hover.log {

}
tired panther
quartz kindle
#

you cant

#

if hover is on .ressource then if can only affect things that either have the same class, or are children of this element

rose warren
#

How you write your HTML depends on what you want to do with CSS. They're pretty dependent on each other. Figure out how to achieve what you want to do in CSS and that will tell you how to write your HTML.

tulip ledge
#
Argument of type '[MessageMenu]' is not assignable to parameter of type 'MessageActionRowComponentResolvable[] | MessageActionRowComponentResolvable[][]'.
  Type '[MessageMenu]' is not assignable to type 'MessageActionRowComponentResolvable[][]'.
    Type 'MessageMenu' is missing the following properties from type 'MessageActionRowComponentResolvable[]': length, pop, push, concat, and 26 more.ts(2345)
#

I'm trying to use discord-buttons to create a selection menu but typescript won't allow me lol

#
      let guides = "";
      let SelectMenu = new MessageMenu()
      .setID("GuideSelection")
      .setMaxValues(1)
      .setMinValues(1)
      .setPlaceholder("Select which guide you'd like to view.")

      for (let i = 0; i < list.length; i++) {
        // Code
        let selection = new MessageMenuOption()
        .setLabel(creator.userName)
        .setValue(i.toString())
        .setDescription(guide.name)
        if (i === 0) selection.setDefault();
        SelectMenu.addOption(selection)
      }

      cmd.reply({
        embeds: [embed],
        components: [
          new MessageActionRow()
          .addComponents(SelectMenu)
        ]
      })
#

Here's the code

quartz kindle
#

addComponents([SelectMenu])

tawny fern
#

Is it possible to add like it replys with the thinking message?

quartz kindle
#

only for interactions i believe

tawny fern
#

alr

#

Ty

lyric mountain
#

imo that's a half-baked feature

#

like, let us send ephemeral messages normally

quartz kindle
#

ye

lyric mountain
#

instead of being locked behind interactions

slender thistle
#

This is Discord

lyric mountain
#

a simple sendMessage(<User>, <Text>) would suffice

tulip ledge
# quartz kindle addComponents([SelectMenu])
Argument of type '[MessageMenu[]]' is not assignable to parameter of type 'MessageActionRowComponentResolvable[] | MessageActionRowComponentResolvable[][]'.
  Type '[MessageMenu[]]' is not assignable to type 'MessageActionRowComponentResolvable[][]'.
    Type 'MessageMenu[]' is not assignable to type 'MessageActionRowComponentResolvable[]'.
      Type 'MessageMenu' is not assignable to type 'MessageActionRowComponentResolvable'.
        Type 'MessageMenu' is missing the following properties from type 'MessageSelectMenu': customId, disabled, maxValues, minValues, and 3 more.ts(2345)
quartz kindle
#

lol

tulip ledge
#

?

tawny fern
#

hey, how can i get discord ids from an array in a if statement so they can run a command?

lyric mountain
#

.includes()

tawny fern
#

and i put the array name there?

quartz kindle
# tulip ledge ?

you will have to check how SelectMenu is structured and convert it to something discord.js accepts

lyric mountain
tawny fern
#

Like this?

lyric mountain
#

no

#

includes already returns a boolean

tawny fern
#

so nothing in the includes()?

lyric mountain
#

oh my

quartz kindle
#

ids.includes(YOUR ID HERE)

lyric mountain
#

can't be more clear

tawny fern
#

I want to Let everyone in that array be able to have access to that command

#

agh

lyric mountain
#

...just use that

quartz kindle
#

what we told you does exactly that lol

tawny fern
#

So i have to put mine in the include()?

quartz kindle
#

...

#

you put the id you want to check

lyric mountain
#

bruh moment

tawny fern
#

like one of the ids in the array?

#

and it only lets that person do the command?

quartz kindle
#

dude

#

which id are you trying to check if it exists in the array?

tawny fern
#

every id

quartz kindle
#

no

#

when the user runs a command

#

which id are you gonna check?

#

in that specific moment

tawny fern
#

Like the id of the user

quartz kindle
#

exactly

#

and how do you get the id of the user?

tawny fern
quartz kindle
#

yes

tawny fern
#

im dumb

quartz kindle
#

thats the id you're checking

tawny fern
#

Like this?

quartz kindle
#

....

#

no

tawny fern
#

what then?

quartz kindle
#

array.includes() already returns true or false

tawny fern
#

so, then nothing inside includes?

quartz kindle
#

...

#

ids.includes() returns true or false

#

what do you use true or false for?

tawny fern
#

to check if its in there?

quartz kindle
#

lol

#

think a bit pls

#
if(true) {
  // do something
} else {
  // do something else
}
lyric mountain
#

<array>.includes(something) = if <array> contains value <something>

#

tbf that's the most self-explaining function in js

tawny fern
#

But will it let the others than the id in the include run the command?

quartz kindle
#

you are not thinking are you?

tawny fern
#

No,bc im tired

quartz kindle
#

then go sleep and come back tomorrow

tawny fern
#

no.

quartz kindle
#

lol

boreal iron
quartz kindle
#

you said this if(message.author.id === ids.includes(message.author.id)){
do you understand what this line is doing?

#

if message author id equals the result of ids.includes message author id

tawny fern
lyric mountain
#
const arr = ['duck', 'goose', 'fox', 'dog']

arr.includes('duck'); // TRUE - the array contains 'duck'
arr.includes('horse'); // FALSE - the array doesn't contain 'horse'
#

cmon, can't get more simple

boreal iron
quartz kindle
#

therefore

#

so that if will always fail

tawny fern
#

wait

quartz kindle
#

jesus christ

lyric mountain
#

aaaaaaaaaaaaaaaaa

tawny fern
#

no

#

that will get the id to the bot

quartz kindle
#

do you know how you use parenthesis in math? the things inside parenthesis are done first?

tawny fern
#

Ik

quartz kindle
#

so imagine this

boreal iron
quartz kindle
#

if(message.author.id === (ids.includes(message.author.id)))

boreal iron
#

Sorry can’t watch this

quartz kindle
#

the result of ids.includes is done first

lyric mountain
#

we need this as a sticker here

tawny fern
#

AGHH

#

Just tell me the answer

boreal iron
#

array.includes(find)
will check IF find is an item of array and if yes, then return true, if not then false

#

The answer has been posted already.

tawny fern
#

and only that person will be able to run the command yea, that dosent help

#

I need everyone in the array to be able

lyric mountain
#

tbf, if you can't figure this out you need to learn more about coding in general

#

4 examples

#

a single boolean-returning function

#

single param

boreal iron
quartz kindle
lyric mountain
#

think the opposite

#

why check if the id is in the array

#

if you can check if the array contains the id

#

message.author.id is the id of the author of the message

tawny fern
#
        if(ids.includes(message.author.id)){
            message.channel.send(embed)
        
            timeout.timeout('sendmessage', 3000, function() {
                message.channel.send(embed2)
                message.channel.send(gifs[random])
            })
        } else {
            const embed3 = new MessageEmbed()
            .setTitle(':warning: ERROR :warning:')
            .setDescription(':warning: You dont have permission to do that command :warning:')
#

this dosent work

lyric mountain
#

it'll change depending on who used the command

#

so, ids.includes(message.author.id) will check if whoever used the command is in the array

quartz kindle
tawny fern
#

it just sends the else function

#

const ids = ["691468323874930779", "808039521328693268"]

#

this is the ids

quartz kindle
#

can you show the full code for that command?

boreal iron
#

And you’re sure the message author id = one of the IDs in your array?

lyric mountain
#

the second id is his own, I checked

tawny fern
#
const { MessageEmbed } = require('discord.js')
const timeout = require('timeout')

module.exports = {
    name: "tacobell",
    description: "Tacobells",
    execute(message, args) {
        const gifs = ["https://tenor.com/view/diarrhea-yikes-poop-gif-16674264", "https://tenor.com/view/taco-bell-morning-shit-poop-big-pile-of-shit-gif-18021700", "https://tenor.com/view/poop-shit-diarrhea-ice-cream-soft-serve-gif-4971272", "https://tenor.com/view/lego-diarrhea-shitposting-gif-8359424"]

        let random = Math.floor(Math.random () * gifs.length);

        const embed = new MessageEmbed()
        .setColor('RANDOM')
        .setTitle('Tacobell :yum:')
        const embed2 = new MessageEmbed()
        .setColor('RANDOM')
        .setTitle('NOOOOO, WHY DOES THIS HAVE TO HAPPEN TO MEEE :sob:')

        const ids = ["691468323874930779", "808039521328693268"]

        if(ids.includes(message.author.id)){
            message.channel.send(embed)
        
            timeout.timeout('sendmessage', 3000, function() {
                message.channel.send(embed2)
                message.channel.send(gifs[random])
            })
        } else {
            const embed3 = new MessageEmbed()
            .setTitle(':warning: ERROR :warning:')
            .setDescription(':warning: You dont have permission to do that command :warning:')
            .setFooter('© Fortenox 2021 (All Rights Reserved)')
            message.reply(embed3);
        }

    }            
}
#

do not mind the gifs

lyric mountain
#

did you save the file?

quartz kindle
#

and restart the bot?

tawny fern
#

Yea

#

it hadnt reset fully

#

it works propally now

quartz kindle
#

👍

modest maple
#

well that was

#

Painful

novel jetty
#

How do you get someones roles from a server?

.addField(`Roles`, `${author.roles.cache.map(r => `${r}`).join(' , '), true}`)

Like this?

#

Since i have been getting this error

lyric mountain
#

why ".map(r => `${r}`)"?

#

also, author is an user, users cant have roles

#

you need to get the member instance

quartz kindle
#

also why the true? that basically erases the entire result, so your map join is useless

uneven fulcrum
#

im tryna get a vote users id
but i get this error
0|index | TypeError: Cannot read property 'cache' of undefined
I have this code

  const newuser = Client.users.cache.get(usersend)
lyric mountain
#

where is Client defined?

uneven fulcrum
#

const Client = require('discord.js')

#

cuz this is in my sharding file

#

where i start the bot

#

@lyric mountain

tulip ledge
#
emoji: {
          name: ["A", "B", "C", "D", "E"][i],
          id: ["866763331075178526", "866763331129311303", "866763330860875817", "866763331225255946", "866763331326836756"][i]
        },

Type 'string' is not assignable to type '${bigint}'.ts(2322)

#

if I just put a number there it sais number cannot be assigned

#

and if I put BigInt(number) it sais bigint cannot be assigned

lyric mountain
uneven fulcrum
quartz kindle
lyric mountain
uneven fulcrum
#
const bob = require('./mainstart')
const express = require('express')
const Topgg = require('@top-gg/sdk')
const Discord = require('discord.js')
const manager = new ShardingManager('./mainstart.js', {
   token: "dfsfds",
})
const Client = require('discord.js')
const { message } = require('discord.js')
const app = express()
const port = 1858

const webhook = new Topgg.Webhook("thinghere")

app.post("/dblwebhook", webhook.listener(async vote => {
   console.log(`${vote.user} has voted me`)
   const webhook2 = new Discord.WebhookClient('1234', '12345')
   webhook2.send(`<@${vote.user}> has voted me`)
   const usersend = vote.user
   const newuser = Client.users.cache.get(usersend)
   
   newuser.send('Thanks for voting! You recieved 75k bobux')
   return this.economy.addBal(usersend, 75000)
 }))
app.listen(port, () => {
   console.log(`Webhook Port On`)
 })  



manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
manager.spawn();

#

@lyric mountain

lyric mountain
#

...

quartz kindle
#

thats very very wrong on many levels

tulip ledge
#

Tim, do you know how to solve my issue?

lyric mountain
#

I see 4 requires to discord.js

#

tim, do you see 4 requires to discord.js?

uneven fulcrum
#

k fixed @lyric mountain

#

const {Discord, Client, message} = require('discord.js')

#

where is the 4th

lyric mountain
#

message

#

and no, that wont work

quartz kindle
#

message doesnt exist in the Discord object

uneven fulcrum
quartz kindle
#

neither does Discord itself

tulip ledge
#

its Message

uneven fulcrum
#

so how do i get that

quartz kindle
#

you dont

tulip ledge
#

that exists in discordjs

quartz kindle
#

whatever you're trying to use that message for, its wrong

#

dont use it

quartz kindle
#

try without an array

tulip ledge
#

yes

#

ok

proven lantern
#

i'm going to solve my balance teams problem today

quartz kindle
#

good luck

proven lantern
#

i have a plan

tulip ledge
#

yup without array it works

#

ty

quartz kindle
tulip ledge
#

how? I'm quite new to typescript

#

Do I do like:
let emojiId: bigint[] = [...][i];

quartz kindle
#

const array: string[] = ["89479282352", ...]

tulip ledge
#

oh ok

proven lantern
#

if you uninstall typescript you dont need to do that

tulip ledge
#

Type 'string' is not assignable to type '${bigint}'.ts(2322)

#
      let array: string[] = ["866763331075178526", "866763331129311303", "866763330860875817", "866763331225255946", "866763331326836756"]
      this.selectionMenus[j].options.push({
        label: creator.userName,
        value: i.toString(),
        default: false,
        emoji: {
          name: ["A", "B", "C", "D", "E"][i],
          id: array[i]
        },
        description: guide.name
      });
quartz kindle
#

or maybe this ```ts
const array: ${bigint}[] = ["89479282352", ...]

lyric mountain
#

what the

tulip ledge
#

solved it!

quartz kindle
#

👍

tulip ledge
#

templates are amazing

uneven fulcrum
lyric mountain
#

what's wrong with ts typing?

#

like bruh

proven lantern
#

the typing part

lyric mountain
#

I mean, int number = 12 or bigint[] arr = [...] would do

#

like wtf they did with that syntax

quartz kindle
#

you mean the ${bigint} part?

lyric mountain
#

that too

#

I mean the way you type it
let/const name: type = value

cinder patio
#

That's how discord.js types the ID lmao

#

a bigint in a string

#

stoopid

lyric mountain
#

...I'm talking about ts not djs

cinder patio
#

I mean it's stoopid

#

yes

quartz kindle
proven lantern
#

: type

quartz kindle
#

i mean they could, but then it would be weird for js users

proven lantern
#

that part sucks

#

i know what type 12 is

cinder patio
#

that part can be omitted 99% of the time

#

you can do

#

const a = value as type

lyric mountain
#

I keep my groovy

uneven fulcrum
#

Why no work ```
const usersend = vote.user

usersend.send('Thanks for voting! You recieved 75k bobux')

0|index  | TypeError: usersend.send is not a function
cinder patio
#

usersend is an ID not a user objecr

uneven fulcrum
#

ye im tryna send to id

lyric mountain
#

optionally typed, can be mixed with java and has a shitton of QoL stuff

cinder patio
#

you need to fetch the user object

uneven fulcrum
lyric mountain
#

like ```groovy
5.times { i -> print(i) }

proven lantern
cinder patio
#

tf

uneven fulcrum
lyric mountain
#

or ```groovy
var dog

dog.with {
name = "rex"
age = 10
race = "shiba"
}

cinder patio
#

client.users.fetch(...)

quartz kindle
cinder patio
#

oh they are

#

or you can make the HTTP request yourself

quartz kindle
#

or this ^ yes

cinder patio
#

You only need a user ID

quartz kindle
#

you can also create a non-logged in client and give it a token

lyric mountain
#

raw objects are fine for example

#

and best thing is that it can work seamlessly with java

#

so you can basically switch from java to groovy and keep all your code intact

quartz kindle
#
const client = new Discord.Client();
client.token = "your token here";

something.on("somethingElse", async data => {
  const user = await client.users.fetch(data.id);
  await user.send("bla");
})
cinder patio
#

smort

proven lantern
#

java goes in the garbage can

lyric mountain
proven lantern
#

they are trying to be a better functional programming language, but it has too much baggage

cinder patio
#

Imagine hating on a programming language

lyric mountain
#

java trying to be a func lang? wtf

#

oh, it's you the func dude

proven lantern
#

streams

lyric mountain
#

streams?

#

you mean ```java
<arr>.stream().map(o -> /*bla bla */)

proven lantern
#

map, filter sorted

#

yeah

lyric mountain
#

what's the issue with it?

proven lantern
#

it's good, but their versions of those methods are the worst i've seen in any language

lyric mountain
#

like?

proven lantern
#

reduce

lyric mountain
#

give an example

proven lantern
#

reducing something from one type to another

lyric mountain
#
var arr = List.of(1, 2, 3, 4);

arr.stream().map(n -> "value is " + n).forEach(System.out::println);
#

number became a string

proven lantern
#

why do you have to call stream()?

#

arr.map?

#

anyone?

#

java people

lyric mountain
#

because you can use the Stream<> instance elsewhere

#

also that's not really an issue

#

also, can you javascript people do arr.parallelStream()?

proven lantern
#

this syntax is silly too System.out::println

lyric mountain
#

that's a method reference

proven lantern
#

curry

lyric mountain
#

I could do .forEach(s -> System.out.println(s))

cinder patio
#

In rust you have to call .iter() in order to be using those so there's that

proven lantern
#

currying in js is so much better

cinder patio
#

you're comparing apples to oranges

proven lantern
#

apples to garbage

#

yes

lyric mountain
#

bruh, like, give me an example of why java is garbage?

proven lantern
#

public static void main(String[] args) { }

latent heron
lyric mountain
#

that's like, just an entry point

latent heron
#

it's a constructor

lyric mountain
#

no it's not

latent heron
#

yes it is?

lyric mountain
#

public ClassName() {}

#

this is a constructor

#

main is a method

latent heron
#

that's just instantiating the class

proven lantern
#

it forces you to use a class

lyric mountain
#

no, that's a constructor

latent heron
#

the method itself is a constructor

proven lantern
#
    public static void main(String args[]) { }
}```
lyric mountain
#

bruh

latent heron
#

main is specifically a method meant for constructing the class

#

class just instantiates it

lyric mountain
#

no, it isn't

latent heron
#

yes it is??

proven lantern
#

then it just runs that stuff

#

and it injects beans that do hidden stuff

#

makes it all hidden an tricky

lyric mountain
#
class Whatever {
  public static void main(String args[]) { }
}

will also work

#

why? because it ain't a constructor

proven lantern
#

c style

latent heron
#

okay

#

so will your class work without main()?

lyric mountain
#

yes

#

constructors by definition cant be named differently from the class and cant have a return value

latent heron
#

and if the class also works with main(), it passes the class parameters, correct?

lyric mountain
#

also cant be static

latent heron
#

which would therefore

#

make it a constructor

proven lantern
#

i just want to make a function pls java

lyric mountain
#

it doesn't

latent heron
#

yes it does

lyric mountain
#

main pass jvm args

#

not class args

latent heron
#

this is as counterintuitive as saying this

class Test
{
  public function Test Test() { }
}
lyric mountain
#

err...no

latent heron
#

exactly

#

that would make no sense

#

because it would not work

lyric mountain
#

main is just an entry point, it can literally be anywhere

#

all it'll do is tell your program to start from there

latent heron
#

yes but it helps construct the class itself

#

even if it passes JVM arguments

lyric mountain
#

no it doesn't

latent heron
#

oh my yes it does lol

lyric mountain
#

it builds literally nothing

latent heron
#

constructing and building are distinctively two different things

#

building means that something at runtime would be assembled

#

that's not happening here

lyric mountain
#

for this context, consider both to be the same

latent heron
#

but that's not what their meanings are

lyric mountain
#

bruh

latent heron
#

that's exactly the opposite

lyric mountain
#

will you really play "mr. politically correct" role?

#
class Main {
  public static void main(String[] args) {
    //do stuff
  }

  public Main(String a, int b) {
    //run during object creation
  }
}
#

if I do Main m = new Main(new String[]{"a", "b", "c"}) it won't work

#

I need to do Main m = new Main("a", 12)

#

because the latter is a constructor, the former has literally nothing to do with Main aside from being able to be called with Main.main

proven lantern
#

why even attach static functions to instance level functions in the first place java?

lyric mountain
#

it doesn't

proven lantern
#

in the same scope

lyric mountain
#

oh my

#

sure, you can just call main() INSIDE Main class

proven lantern
#

now if you have instance variables the static functions dont have access

cinder patio
#

I feel like you're arguing for the sake of arguing

lyric mountain
#

no one calls static functions from an instance

proven lantern
#

but it looks like it should since it's in the scope

cinder patio
#

what is your goal here

proven lantern
lyric mountain
#

no?

#

Class.methodName

#

static access

#

not ```java
Class c = new Class();
c.methodName;

proven lantern
#

public static String getString()

#

that type of static function

lyric mountain
#

you don't need to call from an instance

#

actually, all IDEs will tell you not to

proven lantern
#

public static String transform(String input)

#

that function could be used in an instance function

lyric mountain
#

couldn't

#

because static functions can't modify instances directly

#

unless you also pass the instance as an argument

proven lantern
#

the instance would be accessing the static function

#

the instance function could use the static function

lyric mountain
#

no it cant

#

it wont even compile

proven lantern
#

hmmm

lyric mountain
#

static functions cant access non-static variables

proven lantern
#

true

#

but when the instance function uses the static function it can pass in parameters to the function

lyric mountain
#

Main.someMethod(blabla) is the same as m.someMethod(blabla)

#

considering someMethod is static

#

neither will be able to access non-static variables

#

it's just that all IDEs will tell you to switch to class access instead of instance access

proven lantern
lyric mountain
#

you cant reference this inside a static function

#

because this doesn't exist at that scope

proven lantern
#

so you definitely cant invoke a instance function from a static function

quartz kindle
#

statics are just a prop/method on the class itself, like if the class was an object

proven lantern
#

how it should be

#

hi

lyric mountain
# proven lantern how it should be
class SomeClass {
  String name;

  public SomeClass(String name) {
    this.name = name;
  }

  public static String getName(SomeClass some) {
    return some.getName();
  }
}

...
SomeClass sc = new SomeClass("dog");
SomeClass.getName(sc);
#

something like this ig?

#

although it doesn't really make any sense to use static functions to retrieve attributes from an object

#

help with?

quiet pawn
#

wdym a discord thing

lyric mountain
#

if you run it'll return u the value

#

it's just that...unnecessary verbosity

proven lantern
lyric mountain
#

yes

#

but you can declare variables to be static too

#

in that case you can access from the same scope without any reference

proven lantern
#

but not the other way

#

static cant access the instance level functions/variables

lyric mountain
#

yes, not really an issue considering static stuff are global

proven lantern
#

it needs to be passed in

#

java is just a mess

lyric mountain
#

again, example?

#

static isnt a mess, it's just local VS global stuff

proven lantern
#

yeah, the classes are the problem

lyric mountain
#

how?

#

they're just object structure declaration

proven lantern
#

it forces you to use them

lyric mountain
#

you can code entirely without a single class definition

#

just use Object

proven lantern
#

nope

#

you need a main class

#

to contain the psvm

lyric mountain
#

well, the program does need to start somewhere

proven lantern
#

yeah, in a class apparently

#

thanks java

lyric mountain
#

...

#

you're just finding hair in eggs

proven lantern
#

i have seen better languages

#

for sure

lyric mountain
#

like?

proven lantern
#

every other language

lyric mountain
#

like?

#

"every" is too broad

proven lantern
#

js, scala kotlin

lyric mountain
#

kotlin is java

proven lantern
#

go

lyric mountain
#

and good luck going parallel in js

proven lantern
#

scala runs on jvm too

#

good luck getting your java applet web site going

lyric mountain
#

...I can in a few minutes with springboot

proven lantern
#

dont get me started on spring

#

i wasn't going to bring up spring because i didn't think that was fair

wooden kindle
#

Hey! I’m still kinda new to per server commands. I’m trying to set it up does anyone know Any YouTube vids or GitHub repos that show them.

lyric mountain
#

I feel you're just ranting about not being as lenient as js

crimson vapor
#

What’s the issue with forcing classes? If you don’t like classes don’t use Java

proven lantern
lyric mountain
#

bruh, you're comparing potatos to strawberries

lyric mountain
#

both js and java have different targets

cinder patio
crimson vapor
#

probably

#

don’t use a language if you don’t like it
You don’t need to talk shit about it tho

proven lantern
#

dont feel bad for a programming language

#

some just dont make the cut

crimson vapor
cinder patio
#

Languages are just tools and I'm tired of hearing people constantly hate on every language.

crimson vapor
#

billions of devices run Java and it “doesn’t make the cut”

cinder patio
#

If you don't like it just use one you like god damn it

crimson vapor
#

ok bro

#

You keep thinking that

proven lantern
#

i have to use it at work

#

i am a java pro so its oky

lyric mountain
#

oh, sure

cinder patio
#

So that's why you hate it?

proven lantern
#

pretty much

crimson vapor
#

In my experience anyone who calls themselves a pro at something is pretty bad

proven lantern
#

not the case here

lyric mountain
#

sure, declare a java record then

#

no googling

crimson vapor
#

I’m not a Java dev so I can’t judge your code ¯_(ツ)_/¯

proven lantern
#

not sure what you are asking

lyric mountain
#

I'm asking you to write how a record is declared

proven lantern
#

class Record(){}

lyric mountain
#

haha no, you see, that's a thing introduced in newer java versions

proven lantern
#

a record class declared

#

we use java 8

#

i hate it so much

lyric mountain
#
public record Person(String name, int age) {}
#

java 8 is totally outdated

proven lantern
#

upgrading to java 11 and breaking everything these people wrote

lyric mountain
#

if you consider yourself a pro with it you know like 6% of how java works

crimson vapor
#

Isn’t Java 16 released?

lyric mountain
#

also java is 16 currently

#

ye

crimson vapor
#

I too like using legacy software

lyric mountain
#

it's when records were introduced

proven lantern
#

at least it has streams

lyric mountain
#

you should really try newer versions, I'm sure your rant will be calmed

#

java 8 is the worst possible way to introduce someone to java

#

it's like going to a date without pants and screaming at everyone that looks at you

#

java 10+ is the chad that buys flowers and chocolate for dates

proven lantern
#

i dont want to learn about all the good things i cant have

#

that will make me sad

lyric mountain
#

tbf, there's little to no breaking changes introduced from jdk 8 to jdk 10

#

I mean, surely many methods will be flagged as deprecate

#

I know because I try to keep my bot updated with the latest java

#

went from 8 to 10, then to 11, then to 15 until I finally settled (for now) at 16

#

I must say I can't really go back to 8

#

jdk 11 introduced var

proven lantern
#

are odd number versions not lts?

lyric mountain
#

since I update frequently that's not an issue for me

#

but yeah, companies should target for even versions

proven lantern
#

lol

#

they are going to 11

#

and they are a big company

#

they changed their license didn't they

lyric mountain
#

oh, nvm, java doesn't follow a rule

lyric mountain
proven lantern
#

good old java

proven lantern
lyric mountain
#

yes, even 8 has

#

so better not update it

#

there is, however, openjdk

proven lantern
#

yeah, they are going to openjdk 11

lyric mountain
#

no problem then

proven lantern
#

im guessing that is causing most the problems

#

it's using more resources

lyric mountain
#

there are 3 major JDKs: oracle, hotspot and openj9

#

oracle is the paid shit

#

hotspot is openjdk's

#

and openj9 is eclipse's (ibm)

#

imo openj9 is the most optimized for long running tasks, it does seem to use a lot less memory

proven lantern
#

amazon has a version too

#

Amazon Corretto

lyric mountain
#

never heard of someone using it

proven lantern
#

Amazon uses it

lyric mountain
proven lantern
#

oh, it's just a distro of OpenJDK

lyric mountain
#

man you'd be so amazed with the new versions

#

couple that with groovy and you have all the stuff you could ask for in a lang

#

but that jump your company will do from jdk 8 to 11 will already lighten a lot java programming

#

first one that comes to mind is varargs

#

public void someFunction(String... arguments)

proven lantern
#

that will be nice

lyric mountain
#

if you ever get to jdk 15, you'll get multiline strings

#
String str = """
             this is
             a string
             """;
#

and var, obviously

proven lantern
#

pls give var now

lyric mountain
#

oh wait, I was wrong

#

var is jdk 10

proven lantern
#

nice

lyric mountain
#

jdk 15 has enhanced switches ```java
int n = 1;
String str;
switch (n) {
case 0:
str = "A";
break;
case 1:
str = "B";
break;
} // NO, fuck that

str = switch (n) {
case 0 -> "A";
case 1 -> "B";
} // sweet

tame kestrel
#

the new one kinda groovy 🥴

lyric mountain
#

ye

#

ig they implemented for groovy parity

vivid fulcrum
#

c# for poor people

warm wadi
vivid fulcrum
#

what

#

no

#

lol

warm wadi
#

ok

vivid fulcrum
#

i was just making a joke

warm wadi
#

i thought you needed help

quartz kindle
#

cry is the one who helps people with c#

#

he needs no help

vivid fulcrum
#

well, i probably need the mental kind

quartz kindle
#

xD

boreal iron
#

It’s a raff day in development okeh

eternal osprey
#

hey

#

how do i export a variable that was used in a command in py to eventually use in another command

gusty bone
#

just curious to heroku users in chat (that use topgg api meaning you are confined to using web module) do you use kaffiene?

gusty bone
#

Would a moderation bot need this?

halcyon spire
quartz kindle
#

depends what kind of moderation

halcyon spire
#

It would need it for like

ctx.guild.owner
halcyon spire
quartz kindle
#

you dont need it for that

halcyon spire
gusty bone
#

owner doesn't need member intents but ill enable it in case i need it sometime later

halcyon spire
#

okie

regal plover
#

@frozen mesa are you doing slash commands ?

frozen mesa
#

making bots isnt fun for me anymore

regal plover
#

but an api for what ?

frozen mesa
#

endpoints, fun, other bot could use

halcyon spire
regal plover
#

that sounds cool

regal plover
halcyon spire
#

Bot dev isnt that fun i started web dev for my bot

gusty bone
#

actually i might add dropdowns because that apparently exists

#

also does a bot need to be verified

halcyon spire
gusty bone
#

to have slash comms

halcyon spire
#

nope

gusty bone
#

aight

halcyon spire
#

just on your outh2 do commands.applications check mark

frozen mesa
#

its just bs that you need to be actually verified

gusty bone
frozen mesa
#

oh no u dont need to

gusty bone
#

they should bump it up to 500 max servers of 1000

#

if unverified

halcyon spire
#

Applications.commands for it

gusty bone
halcyon spire
#

ye

gusty bone
#

but how would i do it in discordjs

halcyon spire
#

Just the slash api is currently very slow

halcyon spire
gusty bone
#

ok

frozen mesa
#

some packages have slash commands

halcyon spire
# gusty bone ok

Wait i was thinking of rewriting my bot in js is it easy to do?

gusty bone
#

but to me it's kinda easy

#

just some more sophisticated things are harder

halcyon spire
gusty bone
#

Then I'd say try to rewrite, but do a LOT of beta testing to make sure that your bot cant crash if someone uses a command incorrectly

#

Because crashes are annoying

#

Then put it on your main bot

pale vessel
#

No one will ever bother DMing you; just ask your question here

frozen mesa
#

whats the issue tho lol

regal plover
#

i have a question

#

what database do you use for your bots ?

#

i'm currently trying in json but it's a little unstable

crimson vapor
#

you shouldn't really use json as a database

#

its fine for constant stuffs but anything that changes

#

I personally use mongodb but lots of people here like postgres

regal plover
#

i know but i wanted to try and everyone was right about it

regal plover
crimson vapor
#

uh

#

you didn't show the important part of the error

quartz kindle
#

your database is corrupted

#

delete it and start over

#

fork what?

#

wut

#

lol

#

im not telling you to start over your entire code

#

im telling you to delete the database file

#

and start over in the sense that all your database memory will be lost

#

which database are you using?

#

quick.db?

#

thats the database file

#

delete it

#

a new empty file will be created

errant flax
#

also wdym by "the database wouldn't even notice it"

wheat mesa
#

performance-wise

errant flax
#

also whats a cron library???

sudden geyser
#

A library that allows you to execute something on a certain schedule.

#

For example, doing something every 30 seconds

#

A setInterval is suitable for most users

errant flax
wheat mesa
#

He’s saying that the db is very fast, so an operation every second or so won’t be a problem for it at all

errant flax
#

oh but ill prolly cache the data just in case hmm

#

also whats the best way to like generate a unique id in mongodb/js

sudden geyser
#

Doesn't Mongo automatically generate one for you

errant flax
#

it does plump_isee

#

oh like i want to shorten it for uhh much more readable akkoshrug

pale vessel
#

You can

errant flax
#

how

pale vessel
#

I use guild IDs instead

#

Just add _id

#

It'll overwrite it

#

As long as it's unique it won't complain

errant flax
#

i mean discord provides the id m_keklaugh

regal jacinth
#
async def taskGenerator(task):
    autoActions = AUTOACTIONS()
    print("Waiting till ready....")
    await client.wait_until_ready()
    print("Finished!")```
`Finished` is never printed so i really don't know what to do
split hazel
regal jacinth
#

yeah

#

then it stops there

#

i watched it for like 15m

split hazel
#

maybe it's some bug with whatever library you're using

#

do you use intents

regal jacinth
#

yeah

regal jacinth
split hazel
regal jacinth
#

yeah

split hazel
#

actually those shouldn't be an issue

#

your bot and events are working right?

regal jacinth
#

yeah

#

might it be cause there are other tasks running in the background?

hallow shell
#

hey what's that api thing that facebook uses called, looks like this i think

name {
  requestA
  somethingElse
}
#

pretty sure it's an alternative to json

pale vessel
#

GraphQL?

#

Looks like a GraphQL query

hallow shell
#

yeah that's it

#

thanks

regal jacinth
#
async def taskGenerator(task):
    autoActions = AUTOACTIONS()
    print("Waiting till ready....")
    await client.wait_until_ready()

    print("Finished!")``` `Finsihed` is never printed
#

any help?

flat copper
#

Why this error

austere zealot
#

ok i have this command where ppl can buy pokemon items and when they dont have enough money it sends thats they dont have enough money to buy it, but after that, when i check how much money i have it converts to negative, anyone know why?
https://paste.pythondiscord.com/aquxoxoxol.php

twilit geode
#

bots cannot use other bots slash commands right

pale vessel
#

No, haha

twilit geode
#

ok

#

just checking before I royally screw up this command handler

lyric mountain
#

Most bots ignore other bots exist anyway

twilit geode
#

ik ik; but this is not just for my bot; its an open source command handler and I dont want someones bot to kill itself

#

just thinking ahead

inner stump
#

hello, i am making a discord bot in visual studio code. i am learning how to make one, using tutorials online

sly sierra
zenith terrace
#

technically it is

zenith terrace
sly sierra
sly sierra
#

Fair enough

inner stump
#

im using a guide

zenith terrace
inner stump
zenith terrace
# inner stump do you want me to remove the "else if" basically?

you have a client.on inside of a client.on, you only need one

client.on('message', message => {
    if (message.content.startsWith(`${prefix}ping`)) {
        message.channel.send('Pong.');
    } else if (message.content.startsWith(`${prefix}beep`)) {
        message.channel.send('Boop.');
    }
});```
inner stump
#

so basically this

#

````a```

zenith terrace
#

read what I said

inner stump
#

ok there
im pretty sure thats clearly what you said right

zenith terrace
#

im gonna show you one more time

#

the correct way to have it

#
client.on('message', message => {
    if (message.content.startsWith(`${prefix}ping`)) {
        message.channel.send('Pong.');
    } else if (message.content.startsWith(`${prefix}beep`)) {
        message.channel.send('Boop.');
    }
});```
inner stump
#

ok there. i copy and pasted your code, because im pretty stupid to find and fix the problems
yeah, i definitely got one or more of it, wrong

zenith terrace
#

?

errant flax
#

basically dont do nested events pd_pepethumbsup

#

what i mean is dont listen and event inside of another event

errant flax
#

how do i get the updated data from

#
<Schema>.findOneAndUpdate()

?

lament rock
#

by referencing the data you input to it and if required, assign it to the old state Derp_Papi

earnest phoenix
#

any one tell how install all package .json file in one time

#

in termianl

crimson vapor
#

npm i

earnest phoenix
crimson vapor
#

did you spell it correctly when you installed it?

earnest phoenix
crimson vapor
#

you spelled it wrong jsut now

#

discord.js

earnest phoenix
#

bro

#

i setup vps

#

here say disocrd.js cant find

#

when i do node index.js

runic depot
#

just send the log

earnest phoenix
runic depot
#

in pic

earnest phoenix
#

@runic depot

runic depot
#

npm i discord.js

#

? :)

earnest phoenix
#

still

runic depot
#

so if there's any error, send the log

#

and u can use win + shift + s

earnest phoenix
#

my money waste

#

f

copper cradle
#

You fucking spelled it wrong

#

Do npm remove disocrd.js && npm i discord.js

#

How blind u gotta be

wheat mesa
#

Your money isn’t wasted, you just aren’t putting in the minimal effort required to debug simple issues.

runic depot
#

and 90% of people who start coding with discord bots, they don't know anything from nodejs or even python

#

even they don't google it for solution and crash courses

wheat mesa
#

I think one of the MOST important skills is knowing how to read error messages properly

#

Knowing what the error is and where it’s coming from is the fundamental basis of solving that error

runic depot
wheat mesa
#

And it seems like a lot of people lack in such a skill

runic depot
wheat mesa
#

Exactly

#

I can understand if you have tried to solve an error and/or you’re confused because the error is vague/uncommon, but not even trying to solve it and asking someone else for help isn’t going to get you very far.

#

I’m guilty of doing that before, but I’ve learned from those experiences and now apply those skills whenever I get an error in my code.

runic depot
#

they must do exercises for achieving debugging skill

#

like

*
**
***
****```
#

these exercises are very helpful

#

this website can help u

gusty bone
runic depot
gusty bone
#

then after when i started this bot that im actively working on (s-nexbot) i started to learn more things

runic depot
gusty bone
runic depot
#

that's good

gusty bone
#

ok

#

thanks ig