#development

1 messages · Page 1780 of 1

solemn latch
#

our rule is specifically about making features not work unless it requires admin(which is never required)

earnest phoenix
#
let money = db.all()
      .filter(e => e.ID.startsWith(`balance_${message.guild.id}`, { sort: '.data'}))
      let content = "";
  
      for (let i = 0; i < money.length; i++) {
          let user = client.users.cache.get(money[i].ID.split('_')[2]).username
  
        
  
          content += `${i+1}. ${user} ~ ${money[i].data}\n`
      
        }
  
      const embed = new Discord.MessageEmbed()
      .setDescription(`**${message.guild.name}'s Coin Leaderboard**\n\n${content}`)
      .setColor("#FFFFFF")
      message.channel.send(embed)```
I wish it sorted by highest money

(**nobody respond on quick db server**)
solemn latch
#

👀 does quickdb even support sorting?

safe gyro
#

You mean i can Set admin?

solemn latch
#

in the invite link sure.

safe gyro
#

Ok

solemn latch
#

just dont require it for commands to function

safe gyro
#

I check in the setup command the Server owner

solemn latch
#

you dont need any perms to do that

safe gyro
#

Ok ok thnaks mate

rocky hearth
#

y an empty array is truthy, in js

near stratus
rocky hearth
#

i did, Boolean([]) and !![], and it gives true

near stratus
rocky hearth
#

ooh sorry, I meant double !

#

iirc, [] internally converts to a string of "0" so this is truthy

near stratus
#

wait a minute
it is true

#

My life was a mistake

rocky hearth
near stratus
prisma lion
#

yeah ty

#

forgot about that :D

static matrix
#

Do you guys know an API list that contains the most of WebAPI's?

near stratus
#

you mean

#

public-apis

#

there's a GitHub repo with the same name

static matrix
woeful pike
lofty cedar
#
    check_user = storage.execute("SELECT * FROM users WHERE tag=ctx.message.author")
    if check_user:
        await ctx.send("HERE IS YOUR LIFE:")

Is this correct?

prisma lion
#

can someone tell me is there like a module or smth to make the bot not get triggered to replies

slender thistle
#

Hi I come to this store to buy ctx.message.author

prisma lion
#

.py*

slender thistle
#

wdym you don't have that in your store

slender thistle
#

rtd

prisma lion
#

ty

slender thistle
#

Check if there's a referenced message and if yes, ignore it

prisma lion
slender thistle
#

Not as a variable

#

You need to use prepared statements for this

prisma lion
#

like the f?

slender thistle
#

F-strings are a hard no

prisma lion
#

.format?

#

%? xd

slender thistle
#

Prepared statements

prisma lion
#

ye

slender thistle
#

Do you know what that is

prisma lion
#

object?

#

for mysql

#

like it adds a cursor

#

i dont really work with dbs much xd

slender thistle
#

Google is your friend

cinder patio
#

I'm not

lofty cedar
#
        await button.send(
            content="THIS IS YOUR LIFE:",
            channel = ctx.channel.id,
            components = [
                ActionRow([
                    Button(
                        label="test",
                        style = ButtonType().Primary,
                        custom_id = "test"
                    )
                ])
            ]
        )
        #Da finire
    #else:
        #Da finire
        #print(",")
@button.click
async def test(ctx):
    await ctx.reply(content="ciao")

How to edit the msg after a btn press? (ctx.edit says: 'InteractionContext' object has no attribute 'edit')

rocky hearth
#

u need to listen, to interaction event on client

lofty cedar
#

wdym

earnest phoenix
#

you are trying to assign a new value to a var defined with const

#

it would be let p =""

lofty cedar
#

How to edit the msg after a btn press? (ctx.edit says: 'InteractionContext' object has no attribute 'edit') (discord.py)

earnest phoenix
#

and not const p = "" since you can't assign new value

eternal osprey
vivid fulcrum
#

it isnt

solemn latch
#

looks like console

eternal osprey
#

hmm what type of console

quartz kindle
#

wdym what type

vivid fulcrum
#

it's the node REPL

eternal osprey
#

oowh okay, thanks!

quartz kindle
#

you mean the colors? or what?

eternal osprey
#

no i meant how he could log all those info's etc

#

have seen that around here for quite some time now

quartz kindle
#

thats just interactive node

#

you just type node on any console/terminal

#

and it will enter the repl/interactive mode

lofty cedar
#

How to edit the msg after a btn press? (ctx.edit says: 'InteractionContext' object has no attribute 'edit') (python)

quartz kindle
#

check the docs

earnest phoenix
#

.addField("Version", `${config.version}`, true)
What's wrong with this code?

pale vessel
#

What's wrong?

earnest phoenix
cinder patio
#

it says it right there man

earnest phoenix
#

Read the error dude

opal plank
#

fucking finally found it, page 38

copper cradle
#

empty strings are false

copper cradle
#

next time provide the actual error

#

we're not fucking wizards to magically guess what's wrong with your 'code'

exotic flower
#

lol

lofty cedar
#

I would make that te bot sends a message like: your job: job your money: money and all but i have to check the values from a database so how i can do like cur.execute and fetchall for 3 different keys and still using 1 message
(python)

vivid fulcrum
#

collect all the data first, then send the message lol?

lofty cedar
#

yes i mean like i do fetchall and then how to get the actual data

vivid fulcrum
#

😕 ??

lofty cedar
#
    data=storage.fetchall()```
ok then how i get the value for the key job for example
pale vessel
#

tag is ID?

lofty cedar
#

yes actualy thought to do another way at the start but changed my minds

proven lantern
#

anyone here a pro at dynamodb? i have a table with records that look like this. is it possible to setup an index that would let me query(not scan) this so that it returns all the records with results[].playerIds[].contains("SOME_PLAYER_ID") sorted by the recordedAt timestamp?

lofty cedar
#

AttributeError: 'sqlite3.Connection' object has no attribute 'fetchall'
How is that possible?

proven lantern
lofty cedar
#

storage = sqlite3.connect("/LifeSimulator/storage.db")
result = storage.fetchall()

proven lantern
#

what about this

result = storage.fetchall()```
#

adding the .cursor()

#

the /LifeSimulator/storage.db path might be wrong. are you on unix type system? mac linux?

lofty cedar
#

I’m on Ubuntu

proven lantern
#

is there a folder in the root called /LifeSimulator/

lofty cedar
lofty cedar
#

storage.execute("INSERT INTO users (tag, job, money) VALUES (?, no_one, ?)", (ctx.author.id, 0))

Command raised an exception: OperationalError: no such column: no_one
What should I do here?

proven lantern
#

does the users table have a column called no_one?

#

might need to alter the table

regal cradle
#

how do i make my bot put custom emojis on suggestion?

lofty cedar
ocean imp
summer torrent
#

elaborate please

#

what do you mean by put

ocean imp
#

dogkek <= the original emoji

#

then you will get this

#

and use that instead of the normal emoji

#

this is for all emojis

proven lantern
#

\"no_one\"

#

'no_one'

lofty cedar
#

Yes it works now but now it says that the storage var we set before has no attribute commit

proven lantern
#
cursor = storage.cursor()
result = cursor.fetchall()```
regal cradle
#

@ocean imp this?

proven lantern
#

update that

regal cradle
#

thats how emoji is caled

ocean imp
#

this one

#

\

lofty cedar
regal cradle
ocean imp
#

hit enter

#

and use what is sends use instead of the emoji name

regal cradle
#

yea an it just sends the emoji

ocean imp
#

do the \ etc

#

dont hit enter

#

copy and paste it

lofty cedar
#

It works, ty

proven lantern
#

nm, that might be handled automatically. idk

lofty cedar
#

I’m probably stupid or something but I think I didn’t do the right thing:

for i in cursor.fetchall():
await button.send(
content=f"THIS IS YOUR LIFE:\nmoney: {i[2]}\njob: {i[1]}",
channel = ctx.channel.id,
components = [
ActionRow([
Button(
label="test",
style = ButtonType().Primary,
custom_id = "test"
)
])
]
)
It doesn’t send the message

proven lantern
#

what is button?

lofty cedar
#

From discord_buttons_plugin

proven lantern
#

button.send that button

lofty cedar
#

It actually works anyway, trued it before

#

Yes

silk tree
#

t and d

proven lantern
#

it should be the message object not a button object

#

message.send

#

not button.send

silk tree
#

truth or datre

lofty cedar
#

I got it from a tutorial and it works

proven lantern
#

is there some code that does button = something...

#

is that passed into the message handler?

lofty cedar
#

Wdym

proven lantern
#

where is button defined?

lofty cedar
#

Is a global var

#

button = ButtonsClient(client)

proven lantern
#

is your code in a message handler? is it responding to a command?

lofty cedar
#

Is on @ client.command()

proven lantern
#

what library is that from?

lofty cedar
proven lantern
#

class MyClient(discord.Client):
    async def on_message(self, message):
        if message.author == self.user:
            return

        if message.content.startswith('$hello'):
            await message.channel.send('Hello World!')```
#

do you have that message object?

lofty cedar
#

No

proven lantern
#

what about a TextChannel or DMChannel object?

lofty cedar
#

from discord.ext import commands

#

What?

proven lantern
#

those object have a send method that you can use to send messages to

lofty cedar
#

I use like ctx.send

proven lantern
#

is there any api docs about it?

lofty cedar
#

Oh button is from discord_buttons_plugin lib

proven lantern
#

const buttonClient = new discordButtons(client)

lofty cedar
#

And I tried it before and worked but I think the problem is the for cycle or something other

proven lantern
#

do you have a buttonClient object

#

or did you call it button?

lofty cedar
#

button = ButtonsClient(client)

proven lantern
#

did you reassign button anywhere?

#

on accident

lofty cedar
#

No

proven lantern
#

is the embed field missing?

lofty cedar
#

there isn't embed in that msg

proven lantern
#

is there any error thrown?

lofty cedar
#

no

proven lantern
#

content=f"THIS IS YOUR LIFE:\nmoney: {i[2]}\njob: {i[1]}"
does it work if this is changed to a static string?

#

content="test"

lofty cedar
#

yes

proven lantern
#

assign f"THIS IS YOUR LIFE:\nmoney: {i[2]}\njob: {i[1]}" to a variable first

#

then put it in content=myVar

lofty cedar
#

it works

proven lantern
#

nice

lofty cedar
#

oh no wait

#

it doesn;t work

proven lantern
#

are your tabs lined up

#

python tabs

lofty cedar
#

yes

sudden geyser
#

It's standard.

proven lantern
#

the auctions for the music tag go for like 5k a month here

vivid fulcrum
#

it's generic

#

and also not worth it

#

there's no point in developing music bots anymore

lyric mountain
#

sound image thumbnail is a VERY dangerous thing to show that open

vivid fulcrum
#

you cannot rival with big players like rythm and groovy, people will always prefer those two (and other popular ones)

#

plus you need a big budget

#

to bypass ip bans

proven lantern
solemn latch
#

wth, a dev?

earnest phoenix
#

hey can someone help me? I am really confused on why this doesn't work.

    if(message.content.startsWith(`${prefix}tip`)) {
        const args = message.content.substring(prefix.length).split(" ");
        const tip = args[1]

        if(tip === 1) {
            const embed = new Discord.MessageEmbed()
            .setTitle("We have assignable roles!")
            .setDescription("Check out [#813553616530571313](/guild/264445053596991498/channel/813553616530571313/) :D")
            .setColor(color)
            message.channel.send(embed)
            return
        }

    }
sudden geyser
#

What doesn't work about it?

earnest phoenix
#

it jhust doesn't send it

proven lantern
#

tip === 1

sudden geyser
#

Tip is probably a string

proven lantern
#

i bet it's a

#

string

earnest phoenix
#

lemme try

#

oh yeah

#

thanks

visual goblet
#

whats the python buttons module?

proven lantern
#

might be per hour

#

$199.44 a month for the cheapest

solemn latch
#

yeah, this looks like its for quite large applications for handing 100k+ users.

#

100k+ users frequently accessing data*

proven lantern
#

they need smaller instance types

solemn latch
#

they do have smaller stuff, just not in documentdb.

proven lantern
#

yeah, for docdb

#

i can just spin up an ec2 instance and install mongo

solemn latch
#

Amazon DocumentDB is designed for 99.99% availability and replicates six copies of your data across three AWS Availability Zones (AZs).
its just not really meant for projects like discord bots.

#

yeah

proven lantern
#

but i want managed

#

im lazy

solemn latch
#

a lot of these managed services do seem to have multiple copies in multiple locations, which dramatically increases price.

proven lantern
#

oh nice! i should be able to keep it under 5gb

#

oh wait. 512mb

#

the indexes grow super big

#

i need to figure out how to use dynamodb better

lyric mountain
#

cant u just self host your db?

#

why pay premium for something you can setup in a few minutes

proven lantern
#

im using dynamodb which is premium and free

#

but can't do what i want it to

#

but it probably can do it

sudden geyser
#

what do you want it to do

proven lantern
#

basically an index based off an array

lyric mountain
#

nice, lemme add yet another entry for "things easily solved in sql but overcomplicated in mongo"

proven lantern
#

mongo would make this easy

#

i am using dynamodb

lyric mountain
#

aint it the same as mongo?

proven lantern
#

documentdb is the same

lofty cedar
#

Incorrect number of bindings supplied. The current statement uses 1, and there are 18 supplied.
^ what does it mean?
cursor.execute("SELECT * FROM users WHERE tag = ?", (str(ctx.author.id)))

proven lantern
#

it is exploding the string

#

ids are ~18 characters

lofty cedar
#

Ok and?

proven lantern
#

dont explode it

lofty cedar
#

So what should I do?

lyric mountain
#

if you explode the string it'll become N different params

#

just pass the id as a whole

lofty cedar
#

Ok

lyric mountain
#

that IF that's an id field

#

tag is a weird name tbf

lofty cedar
#

Ik

vivid fulcrum
proven lantern
#

maybe my data should go in sql

vivid fulcrum
#

i mean probably

#

if this is for a discord bot

#

you're storing relational data, so might as well go for a relational (inherently sql) db

proven lantern
#

i have a few different databases that do different parts

#

storing the elo rankings needs more querying functions than dynamodb has

#

mongodb is too expensive

#

are there good managed sql hosts that are free?

#

nm, aws has a free tier for rds

lyric mountain
#

just install sql in ur vps bruh

#

the setup is insanely simple

#

or if u dont want to install anything just use sqlite

proven lantern
#

my vps has 512mb

lyric mountain
#

sqlite has 512 b

proven lantern
#

it has aws internet

lyric mountain
#

jokes aside, there's literally no db that can be as small as sqlite

#

not even txt files

proven lantern
#

i want lots of indexes on the data

lyric mountain
#

so?

proven lantern
#

like 5 different indexes

#

so data grow

lyric mountain
#

you call 5 a lot?

#

sql ain't like non-relational dbs

#

it loves indexes

#

it loves relationship between tables

proven lantern
#

wait

#

i dont have a disk connected to my vps

lyric mountain
#

make an in-memory sqlite file

proven lantern
#

i only have 512mb

proven lantern
#

node uses ~80mb

lyric mountain
#

you're underestimating how small it is

proven lantern
#

i will put lots of data in there

#

it's just going to grow forever

lyric mountain
#

unless you're making a world-grade business management enterprise-plus ultra database, you ain't gonna make it go big enough to become a trouble

proven lantern
#

amazon ranks the rds higher

#

my database is currently 34.99 KB

#

or that one table

#

only 125 items

lyric mountain
#

trust me

#

you're not going to be able to get sqlite to become "too big" for your space requirement

proven lantern
#

setting this up in rds will be complicated

#

i'd need to make foreign keys and tables

lyric mountain
#

there's a reason pretty much ALL softwares use sqlite as settings storage

proven lantern
#

i want to be able to sort by recordedAt and filter by gameId or guildId or results[].playerIds[]

#

the results[].playerIds[] part is the tricky part

obtuse stone
#

whats the reccomended bitrate for ytpl

lyric mountain
#

you're going to need two extra tables

#

one for results and one for playerIds

#

then just

...
INNER JOIN results r ON r.something = a.something
INNER JOIN playerIds p ON p.something = r.something
WHERE playerIds IN (your array)
ORDER BY a.recordedAt
#

or something like that

proven lantern
#

i going to move it to rds then.

#

rds pains

lyric mountain
#

just note that NOONE will be able to help you depending on how different rds is from postgresql/sqlite/mysql

proven lantern
#

looks like aws rds instances are ~$200 a month for the cheapest instance

#

i need to figure out how to use dynamodb better

#

cheapest rds

lyric mountain
#

oh my

#

I might be being too insistent, but why not just go with sqlite?

proven lantern
#

i want to keep the vps lightweight

#

and i need my website to have access to the db

#

so i'd have to setup firewall rules and secure the database

#

managed services are easier

#

found a cheaper version

#

but still not free

solemn latch
#

free databases are generally considered a really bad idea

proven lantern
#

Amazon DynamoDB is okay for most things

regal cradle
#

@ocean imp yo can i name a channel diffrent than 'SUGGESTIONS' so suggestion bot can work cause if i change the name my suggestion wont come out

#

@proven lantern

proven lantern
#

looks like nosql is the best type of database in the current year

proven lantern
# lyric mountain I might be being too insistent, but why not just go with sqlite?

explains why sql is no longer used
https://youtu.be/HaEPXoXVf2k?t=188

This session is for those who already have some familiarity with DynamoDB. The patterns and data models discussed in this session summarize a collection of implementations and best practices leveraged by Amazon.com to deliver highly scalable solutions for a wide variety of business problems. The session also covers strategies for global secondar...

▶ Play video
wanton pebble
#

yoo

#

i need help

drifting wedge
#

And it's free for the cloud version basic plan

lyric mountain
quiet pawn
lyric mountain
#

but still, you can just use sqlite without installing anything

proven lantern
#

my cpu is small

lyric mountain
#

for the 4182804712th time

proven lantern
#

sqlite with joins is going to be slow

lyric mountain
#

bruh

proven lantern
#

cpu

lyric mountain
#

not it's not

proven lantern
#

joins

lyric mountain
#

??

#

joins what?

#

sql was created to be used with table JOIN

#

it's literally one of its major selling points

wanton pebble
#

bro

#

How can i use my prefix function here

proven lantern
#

i guess i can make indexes to trade memory for cpu

lyric mountain
#

oh my, I give up

#

go on, pay premium for overpriced stuff

earnest phoenix
lyric mountain
earnest phoenix
#

NO AGGREGATIONS

wanton pebble
#

bro it keeps auto deleting

lyric mountain
#

yes, because you're sending stuff which contains links

wanton pebble
#

oh

lyric mountain
#

or tokens

zenith terrace
lyric mountain
#

idk if luca has a anti-token feature tbh

wanton pebble
zenith terrace
#

then remove it and send it here

clever agate
#

ops

#

channel confusion

#

I clicked on the wrong channel

#

sorry

wanton pebble
#
  description: "Help Command",
  execute(message, args, Discord) {
    const newEmbed = new Discord.MessageEmbed()
    .setColor('#A82A3C')
    .setTitle('Bot Help')
    .setURL('IVITE LINK')
    .setDescription('Help command for all areas of our bot, @Senpai Bot™#7127')
    .addFields(
      {name:'__(prefix)help setup__', value: 'To show all of our Bot Set Up Commands, and help for each one.'}, {name:'__*help fun__', value: 'Help for all of the fun commands.'}
    )
    .setFooter('yo');

    message.channel.send(newEmbed);
    
  }
}``` HOw can i make it have it use my prefix fuction instead of saying *help
#

there

lyric mountain
#

you need a database

proven lantern
lyric mountain
#

obv amazon will try to sell their fish

proven lantern
#

but it looks like rds is to save on storage

earnest phoenix
#

it's called promoting own content over others

proven lantern
#

and use more compute

wanton pebble
lyric mountain
#

bezos will never say another database is better if he has amazon's

earnest phoenix
#

I work w dynamodb and my company actually buys that shit aws sells them

#

and now I have to do tons of shit

#

to do queries

lyric mountain
earnest phoenix
#

because I'm forced to use dynamo

lyric mountain
#

you still need a database if you plan on making customizable prefixes

earnest phoenix
#

it's a fucking pain lol

proven lantern
#

bezos doesn't have the only nosql databases

#

i am having dynamodb pains too

earnest phoenix
#

I was asked to make an analytics dashboard and the data is to be fetched from dynamo

#

I want to kms

lyric mountain
#

in my experience, you'll probably never find a database as fast and small as sqlite

#

it's literally the Assembler-tier of databases

earnest phoenix
#

now let's not just

#

go for sqlite

#

I mean why not but yeah

#

there's better out there

lyric mountain
#

not if you're running on limited space

#

also for most stuff it's fine

proven lantern
#

i need to model the data differently

#

for it to work with dynamodb

earnest phoenix
#

I've to use various frameworks and some other things for it to work

#

while we could've just used redshift

#

hate when there's ppl w no knowledge on higher ends

proven lantern
#

redis cache is super expensive

#

wait redshift

#

is that redis

earnest phoenix
#

not for companies

#

redshift isn't redis

#

redshift is for big data

#

data warehouse

sudden geyser
#

I'm still looking for a good database based around immutability

random sedge
#

Maria db

vivid fulcrum
#

file coalition KEKW

prime mist
# sudden geyser I'm still looking for a *good* database based around immutability

Immutable databases don't really make sense. Immutability is more of a application concern.

But this is a good read: https://www.red-gate.com/simple-talk/opinion/opinion-pieces/ninja-immutable-databases/

'Immutable' databases operate under the principle that data or objects should not be modified after they are created. Once again they hold the promise of providing strong consistency combined with horizontal read scalability, and built-in caching. Are Immutable databases a new idea? Are they different in any way from the mainstream RDBMSs.

sudden geyser
# prime mist Immutable databases don't really make sense. Immutability is more of a applicati...

I read the article, and it is a good read. It's opened my third eye! I've experienced difficulty keeping the integrity of the data and table in tact while writing efficient queries to select data as appropriate. Operations like unique constraints, aggregations, etc. have become difficult or unavailable (for example, a username unique constraint is practically no good).

Does it make sense to have an engine for an immutable database? I think not. Developers are fully capable, with existing RDBMS, of implementing immutability of data in whatever tables justify it. They’ve been doing so for decades. As we’ve seen, MVCC resource burden in providing session level immutability hasn’t been eliminated by contemporary hardware, and current immutable databases have had to admit the impracticality of universal immutability of table data.

But all paradigms have their ups and downs, and immutability is a critical component to my project, so I'll just need to think harder

#

Have you tried using the embed builder (e.g. Discord.MessageEmbed or sending the JSON directly)? You're saying that need help embedding your message, so I assume the localization and sending of a message is working.

prime mist
sudden geyser
#

I know that part, but the immutability is used to create a historical model on something. For example, the changes to an article over the course of its lifetime (along with publication, deletions, etc.)

prime mist
#

Oh right, if you want to keep snapshots of an entities history then that's another thing entirely.

Immutability itself doesn't make any guarantees about the lifetime of data.

distant cobalt
#
const Discord = require('discord.js');

module.exports = {
    name:"kick",
    execute(message, args){
        const member = message.member
        if(member.hasPermission("KICK_MEMBERS")){
            message.channel.send(":redTick: wat")
        }
        else{
            message.channel.send(":redTick: You need the `KICK_MEMBERS` permission.")
        }
    }
}``` it does nothing. No error.
sudden geyser
#

are you sure the command is being executed

#

You should log the state of your program (e.g. use step points with a debugger or logging statements)

distant cobalt
#
        if(member.hasPermission("KICK_MEMBERS")){
                  ^

TypeError: member.hasPermission is not a function``` help
distant cobalt
#

But i have this new problem

grizzled raven
#

a 401: Unauthorised when using a Bearer token means the token has expired, right?

pale vessel
#

Yes

pale vessel
#

@grizzled raven how did you fix it

grizzled raven
#

fix what?

#

invalid_grant?

pale vessel
#

Ye

grizzled raven
#

i didn't

pale vessel
#

Oh lol

grizzled raven
#

i just figured out how to tell the library that the user is no longer authenticated and they had to authenticate again

#

yeah i was passing undefined instead of null

zenith terrace
#

get emoji from server bot is in

#

do \:emoji_name:

#

\ will do the following

#

from that

#

to that

mystic osprey
mystic osprey
#

Yup

#

It looks like the most competent api

#

*wrapper

lyric mountain
#

indeed is, wise choice

#

so, what do you need my boy?

zenith terrace
#

what was the outcome

#

mobile?

#

you sure you inputted the correct name?

mystic osprey
lyric mountain
#

well...I need you to be a little more specific

#

but I do have general tips

mystic osprey
#

Just general tips since I barley know where to start with JDA

lyric mountain
#

use setMemberCachePolicy, disable setBulkDeleteSplittingEnabled and use a fixed thread for setEventPool

#

those 3 things alone fixed a helluva amount of issue I had early on

#

just note that if you use a fixedthreadpool for eventpool you'll need to worry about parallelism

#

like, one data being manipulated by 2 simultaneous events

#

the membercachepolicy allows you to define what gets cached and what doesnt

#

unless you plan on answering bots you don't really need to cache them

#

or members that are blacklisted

#

also, use some command handler, be it hand-baked or from a lib

mystic osprey
lyric mountain
#

I were going to release a cmd handler for jda but stuff got in my way

zenith terrace
#

you just did it above...

lyric mountain
#

maybe one day

zenith terrace
#

...

earnest phoenix
#

hi

zenith terrace
#

then you prob arent doing it correctly

lyric mountain
#

I'm always here if you need specific tips or help

#

jda is way too big for me to say about everything it has

#

doubt I think you're mistaking something

zenith terrace
#

state it

#

so...2 prefixes?

#

ive never worked with 2 prefixes before, but if you want to change one you would need a database

wanton pebble
#

do u use a const for ur prefix

#

is it ```const prefix = '--';````

#

like that?

#

ok

#

try const prefix = ('--', '!');

#

hmmm

crimson vapor
#

nope

#

better to use an array

rocky pulsar
#

Anyone here good with data systems and algorithms? Or discord.js I need someone to teach me. Please dm me if you can help.

crimson vapor
#
const prefix = ['-', '!']

prefix.some(e => msg.content.startsWith(e))```
#

or something

#

ive never implemented it myself

wanton pebble
#

args[0] == prefix1 || args[0] == prefix2

"prefix": [ 'prefix1' , 'prefix2']```dont know how to add this into code but found these
#

^

#

oh

#

@earnest phoenix try this

#

const prefixes = ('--', '!');

rocky hearth
#

@earnest phoenix u using djs?

wanton pebble
#

for your cosnt

near stratus
#

How about

const PrefixList = [
    "_",
    "!",
    "$"
]
// Client on message
    let sw = false
    PrefixList.forEach( p => {
        if(message.content.startsWith(p){
            sw = true
        }
    })
    if(sw){
        //The commands
    }
//End of on-message
rocky hearth
#

then there's nothing as such ("", "") in js

#

use array

near stratus
#

or whatever

cinder patio
#

const prefixes = ('--', '!'); is the same as const prefixes = '!';

rocky hearth
near stratus
#

dude
ever heard about code blocks ?

cinder patio
rocky hearth
#

it works without the parenthesis too

cinder patio
#

doesn't look like it

rocky hearth
#

y the, how js is ignoring all the strings and accepting last one

#

it working without parenthesis for me

cinder patio
#

That's how it's designed to work

rocky hearth
#

Im damn sure, u hv copied this code from somewhere!

#

i doubt, coz u hv change ur prefix from a string to array. And hvnt changed anything else to adapt this change in ur code

wanton pebble
#

lol replit

#

i use it too

rocky pulsar
#

Try using json instead of a database for prefixes

#

just make a file named prefixes.json and store orefixes per server with : server id owner name and prefix

#

And then code it so people can update their prefix with a command.

lusty quest
#

https://discord.js.org/#/docs/main/stable/typedef/ImageURLOptions try to pass options, its possible that you use a non supported format

rocky pulsar
#

I dont know much about js but maybe try using message.author.guild.icon_URL ?

#

then it should work for thumbnail too

#

my main is python

#

so I cannot tell you about js

tawny rune
#

Where do I find the API to tell me who upvoted my bot?

eternal elbow
#

Hi, How can I ensure that the user I have authorized does not go away even if my api client is closed and opened?

feral aspen
#

Hey all! 👋

#
if (itemToSell === "attitudecoin" || itemToSell === "attitudebadge" || itemToSell === "attitudetrophy") data.multiplier = 1;

Any faster way for this if statement?

wary flame
#

Pretty sure you can do something like this if (itemToSell === ("opt1" || "opt2")) ...

feral aspen
#

For options, do we use === () or === []

#

It relates to regexes I think, same way?

spare badger
#
if (
  ["attitudeCoin", "attitudeBadge", "attitudeTrophy"].indexOf(itemToSell) !== -1
) {
  data.multiplier = 1;
}
feral aspen
#

Does this work?

spare badger
#

Didn't test but it should

feral aspen
#
if (itemToSell === ("attitudeCoin" || "attitudeBadge" || "attitudeTrophy")) data.multiplier = 1;
spare badger
#
if (
  ["attitudeCoin", "attitudeBadge", "attitudeTrophy"].includes(itemToSell)
) {
  data.multiplier = 1;
}
#

This is even better

feral aspen
#

👍

wary flame
#

Use or operator not comma (||)

feral aspen
#

Oh.

feral aspen
vivid fulcrum
#

use a switch case

#

much cleaner

spare badger
#

Switch case is for when you have a lot of different actions for different values right? This is a lot of values for one action.

wary flame
#

You can use it in this case as well

switch(itemToSell) {
case "some value":
case "another value":
// Do things
break
}```
#

Although I personally prefer an if statement in this case

spare badger
spare badger
#

The things inside the () will return true and itemToSell is not true so this will always return false.

earnest phoenix
#

hello?

eternal osprey
#

hey

#

is anyone here known with rocketreach?

#

Their api for js really confuses me

#

like, it limits my json output to 10 max users only?

#

Why is that

#

the website shows 10 user per page, but how can i get the total amount of users?

quartz kindle
#

it says total 8000000

eternal osprey
#

yeah

#

but it only shows 10

#

in the parsed object

quartz kindle
#

because its paginated

eternal osprey
#

Or get all the info at once

quartz kindle
#

8 million at once probably not

#

pages likely yes, check the docs

eternal osprey
#

i've checked the docs

#

found literally nothing

quartz kindle
#

then check again

eternal osprey
#

i can send you the website if you want

#

i have been looking for 2 hours

quartz kindle
#

i cant, my mobile data is almost finished

eternal osprey
#

owh alright no problem

#

curl --request 'POST' --location 'https://api.rocketreach.co/v2/api/search'\ --header 'Api-Key: '\ --header 'Content-Type: application/json'\ --data '{"query":{"name":["Amit Shanbhag"],"keyword":["Founder"],"current_employer":["RocketReach.co"]}}' this is their v2 version, which has pagination set off. However i am confused with what curl means. is that just a post request?

sage oracle
#

Hi

#

About truth or dare bot? I cant invite it to server

hushed dome
#

are user bots allowed in this server

sick agate
#

no

sage oracle
warm shale
#

how do i make them all attached?
(i need something like
Text1 Text2 Text3 etc.)

near stratus
slender thistle
#

Or just put them in one container

boreal iron
#

which will work as well

prisma lion
#

how to check if bot has a specified permission py

#

if u got documentation link for this send me it :)

#

ty

azure lark
#

how can i make a vote link

prisma lion
#

wdym?

#

when u run a cmd it sends a vote link?

azure lark
#

hyperlink

prisma lion
#

oh

azure lark
#

how do i put in an embed

prisma lion
#

which language?

azure lark
#

js

prisma lion
#

ok so in the embed field

#

description

#

@azure lark

azure lark
#

do i have to have the first "text" part

prisma lion
#

yeah i think u need that arg

azure lark
#

how do i get 2 hyperlinks, one ontop of the other

#

like:
hyper-link-1
hyper-link-2

prisma lion
#

\n

azure lark
#

but then it will have to be like,

text
hyperlink
text
hyperlink

prisma lion
#

no

azure lark
#

ohhh okay

prisma lion
#

u can use \u200B

past grotto
#

Delete this.

earnest phoenix
prisma lion
#

yeah ikr

quick ginkgo
#

ive decided to download the virus

frank pulsar
#

lol

prisma lion
#

lmao

#

on virtual machine?

quick ginkgo
#

no

prisma lion
#

oh f

quick ginkgo
#

i dont have enough time to download and learn how to set it up

prisma lion
#

LOLOLOLOL

azure lark
#

thanks

prisma lion
#

:)

#

how to check if bot has a specified permission py
if u got documentation link for this send me it :)

prisma lion
#

@earnest phoenixwut

earnest phoenix
#

No problem

earnest phoenix
#

That's for the bot

#

The other one checks if a user has permission

prisma lion
#

ooof

#

xd

digital ibex
#

hey so, i am currently doing this:

#
    if (!client.cache.has(guild)) client.cache.set('guild', guild);
    if (!client.cache.has(member)) client.cache.set('member', member);
#

are there any alternatives which are better for performance?

#

guild and member are my db stuff btw

#

client.cache is a map btw

cinder patio
#

what's the point if the map can have only 2 entries? thonkku guild and member

digital ibex
#

thats all the things i need atm

#

and yeah, i wasnt so sure about the map and i didnt really know what to use

#

so i jus stuck with it but now idk

woeful pike
#

you have 2 keys and you're wondering about performance lol

digital ibex
#

yeah, cuz when i was making a db call multiple times per message sent and now im doing it once, it barely changed

#

not barely sorry, didnt change at all

cinder patio
#

I'd use an object, otherwise the code for setting and checking if an entry exists in an object/map is very fast

woeful pike
#

what didn't change?

digital ibex
#

the ping

woeful pike
#

why would that change the ping

digital ibex
#

? its taking less time to get to that

woeful pike
#

do you know what ping is

digital ibex
#

yes

cinder patio
#

the ping isn't affected by your app's performance thonkku

digital ibex
#

but wouldnt it like, run it faster ?

cinder patio
#

the internet speed and the location of your server matter for the most

woeful pike
#

the distance from my house to yours doesn't depend on whether you live in a mansion or a hut

digital ibex
#

hm yeah alr, is console.time the only way i can like test if this actually improves the performance or are there any ways to do it

cinder patio
#

most of the time you can see if something is performant by just looking at the code, if you want to benchmark your code then use a library like benchmark.js or the performance built-in lib

digital ibex
#

kk ty man

#

whats ur question

#

its not gonna hurt to send it one more time

#

and i literally just came to this channel

#

no

#

what are u talking about

#

just tell me ur question

quartz kindle
#

something like canvas

#

if youre using js

#

then use canvas

#

thats what most people do for generating images

prisma lion
#

i have a problem i stored a channel id in a variable using a cmd, then i called it in another function/cmd to send embed to that specific channel but nothing is working :/ any ideas?

#

.py

prisma lion
#

hmmm

prisma lion
solemn latch
#

well, is the variable in the same scope? or is it being passed to the function in some way.

prisma lion
#

yeah

#

the variable is a global

#

and is edited by a cmd

#

and called by another

solemn latch
#

👀 so if you log it in the other function the correct id is given?

prisma lion
#

yeah i used print it works

#

but

#

it doesnt work here

#

the cmd doesnt send the msg

#

i even tried to name them global in the functions

#

@solemn latch so.. :D

solemn latch
#

i dont know py, so cant really help further than i have.

prisma lion
#

oh

#

its k

#

this is frustrating

#

ughhh

frank pulsar
#

Can I like, somehow use multiple html files?

solemn latch
frank pulsar
#

well, for multiple pages?

#

I am talking about the bot information thingy

earnest phoenix
#

anyone here having a bot with 10k+ servers coded in java using discord jda? because I have a question about a problem I'm facing since lika 2 weeks ago

#

My problem is that my bot (nearly 6k servers, running on 7 shards), meaning all 7 shards, reconnect around 3 times per hour, which seems not normal to me since the bot stood online 24/7 when I was around 1-2k servers...

lusty quest
#

i dont use jda, but im pretty sure they have a debug event for Gateway events, i would monitor the gateway events and see if something weird happens

#

helped me to find some weird stuff happening with on of my bots.

earnest phoenix
#

what was the cause for your bot?

solemn latch
frank pulsar
#

Hmm ok

#

Thanks

viral socket
#

I keep getting this error:

AttributeError: 'Bot' object has no attribute 'topgg'

My Code related to the topgg module:

import topgg

client = commands.Bot(command_prefix='h!', intents=Intents.all())
dbl_token = "token"
client.topgg = topgg.DBLClient(client, dbl_token)

@tasks.loop(minutes=30)
async def update_stats():
    try:
        await client.topgg.post_guild_count()
        print(f"Posted!")
    except Exception as e:
        print(f"Failed! \n{e.__class__.__name__}: {e}")```

Where is the `Bot` object?
#

nvm

#

I fixed it

earnest phoenix
#

@prisma lion make sure the ID is an integer

earnest phoenix
#

what does it return?

prisma lion
#

i even declared the var as int

prisma lion
#

which is an int

earnest phoenix
#

no I'm saying what does get channel return

prisma lion
#

even while debugging it does

prisma lion
#

oh a sec

earnest phoenix
prisma lion
earnest phoenix
#

print the output of partners

prisma lion
#

i mean i changed the var to an id

#

directly

#

i did lemme do it again

#

brb

earnest phoenix
#

I'm not an expert but it will collide with dpy client object

prisma lion
#

wait code didnt print that smth i wrong before smh

viral socket
frank pulsar
#

If I have a webpage (a github page), can I have that automatically set as description?

vivid fulcrum
#

via an iframe, but i don't think the js on the gh page will function

frank pulsar
#

Yeah the js is no issue

#

I am not using any js anyways

frank pulsar
#

it looks wrong

#

theres no scrolling, the sites navbar appears on top of my iframe

#

etc

prisma lion
#

@earnest phoenix u how how to make a int only list

#

that sucks lol

earnest phoenix
#

you should go to support channel for that

frank pulsar
#

oh yeah sorry

lean bobcat
#

Hi

#
text_enc="v9bqzTHQBax++H2N2TGWMw==$VAxgy7vA4D8BoX4dg9QeaADrMrKlRcuGOb9IYsO1/dBed19fc50VChZDJSxOsPe3RleYTzbKTbdTTEaIXa+5WA=="
#

How can I decrypt

vivid fulcrum
#

😕 ??

#

context please

proven lantern
#

The string to be decoded is not correctly encoded

#

oh, there are 2 base64 stings stuck together

#

split them up

lean bobcat
lean bobcat
proven lantern
#
base64string = '''.......................'''
base64.b64decode(base64string)```
vivid fulcrum
#

you provided no context with your question

#

where is that snippet from, where did you get the string, what is it about

lean bobcat
#

I am getting this on a websocket

vivid fulcrum
#

how to decrypt is a question that covers a very wide range of topics

#

you need to be more specific about what you're doing

lean bobcat
proven lantern
#

you have 2 base64 strings

lean bobcat
#

Removed

proven lantern
#

v9bqzTHQBax++H2N2TGWMw== and VAxgy7vA4D8BoX4dg9QeaADrMrKlRcuGOb9IYsO1/dBed19fc50VChZDJSxOsPe3RleYTzbKTbdTTEaIXa+5WA==

lean bobcat
#

Splited

proven lantern
#

yeah, remove that $ in between the two

vivid fulcrum
lean bobcat
#
b'\xbf\xd6\xea\xcd1\xd0\x05\xacG\xd8\xdd\x93\x19c0'

[Program finished]
lean bobcat
#

How can I convert it into string

proven lantern
#

are these the strings you are expecting?
"¿ÖêÍ1Ð\u0005¬~ø}Ù1–3" and

```T\f`Ë»Àà?\u0001¡~\u001dƒÔ\u001eh\u0000ë2²¥Eˆ9¿HbõýÐ^w__s\u0015\n\u0016C%,N°÷·FW˜O6ÊM·SLFˆ]¯¹X

vivid fulcrum
#

it isn't a valid string

#

that's why i'm asking

#

what in the literal fuck are you doing lol

quartz kindle
#

its either zlibed or its binary data

#

try creating a buffer or uint8 from the base64 string

proven lantern
vivid fulcrum
vivid fulcrum
lean bobcat
quartz kindle
#

judging from the $ symbol, it could be a bcrypt or argon hash

proven lantern
#

how was the string encoded?

quartz kindle
#

first part is the salt

#

second is the hash

lean bobcat
vivid fulcrum
#

and i keep asking you

#

w h e r e

quartz kindle
#

yeah

#

connectwd wjere

#

discord?

proven lantern
#

so the two valid strings might be the salt and hash strings

lean bobcat
#

Nope a trivia game

woeful pike
#

bcrypt would need a second $ in there with the salt round count so I doubt that

quartz kindle
#

then check the docs for this trivia game

lean bobcat
quartz kindle
#

it will tell you what it is

vivid fulcrum
#

i love how they refuse to say the platform

lean bobcat
vivid fulcrum
#

are you trying to connect to kahoot lol

quartz kindle
#

then how did you connect to their websocket?

lean bobcat
#

What kahoot??

lean bobcat
#

Sir

woeful pike
#

sounds against tos

quartz kindle
#

then check the code thats processing the data

#

if its client side js, its open

woeful pike
#

it's most likely encrypted client side so you have to tediously reverse engineer it

lean bobcat
#

Oh

woeful pike
#

until they update their private key and you have to do it all over again

lean bobcat
#

And I am getting idsigned variable

#

In websocket

#

'idSigned': '8790$106618403$d9851c73eb1bc255dd18c5f96a2c35c39a9c2461',

vivid fulcrum
#

nobody can help you until you tell us what your end goal is and which platform you're trying to use

lean bobcat
#

Python

#

Websocket client

vivid fulcrum
#

by platform i meant the website lol

lean bobcat
#

Swag. Iq

#

Open your DM I will send the response of ws

vivid fulcrum
#

no

woeful pike
#

you just have to reverse engineer it

#

if you think that's bad, you'll love what the new vote payload looks like for top.gg

vivid fulcrum
#

chances are there's already something somewhere for it already

#

but you won't tell us what platform it is

#

so we can't help you

woeful pike
lean bobcat
#

Swag bucks live android apk

#

@vivid fulcrum

vivid fulcrum
#

oh it's an app lol

lean bobcat
#

It's an android and iOS apk

vivid fulcrum
#

thought it was a website

#

well

#

good luck, the app is probably obfuscated

quartz kindle
lean bobcat
#
{'code': 41, 'question': {'textEnc': 'v9bqzTHQBax++H2N2TGWMw==$VAxgy7vA4D8BoX4dg9QeaADrMrKlRcuGOb9IYsO1/dBed19fc50VChZDJSxOsPe3RleYTzbKTbdTTEaIXa+5WA==', 'number': 10, 'totalQuestions': 10, 'idSigned': '8790$106618403$d9851c73eb1bc255dd18c5f96a2c35c39a9c2461', 'textEnc2': '5J8EiO6/NMAIt5Et6JM5og==$e9ssklRGAOxFDk+ZuB2A15NCeznQ/RkH84X0e9eu2ECTTNAPbNruLvqyx25gh6inI/xmsJqnO9o3K5Bb+7npuQ==', 'secondsToAnswer': 10}
woeful pike
lean bobcat
quartz kindle
vivid fulcrum
#

nobody here can

lean bobcat
#

Y

vivid fulcrum
#

you're essentially reverse engineering an app

quartz kindle
#

like xet said

#

xd

woeful pike
#

well bcrypt is in the form of $12$abcd

quartz kindle
#

then idk

woeful pike
#

would be kind of weird to send a hash over

#

it's most likely a base64 encoded binary payload

#

which I imagine would be some sort of AES encryption

#

so you have to dig through the source to see what the key is

lean bobcat
#

AES encryption needs a private key

woeful pike
#

yes

lean bobcat
#

To decrypt

woeful pike
#

client side encryption is used to make your life more difficult

lean bobcat
#

Oh

woeful pike
#

because obviously you're breaking ToS rn

lean bobcat
quartz kindle
#

isnt client side encryptoion useless tho

#

or do they do it just to annoy you

woeful pike
#

in theory yes but if you want to stop automation it's pretty good

vivid fulcrum
#

also, if you're trying to make an auto solver of some sorts, you probably shouldn't even bother

woeful pike
#

you're breaking this app's tos so they want to make it harder for you to reverse

vivid fulcrum
#

there's a 99% chance that the app doesn't the correct answer to the client

woeful pike
#

in most cases you will have to write code that will parse the AST of the code or write some sort of regex that can extract the private key from the app because if the devs are competent it'll be rotating

vivid fulcrum
#

reading the description

#

you won't reverse engineer that

#

they have actual money at stakes

woeful pike
#

the point is to make it so annoying that you won't even bother

#

unless you're making millions of dollars from it like with reselling hype clothes from supreme it's just not worth it. That's how bot protection works

lean bobcat
#

I am making question solver

vivid fulcrum
#

i assumed so

lean bobcat
#

Like searching

#

In Google

vivid fulcrum
#

work smarter, not harder

woeful pike
#

you're just not experienced enough to tackle this lol sorry

lean bobcat
#

Hm

vivid fulcrum
#

emulate the app on pc and make a desktop app that analyzes what's on the screen

#

you won't be able to crack through their encryption

lean bobcat
#

Ocr

woeful pike
#

reverse engineering is lots of very tedious work and when you're making bots often the app you're reversing will change something and you'll end up throwing away tens of hundreds of hours of work

lean bobcat
#

Oh

woeful pike
#

you generally end up resorting to more expensive solutions like OCR or browsers to automate things and usually that's just too slow and costly to do at scale (or at all)

lean bobcat
#

Thanks

quartz kindle
#

@opal plank @lyric mountain only in brazil https://spcultura.prefeitura.sp.gov.br/projeto/4971/

lyric mountain
#

What

vivid fulcrum
#

fun fact

opal plank
#

Yo

#

Wtft

#

A gov site

quartz kindle
#

this is a page in the official gov of sao paulo website

opal plank
#

LMAO

#

deadass?

lyric mountain
#

Exactly, how and what?

austere delta
#

hi

vivid fulcrum
#

ninja kiwi doesn't do any verification whatsoever when saving your account details so in bloons td 6 you can just send a request with a payload that has 999999 coins and shit like that 💀

#

i did it on another account and got banned within a week though

quartz kindle
#

lmao

opal plank
radiant kraken
vivid fulcrum
#

they can't really fix it either because they can't differentiate whether you earned it or bought it

lyric mountain
#

I mean, I'm wondering how that's hosted in a gov site to begin with

austere delta
vivid fulcrum
lyric mountain
#

Maybe

quartz kindle
#

"if you need help, contact me at mailto:chamealdir@gmail.com"

#

a gmail address in a gov website

#

it literally means "call aldir"

vivid fulcrum
#

professional government

quartz kindle
#

@lyric mountain @opal plank edit the project id in the link

#

there are tons like that lmfao

leaden rover
#

Can I do client.user.setPresence({}) in discordjs, but without the type:?

opal plank
lyric mountain
#

Call aldir?

lyric mountain
#

I just agreed

opal plank
#

Oh, yeah,, cry

quartz kindle
#

could be sql injection

#

or credentials leak

lyric mountain
#

Or both

quartz kindle
#

they seem to be posting these

#

as actual gov projects

#

or some insider getting paid

lyric mountain
#

Brazil still use firebird

#

And delphi

#

And windows xp

opal plank
#

10/10, first world country, rated 4.8 stars on uber eats

quartz kindle
#

https://spcultura.prefeitura.sp.gov.br/busca/##(global:(enabled:(event:!t),filterEntity:project,viewMode:list))

opal plank
#

/s

quartz kindle
#

look at that horrendous query param structures

#

but check the link, is all ads for android games

#

lmao

woeful pike
quartz kindle
#

some ads even have booking dates, book your seat now until 2033

#

lots of spanish ads

lyric mountain
#

No hot ladies in your area ads?

quartz kindle
#

nope

#

lots of fake whatsapp ads

#

whatsapp plus v12

#

whatsapp GB v9

#

whatsapp FM

#

(for those who didnt read, this is inside an official brazilian government website)

sick agate
#

Tf

meager sierra
#
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/runner/FearlessBot/node_modules/parse-ms/index.js
require() of ES modules is not supported.
require() of /home/runner/FearlessBot/node_modules/parse-ms/index.js from /home/runner/FearlessBot/commands/info/uptime.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/runner/FearlessBot/node_modules/parse-ms/package.json.

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1015:13)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/runner/FearlessBot/commands/info/uptime.js:1:12)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at /home/runner/FearlessBot/index.js:107:21
    at Array.forEach (<anonymous>)
    at /home/runner/FearlessBot/index.js:104:13
    at FSReqCallback.oncomplete (fs.js:156:23) {
  code: 'ERR_REQUIRE_ESM'
}

Help?

solemn latch
#

Must use import to load ES Module: /home/runner/FearlessBot/node_modules/parse-ms/index.js
require() of ES modules is not supported.

meager sierra
#

How can I fix that?

solemn latch
#

youll need to use import to load es modules

meager sierra
#

how do I do that :/

meager sierra
#

does that work for discord.js

#

wait nvm im dumb i see javascript lol

solemn latch
#

the issue seems to be with parse-ms, not djs anyway

#

/home/runner/FearlessBot/node_modules/parse-ms/index.js

meager sierra
#

ok, where do I put the import code at? in the package or?

solemn latch
#

at the location you are requiring

meager sierra
#

ok thank you

opaque acorn
#

(node:7752) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'set' of undefined ?

cinder patio
#

I dunno if that's a question for development lol

rocky hearth
#

wrong channel

devout flicker
devout flicker
#

Help me

sudden geyser
#

Isn't Google's search API closed

lyric mountain
#

no, but heavily limited in free version

prisma lion
#

Is there an equivalent command to client.get_channel('ID') that allows you to send the message to a specifically named text channel. :)

lyric mountain
#

you mean get channel by name?

prisma lion
#

yup :D

#

how ez u said it xd

lyric mountain
#

there's probably a method for that, just be aware that it doesn't guarantee you'll get the channel you expected