#development

1 messages · Page 1999 of 1

ancient nova
#

so my regex script works well but for some reason it returns a "." at the start

#

can you check why it's doing that and possibly fix?

cinder patio
#

Looks fine to me?

ancient nova
#

adds a "." before

earnest phoenix
#

It's better to use embed object or the MessageEmbed function? For optimisation

#

I mean, does it change something

sudden geyser
#

It's more for convenience and validity.

#

A MessageEmbed is turned to an embed object when it's sent, so there's no performance benefit ("optimizations") of using a MessageEmbed.

#

What MessageEmbed does for you, however, is give you the builder pattern so you can set properties with methods (e.g. .setTitle), so if you like that, there's a plus.

#

Plus, it'll run checks on each property you try altering, like if the input is too large.

#

I'd personally suggest using an embed object since you probably don't need the checks.

earnest phoenix
#

Hello i'm trying to define a variable after my guild is created into my db, but when i redefine the variable with the .then it return me undefined because the code after still running before the variable is set, but i don't know how to fix this

let guildInfo;
const createGuild = await new Guild({ id: message.guild.id });
createGuild.save().then(g => { guildInfo = g });

console.log(guildInfo) // return undefined

setTimeout(() => { console.log(guildInfo) }, 1000); // return the guildInfo
sudden geyser
#

That's because calling .save() returns a promise. As in, saving the document will happen some time in the future.

#

You'll need to use g inside the .then block. You can't assign it to a variable like you're doing right now.

sudden geyser
#

You'll need to do what you're doing with guildInfo inside the .then(g => {...}) block.

earnest phoenix
#

but thats what im doing

sudden geyser
#

e.g.

createGuild.save().then(g => {
  console.log(g); // Should have some value.

  setTimeout(() => console.log(g), 1000);
});
earnest phoenix
#

Yeah but i really need to define the guildInfo var this is why im stuck

sudden geyser
#

Then you'll need to handle that scope as a promise as well.

earnest phoenix
#

I know but i dont understand how promise work

sudden geyser
#

Considering you're using await above, you could easily do:

let guildInfo = await createGuild.save();

And use it below.

earnest phoenix
#

Okay thanks

split hazel
#

I'm planning to make an evolution game where the child will inherit "features" (e.g. vision length, hearing, speed, aggression, strength etc) from the parents and im wondering an "inheritance" strategy

#

how would you compute which features to inherit and to what extent

sudden geyser
#

I'd create links and just store the properties that have changed on the child.

#

You could think of it like a linked list (as one item to points to another) or an immutable data structure (where, for efficiency, unchanged data points to the prior data structure)

#

But that can be harder and more costly to compute. You could easily just take the properties of some entity, change some up a bit, and return a new one without using links.

#

Of course, it depends on what child is anyway

cinder patio
#

Features should be stored in genes, you could make some genes hereditary (only from female parent, or only from male parent, or there's a chance from either of them) , others could be random mutations etc.

sudden geyser
#

life 2

cinder patio
#

Then create an array of common genes - Collect all (or maybe some) genes from both parents and possibly their parents. Then maybe have a 75% chance of the child inheriting each of those genes, but allow for some randomness and create mutations of some genes. (Also you could disallow some genes based on some stats of the child OR what genes they already have)

marble juniper
#

Sounds hella complex already

cinder patio
#

You could also implement dominant and recessive genes but yeah

earnest phoenix
#

what have i stumbled upon

split hazel
#

so i will have random mutations

#

and make up a huge index of genes

#

and then randomly assign 'recessive' or 'dominant' to the gene

#

my only problem lies is there a better way of inheriting value based features

#

such as speed

#

i could simply go "fast", "very fast", "slow", "very slow" but thats kinda repetitive

modest maple
split hazel
#

or i can just randomly generate the set of speeds lmao

#

yeah i'll do that

#

for value based genes i'll generate a large variation of them

modest maple
#

Worst case you can do randomness with bias / weighting

#

or something like a custom seed

split hazel
#

yeah sounds good

#

will also implement disease genes which make you die after 5 minutes or whatever

#

fun way for rng to wipe out an existance

hidden gorge
#

Bitfield invalid

#

intent is PRESENCE_UPDATE

simple stump
#

I'm trying to print out the value between two dates: one that is stored in a SQLite database, and the current time. However, when printing out seconds I get 0.821 which doesn't seem right at all.

console.log(curTime);
console.log(parseInt(rows.lastDaily));
let diffTime = curTime - parseInt(rows.lastDaily);

let seconds = diffTime / 1000 / 60;
let minutes = seconds / 60;
let hours = minutes / 60;
let days = hours / 24;

resolve({ "seconds": seconds, "minutes": minutes, "hours": hours, "days": days });

This is the output I get:

1647121949359
1647121900071
{
  seconds: 0.8214666666666666,
  minutes: 0.013691111111111109,
  hours: 0.00022818518518518514,
  days: 0.000009507716049382715
}
earnest phoenix
#

Read the error "guildin is not defined"

hidden gorge
#

ok

spark flint
simple stump
boreal iron
spark flint
#
const config = require(".../config/config")```
```js
Error: Cannot find module '.../config/config'
Require stack:
- C:\Users\Churt\Desktop\help desk\routes\admin\index.js
- C:\Users\Churt\Desktop\help desk\routes\index.js
- C:\Users\Churt\Desktop\help desk\app.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\Churt\Desktop\help desk\routes\admin\index.js:2:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    'C:\\Users\\Churt\\Desktop\\help desk\\routes\\admin\\index.js',
    'C:\\Users\\Churt\\Desktop\\help desk\\routes\\index.js',
    'C:\\Users\\Churt\\Desktop\\help desk\\app.js'
  ]
}```
#

thats C:\\Users\\Churt\\Desktop\\help desk\\routes\\admin\\index.js and i want C:\\Users\\Churt\\Desktop\\help desk\\config\\config.js

quartz kindle
#

uh

#

.../ is not a thing?

spark flint
#

ah

#

i did ../config/config

#

those worked

#

what do i do then

quartz kindle
#

dont use .../?

spark flint
#

../config/config doesn't work in the admin/index.js bit

quartz kindle
#

whats the full path of the config file?

#

C:\Users\Churt\Desktop\help desk\config\config?

spark flint
#

yes

quartz kindle
#

then you need ../../

#

you are in the admin folder right? admin/index.js

spark flint
#

yeah

quartz kindle
#

so ../ means go back one folder

#

so now you're in the routes folder

spark flint
#

ahhhh

quartz kindle
#

so add another ../ to go back one more

spark flint
#

well now i know KEKW

craggy pine
spark flint
#

oh

#

didn't know that KEKW

earnest phoenix
#

��<�x�}��5��.׮;�}�߭8.ׯZs�4��:k�6�߼q�>���ݻ�_| so I made a basic implementation of discord's token system on how I thought they did it, but this is the result of it. Is this cause I did something wrong when using base64 or is my pc not able to handle viewing it?

#

Cause this is a pretty unreadable token

earnest phoenix
earnest phoenix
#
generateToken(id: string): string {
    return `${Buffer.from(id, 'base64')}.${Buffer.from(Date.now().toString(), 'base64',
)}.${Buffer.from(randomUUID(), 'base64')}`;
}
#

this is how I generated the tokens

#

I didn't know how to generate the HMAC thing but you basically told me it was random junk before so I just decided to encode a randomUUID

hidden gorge
#

     if (args[0] === 'management') {
        let mnge = [];
     
        client.commands.forEach((command) => {
           if (command.config.group === 'management') mnge.push(`\`${command.config.name}\` - ${command.config.description}`);
       })```
earnest phoenix
#

args is not defined so define it

hidden gorge
#

how?

earnest phoenix
#

by giving args a value

hidden gorge
#

ok so what do i put?

earnest phoenix
#

idk depends on what you are doing and what you think args is

hidden gorge
#

i really have forgot

#

it’s a help command

lament rock
#

Buffer.from(id).toString("base64");

earnest phoenix
#

🤔 ok I thought that is what the second prop of Buffer.from did tho

lament rock
#

Buffer.from second param doesn't stringify it GabDumb

#

Buffer.from is the safe variant of new Buffer(data);

#

new Buffer is deprecated due to security

bright hornet
earnest phoenix
#

icic

severe patio
#

Is it possible to get user votes for a server listing?

#

Like fetch the voters id when they vote for a server listing

earnest phoenix
lament rock
#

np

lament rock
earnest phoenix
#

Why?

lament rock
#

Buffer.from((Date.now() - 1293840000).toString()).toString("base64");

earnest phoenix
#

But why

#

This is nothing to do with discord why would I use their epoch?

lament rock
#

to decode, it's an int, then you add the Discord epoch to that int and you have a unix timestamp of when the token was created

#

Oh

#

Thought you were trying to replicate Discord's system. mb

earnest phoenix
#

I mean I am but it is separate from discord

#

I will subtract later when I release a stable version of this website to do it properly

lament rock
#

Then you should use your own Epoch :)

earnest phoenix
lament rock
#

It's just a timestamp represented as an int

earnest phoenix
#

I see

lament rock
#

Date.now() pretty much

#

but its a static value from the past

earnest phoenix
#

So basically I just take Date.now() save that value in the code somewhere and subtract Date.now() by that?

boreal iron
lament rock
#

Yeah

#

but you can set the timestamp to any value if you can get it via the Date constructor

earnest phoenix
#

I will just grab the date.now from when I started developing this and use that as the epoch

lament rock
#

Reasonable

earnest phoenix
#

there now it is using the epoch

lament rock
earnest phoenix
#

Now to figure out what I wanna use as the default avatar for users for this project

lament rock
#

Use the hidden Discord pfp asset

earnest phoenix
#

hm?

#

u mean their default avatar?

lament rock
boreal iron
#

Oof pink

lament rock
#

Usually, the default avatar URLs are 0-4, but they secretly added a 5

earnest phoenix
#

its not a secret if u know

#

👀

lament rock
#

iirc, nobody has it because it's based off of the discrim you were generated with

earnest phoenix
#

damn no 6

#

😔

#

no 69 either

#

But I should probably use an avatar that is based off the logo of this project which I also don't even have

lament rock
earnest phoenix
#

I am very prepared :)

neat ingot
#

evenin' folks 😗

dry imp
#

its morning but okay

boreal iron
#

It’s non of both

lament rock
#

Just speak in terms of unix timestamps when referring to time online unless it is requested to know your local time

#

I wish you all a wonderful (whatever this message's snowflake decrypts to in unix time)

boreal iron
#

lmao

#

You better copy that to your clipboard

#

Imagine writing that every time oldEyes

winged mulch
#

Does topgg-autoposter work with Detritus client?

mellow crown
#

@near stratus I use python not js

hoary apex
#

can anyone help me to setup reply and typing thingy for my chatbot?

near stratus
earnest phoenix
plucky imp
#

okay so

#

wait nvm i fixed it lols

earnest phoenix
#

Good job

onyx socket
#

My bot suddenly stopped reacting to prefix commands while slash and commands with ping still work
Whats the reason for that
I have message content intent too

#

For example when i type, aa.help it doesn't respond. But @Bot help and /help work fine.

hybrid cargo
#

looks like a problem with your handler then

onyx socket
#

hmm, can you explain a bit please

hybrid cargo
#

I cant, i dont know how your command handler works.

onyx socket
#

anything you wanna know, for understanding how it works.

#

it just started happening suddenly

#

like yesterday it was working

#

when i run the bot locally, prefix commands work, but when i push to hosting service, it just behave like that

craggy pine
#

it would require code sharing at this point

onyx socket
#

if that is what you asked

#

i have two tokens, one for the bot thats public and one for the private one, when is_Test is true, it loads the bot with private token so that i can test without affecting the public one.

rocky hearth
#

is the position of a channel in a category is relative to the category??

#

like if, there is only one channel in a category, will it have position 1?

earnest phoenix
#

nextjs has wayyyy too many protections for accidental css conflicts

apparently I cant use any element selectors in module.scss files because it's not "pure" even though the global stylesheet doesn't use any of them

craggy pine
#

That's py idk den

earnest phoenix
#

anyways how do i use element selectors without inline styles or a style tag

dry imp
earnest phoenix
#

ok i found a solution: className hell

pray for my soul

woeful pike
onyx socket
#

yeah, this started happening after i got a mail from discord

#

saying that my bot has been approved for the message intent

woeful pike
#

rip

#

you can't use prefixes anymore

#

I didn't realize they rolled it out already

onyx socket
#

wait, even with the intent?

woeful pike
#

you don't have the intent if you're not approved for it

dry imp
woeful pike
#

unless you have a single server bot or something

onyx socket
earnest phoenix
woeful pike
#

oh has been approved for intents

onyx socket
#

yeah

woeful pike
#

I cannot read

#

it's 9am

onyx socket
#

wait let me send ss

dry imp
earnest phoenix
#

Sleep smh

onyx socket
woeful pike
#

you need to also specify that intent in your client iirc

onyx socket
dry imp
#

i thought there is a diff one

#

for alpha ver

earnest phoenix
rocky hearth
dry imp
earnest phoenix
#

Oh nevermind it actually does in Pycord

earnest phoenix
earnest phoenix
#

It's about css modules

onyx socket
earnest phoenix
#

wait xetera's here

#

@woeful pike hello weeb i heard you use nextjs so i had a question

i can't use element selectors in *.module.scss files because it's not a "pure" selector
and i don't wanna plunge in to styles.classname hell so what should I do

#

I can't use a style tag because my code is sass

onyx socket
#

also its beta ig

earnest phoenix
#

then i can't import it at all

woeful pike
#

what are you planning on importing with a full element style

#

you want a style that applies globally

earnest phoenix
#

imagine putting css for ONE page in a global file

#

header { height: 100vh; }
ul { list-style: none; }

dry imp
woeful pike
#

idk css modules is ass I don't really use it

dry imp
#

since it is still v9 ig

earnest phoenix
#

i guess i could put it in a style

dry imp
#

my bot works fine on beta4 dont need to specify message intent

earnest phoenix
#

or, get this, <link rel="stylesheet">

earnest phoenix
# onyx socket

I advice switching back to discord.py instead of pycord since it's development will continue

dry imp
woeful pike
#

python discord developers having a seizure trying to figure out what library to use

earnest phoenix
earnest phoenix
woeful pike
#

discord is the only api I know thats so complicated you can't interface with it sanely without a library

onyx socket
#

its shitty that he wrote a gist for why he doesn't wan't to continue and now this

woeful pike
#

just don't go back

earnest phoenix
earnest phoenix
onyx socket
earnest phoenix
#

And not only that, but he is the sole maintainer of the whole library

onyx socket
#

but continuing again is weird

dry imp
#

yea, especially after a long time

earnest phoenix
#

What do you expect when the whole Python land for Discords bots are falling apart and just crumbling

dry imp
#

i almost move to js

#

thank god i did not

#

so i can experience this drama

earnest phoenix
#

imagine not using rust

slender thistle
#

Maybe the man just wanted a break

earnest phoenix
#

Perhaps

rocky hearth
#

in ts I hv a type like
type A2Z = A | B | C | D | ... | Z
and I want to make a new type from A2Z
type NotA = B | C | D | ... | Z.
i want to remove a certain ORed type from base type

#

Can someone make a Utility Type for that? Or is it even possible?

earnest phoenix
#
type A2Z = A | B | C | D | ... | Z;

type A2ZWithoutA = Exclude<A2Z, A>;
#

You can also exclude more types by wrapping them in union types

#

As Exclude<TYPE, Type1 | Type2 | Type3 | Type4 | Type5 | ...>

rocky hearth
#

i'm getting never idk y

#

lemme see

willow mirage
#
@Schema()
class Colums {
    @Prop({required: true, unique: true})
    _id: string;

    @Prop({required: true, default: Tables._id }) // <--------------- How is the correct syntax?
    parentId: string;
}

@Schema()
class Tables {
    @Prop({required: true, unique: true})
    _id: string;

    @Prop({required: true})
    title: string;

    @Prop({required: true, default: 0})
    type: number;

    @Prop([Colums])
    colums: Colums[];

    @Prop({required: true, default: { $inc: { seq: 1 } } })
    position: number;

    @Prop({required: true, default: Date.now})
    createdAt: Date;
}

I have something like this, how I can access the Tables's _id for the parentId in Colums

split hazel
#

Bro they said typescript was simple

#

wtf is that

sudden geyser
#

Although I don't know Prisma, wouldn't it be smarter to leave out the parent? Assuming you can perform backwards queries, you should be able to look at the column and query for tables where it's part of the colums (although this method can return multiple results)

willow mirage
sudden geyser
#

also small nitpick, but shouldn't colums be columns

willow mirage
sudden geyser
#

all good

split hazel
#

everyone who says they have bad english have very good english

sudden geyser
#

says the dollar tree harvard undergrad

split hazel
#

😡

#

i graduated subway university with honours

#

thats actually a thing if you're wondering

sudden geyser
#

didn't go to hamburger university, weak laingroove

willow mirage
#

does Bcrypt is good

#

or any other lib

#

for Hashing your password?

split hazel
sudden geyser
#

I hear that Argon2id is good as well

split hazel
#

does discord have upload components yet

lament rock
#

It does support attachment types for args yes

atomic kindle
#

If I'm building a custom protocol atop TCP, what encoding method would you suggest I use to transmit data?

#

I've been leaning towards XML but please let me know if there are some downsides I might not be aware of and if there are better alternatives.

lament rock
#

JSON is cool since its widely adopted

#

alternatively, you can make your own arbitrary format

mellow gulch
#

I leave become developer. Need a json.

atomic kindle
#

You're absolutely right about JSON being widely adopted and ngl I was about to use it too but XML is just fancy and old school. Also, making my own format would be very cool but then I'll have to write a encoder/decoder for every language which is just too much work

#

(every language i interdepend on)

lament rock
#

I don't think that just because something is fancy and old school, doesn't mean it should be used. For instance, JSON can save so much data being sent vs XML because XML has a lot of overhead

mellow gulch
#

That is so hard to become a developer.

#

That easy to edit files at computer but always overnight.

boreal iron
#

What in the name of…

atomic kindle
lament rock
uneven scaffold
#

can you help me

lament rock
#

probably didn't pass in a valid ttf or otf file

uneven scaffold
#

how can i fix that

lament rock
#

Send it a ttf or otf file

uneven scaffold
#

how

atomic kindle
lament rock
#

you should probably read the docs for canvas

uneven scaffold
#

i can't understant thats canvas's docs

#

code;

lament rock
#

Idk how to help

boreal iron
uneven scaffold
#

good days

#

thank you bro for help

grim flame
earnest phoenix
# uneven scaffold

As a JavaScript developer I understand your need for an entire npm package in order to make a rock paper scissors command

earnest phoenix
#

the rank one is kinda understandable tho

#

I prefer screenshotting an svg rather than using canvas mmLol

lament rock
#

this pic goes so hard. Feel free to screenshot

lament rock
#

thanks

boreal iron
#

Promising peace of art

earnest phoenix
#

Is it possible to animate background-image gradients

lament rock
#

now selling for 1mil in btc hippo

boreal iron
earnest phoenix
#

Self proclaimed free thinkers when they realize there are other cryptocurrencies than bitcoin

earnest phoenix
cinder patio
boreal iron
#

Damn I was about to answer

earnest phoenix
#

imagine not manipulating gradients by hand like caveman

lament rock
#

imagine doing everything raw

boreal iron
#

Hey hey! That’s what older people do

#

We don’t trust this new modern technologies zoomeyes

#

They are all evil!!1!

lament rock
#

I mean. Some are actual malware

earnest phoenix
#

such as python3

lament rock
#

real

neat ingot
#

I got carried away with gradients for that site 😄

earnest phoenix
#

I hope you disable the animation for prefers-reduced-motion

neat ingot
#

no... the site is only used by game devs lol

earnest phoenix
#

yes but still remove the animation for @media (prefers-reduced-motion: reduce)

neat ingot
#

nah... that'd require me to edit the site code 😄

plucky imp
#

imagine using snakes

lyric mountain
plucky imp
#

i can read lua and coffee script but i can't read python

earnest phoenix
#

JavaScript is extremely readable, C makes me go death but python is kind of in between, which is what makes it terrible

plucky imp
#

lmao

#

best of the worst

#

imagine trying to recode googles search engine and it's all null

split hazel
#

its just the fact you have to write ugly code to do what you want to do:(

plucky imp
#

pog cmds CatOk

#

i made my own cmd handler so i'm glad something works lol but

#

when i pull for a command the args don't come with it

#

so brB

rocky hearth
plucky imp
rocky hearth
#

does the channels in a all category starts from position 1?

plucky imp
#

yes

rocky hearth
#

or are they hv position value in sequence from top to bottom?

plucky imp
#

if your pulling channels from a category it starts from the first to last

#

if you want to get a specific channel you can give args for the exact channel name or set an interval so after x channels log x

plucky imp
#

@ivory siren i hab a question

ivory siren
#

Yes

plucky imp
#

so you've seen alot of bottums and stuff and i wanna know if this function looks pog or generic

ivory siren
#

What's that

#

Music search?

plucky imp
#

my music cmd

ivory siren
#

Okay

#

It's good

plucky imp
#

whenever you play a song it brings up a yt queue and whatever number you send it'll play that number

ivory siren
#

Ye gotcha

plucky imp
#

i wanted to do spotify but yk no api

ivory siren
#

Ye

wooden ember
#

is there a limit on howmany msgs you can fetch from a channel?

sudden geyser
#

100 at a time

wooden ember
#

ah cool

#

thought so

#

how would i fetch more than 100 msg though

plucky imp
#

uh

sudden geyser
#

make another request

plucky imp
#

make a interval i assume or have it cache channels

wooden ember
#

cuz if i do fetch twice it will just give me the same mgs over again though

sudden geyser
#

and set the message ID

plucky imp
#

so after x messages return and fetch again

wooden ember
#

mmm

plucky imp
#

if the id's are stored properly you can jus check if you have the message id already

#

like are you py or js?

wooden ember
#

true but i dont want to fetch the same msgs orver and over cuz thats a wast of resources and will probably get me rate limited id asume

#

im using JS

plucky imp
#

okay so like

wooden ember
#

but trying to replicate a command from a py bot

#

so eh

plucky imp
#
async function lots_of_messages_getter(channel, limit = 500) {
    const sum_messages = [];
    let last_id;

    while (true) {
        const options = { limit: 100 };
        if (last_id) {
            options.before = last_id;
        }

        const messages = await message.channel.cache.get(options);
        sum_messages.push(...messages.array());
        last_id = messages.last().id;

        if (messages.size != 100 || sum_messages >= limit) {
            break;
        }
    }

    return sum_messages;
}
#

idk if it's still like that tho

#

it's a basic idea though

wooden ember
#

yeah

#

id probably not want to use a while true though

plucky imp
#

true lol

split hazel
#

if it gets the job done it doesn't matter too much

plucky imp
#

also true

wooden ember
#

yeah but i dont want to spam discord with requests

plucky imp
#

you can use a if(!) statement there i'd assume

wooden ember
#

yeah

#

cuz this is how my mate did it with his bot

    async def index_servers(self):
        status = self.loop.create_task(
            self.wait("Indexing Servers")
        )
        index = {}
        for category_id in self.config["category_ids"]:
            category = self.get_channel(category_id)
            if not category:
                print(f"Couldn't get the category under ID {category_id}")
                continue
            index[category.name.lower()] = {
                channel.name.lower(): {
                    msg.content.split("\n")[0].replace("__**", "").replace("**__", ""): msg.content.split("\n")[1]
                    for msg in list(await channel.history().flatten())
                    if msg.content.count("\n") and msg.content.count("discord.gg")
                }
                for channel in category.text_channels
            }
        self.index = index
        status.cancel()
        print("Successfully Indexed Servers", end="\r")
```but its in python and all my crap is in js
#

also the context of the bot is for a discord server that is an archive of many discord links

earnest phoenix
#

I think the crap should be python not js

wooden ember
#

yeah but tell that to 2020 me where i couldnt get py to work on my laptop so i just started using js and thats how i got into this state

plucky imp
#

true

#

good code tho

#

if i eval my token it returns my token and im scared please halp

earnest phoenix
wooden ember
#

i do wish i persued py more though cuz unlike js its actually usefull for many things (yes i know js has its uses but they aren't anything i can see myself doing)

plucky imp
#

i don't feel like recoding it

plucky imp
#

bruh

#

okay so

wooden ember
#

but even then i would rather c# or somthing over python

plucky imp
#

when i do -eval tokem it returns my token but when i do -eval tokem return; it sends the "i don't have a token" message

#

pog gamer moment

earnest phoenix
sudden geyser
#

imo you should just let it do that

#

you'll have a hard time trying to mask it

earnest phoenix
#

But the bottom line is anything > js >>>>> php >>>>>>>>>>>>>>>>>>> python

sudden geyser
#

you should just accept that eval is dangerous but useful

plucky imp
#

yeah

wooden ember
#

indeed

plucky imp
#

i think it only returns my token cause of my id but i'll check

#

i think all my cmds work besides my spotify and urban ones but there not that important so hopefully when i submit it they won't count it off

earnest phoenix
#

I love how people panic over owner locked commands

plucky imp
#

no it's not owner locked lmao that's why i ws scareD

wooden ember
#

unless its not owner locked

sudden geyser
#

better safe than sorry they said

wooden ember
#

of fuck

sudden geyser
#

it'll be fine they said

plucky imp
#

the exec command is cause the eval is setup so it only checks over the code it doesn't run it

earnest phoenix
plucky imp
#

exec however does both so if i typed in client.destroy() it would restart but in the eval it'll just return the function

plucky imp
earnest phoenix
sudden geyser
#

what about that sandbox built-in module

plucky imp
#

yes i was there when he made it lol

earnest phoenix
#

he

plucky imp
#

i also stole his ping command and jisho command

#

;P

wooden ember
#

how to get free bot hosting:
paste bot code into another bots eval
smug mode activate

plucky imp
#

LMAOOO

#

600 iq play right there

wooden ember
#

stonks

plucky imp
#

i just

#

use a custom webserver and constantly ping it offline so it won't shutdown after like 3 hours

earnest phoenix
#

Has money for nitro but not for a vps

plucky imp
#

hush

wooden ember
#

i just use a dell dimentions that i got for free

plucky imp
#

pogg

wooden ember
#

it lives under a table

plucky imp
#

i used to have a vps

#

but yk i have a spending problem

wooden ember
#

bruh

plucky imp
#

i wasted 500$ just to get 30*% in genshin and no soft pity lol

wooden ember
#

i mean id say that cheep vps' are a scam tbh cuz my crap dell from 2006 costs a fiver a month to run

#

and you get dedicated hardware

plucky imp
#

oouu

wooden ember
#

the only bad thing is you have to do your owen maintinance and thus you get more downtime

#

but eh

plucky imp
#

if you can maintain it on your own it means you've mastered it

#

which is why i code so much >.<

wooden ember
#

fair

plucky imp
#

i haven't coded in months and i'm already on my

#

76th command?

#

in like 2 days

wooden ember
#

damn

plucky imp
#

i have over 9k lines \

wooden ember
#

i dont think i have that on all my bots combined tbh

plucky imp
#

i overcomplicate alot though

wooden ember
#

but then most of them are spesualised and i just add the same commands to all of them just as filler

plucky imp
#

it would be like 3k but i made the cmd handler myself so i went over the top

#

to make it flashy

#

i have like 50 args statements

#

11 of them are in my help cmd

wooden ember
#

i remember i made an error handler that was bigger than the bot it was connected to once

#

had verbose levels and everything

plucky imp
#

relateable

wooden ember
#

but then my hdd died and its gone now

#

sad times

plucky imp
#

progress so far >>

wooden ember
#

nice

#

pretty clean too

plucky imp
#

i gotta add 4 more categorys

wooden ember
#

most of my bots dont even use embeds tbh

plucky imp
#

i wanna add like reaction embeds but i've tried before and i don't feel like recoding my help cmd

wooden ember
#

cuz i like the md codeblocks

plucky imp
#

true

#

i jus like the color and the format it's in

#

omg my shop command is like

#

590 lines

#

i think

wooden ember
#
> headder >
#info and that
[comand][info]
<blue yellow >
``` see
plucky imp
#

ouuuu

#

yeah it's different

wooden ember
#

indeed

plucky imp
#

if your bot blows up it'll def be because of that

wooden ember
#

lol

earnest phoenix
plucky imp
#

ever since last year all the bots have been the name

#

same*

wooden ember
#

yeah

plucky imp
#

the last actually different bot i've seen is crowby

#

w bot btw i'm cool with the owner #notapromo #raidshadowlegends

wooden ember
#

i was inisually inspired by the commands groovy had cuz that didnt use embeds

#

but i never worked out what it used to use that colour thing

#

cuz i just used md

#

there is also ansii or somthing

#

but alot of people use dthat

plucky imp
#

same

sudden geyser
#

using code blocks as a style is pretty creative

plucky imp
#

i still use RANDOM as the color lol

sudden geyser
#

but for users I'd argue they'd prefer the embed

plucky imp
#

^^

#

it's still clean though but embeds have that awe factor

earnest phoenix
sudden geyser
#

plus they're standardized

plucky imp
#

LMAO

plucky imp
wooden ember
#

yeah codeblocks suck on mobile

sudden geyser
#

mobile users can suffer

#

long live desktop

wooden ember
#

i think they fixed it on android

earnest phoenix
plucky imp
#

long live desktop

sudden geyser
#

hey now embeds on mobile aren't that bad

plucky imp
wooden ember
#

true but they do have alot functionality

plucky imp
#

it doesn't like show the colors

earnest phoenix
#

It does

wooden ember
#

bruh it doesnt?

sudden geyser
#

yeah that sucks for mobile users

earnest phoenix
#

They fixed syntax highlighting

sudden geyser
#

no they haven't

#

if I have to use android to see colors that problem isn't solved

earnest phoenix
#

Lmao it used to show for me

#

Lemme try

wooden ember
#

apple users ar invalid lol

earnest phoenix
#
<p>balls</p>
earnest phoenix
wooden ember
#

hehehe

#
Test
Test
Test
Test
Test
Test
Test
Test
plucky imp
#

unless

wooden ember
#

omg

#

it works

#

welp ima be using that from now on

sudden geyser
#

what language did you use

wooden ember
#

go to the search thing on this discord server and type "ansi"

#

and there are people who posted it

boreal iron
#

Long live syntax highlighting on mobile

earnest phoenix
wooden ember
earnest phoenix
wooden ember
#

mmmmm

boreal iron
#

some apple monospace font I guess

plucky imp
#

POHG

#

show me codeee

#

who need help i am hungy for dweeb coders who are in need of savings

boreal iron
#

The screenshots aren't enough?

plucky imp
#

where

#

no

#

never

#
co d E
boreal iron
#

right above your message... very B I G

wooden ember
#

i also said where you can find it too

plucky imp
#

oh with the message counter?

wooden ember
plucky imp
#

or syntax highlight

#

guys wanna see my

#

warning cmd

boreal iron
#

oops wrong one

plucky imp
#

grrrrrrr

boreal iron
#

there we go

plucky imp
#

L ratio

#

@wooden ember wanna seee

wooden ember
#

see what

earnest phoenix
#

i am now back in development

plucky imp
#

my codeee

earnest phoenix
#

hello world

plucky imp
#

it's poG

earnest phoenix
plucky imp
#

omg

#

it's like over 300 characters

#

hold on

plucky imp
#

yes

#
addWarning(guild, user, d, reason, issuer) { // Returns: Number (The users new total warning point value)
        return new Promise((resolve, reject) => {
            try {
                this.db.push(`/guilds/${guild}/users/${user}/warnings[]`, { d, reason, issuer }, true);
                this.db.push(`/guilds/${guild}/last`, user);
                // Return data
                resolve(this.db.getData(`/guilds/${guild}/users/${user}/warnings`).reduce((prev, val) => prev + val.points, 0))
            }
            catch (err) {
                reject(err);
            }
        });
    }
#

poG

earnest phoenix
#

what db is that

plucky imp
#

uhh

boreal iron
plucky imp
#

nodejson

#

i think

earnest phoenix
#

json db panic

plucky imp
#

it's only for warnings smhhh

#

i support evie and use enmap

earnest phoenix
plucky imp
#

yes

#

all of them

earnest phoenix
#

loves

plucky imp
#

KEKW welp back to degen code

earnest phoenix
#

i am not a degenerate topggSob

plucky imp
#

omg bubs sorry

wooden ember
#

its ansi

#

discord aparently suports escape codes

#

but only on desktop

#

which is anoying

wispy yoke
#

oh so its kust ``` and then the text?
i was imagining something like ```py if u get what i mean

wooden ember
#

```ansi
then the escape code and text here

wispy yoke
#

ah thanks

wooden ember
#

just serch "ansi" in the server search thing and you will see where i got it from

earnest phoenix
#

```ansi
It's three `
```

wooden ember
#

yeah ?

earnest phoenix
wooden ember
wheat cradle
#

discord mobile has a tendency of sucking angeryBOYE

wooden ember
#

indeed

#

bruh ansi isnt even what i was inisually thinking about either but was just a side track

#

i ment anciidoc

#
= This =

== Sub Header or somthing ==
command :: result
another :: command
#

looks like that

#

but alot of people use that so eh

atomic kindle
#

Could someone give me some ideas on how to make a large number of chunked concurrent TCP requests w/o multi threading?

atomic kindle
plucky imp
#

like for linux

#

python

#

elaborate plls

atomic kindle
#

Platform is not an issue, I am concerned about system limitations and if there is something I can do to elevate those limitations.

plucky imp
#

oh

#

well each thread can't hold more than 65535 simultaneous connections to a single server

#

i think

atomic kindle
#

I think you're referring to the amount of ports.

plucky imp
#

probabl

#

not very good with anything outside of bot coding unless it's ts or for a website s soz

#

so*

#

i'm sure someone will be of help though rxq_bouncyheart

atomic kindle
#

Oh... I just found out what's affecting the performance.

#

It's my carrier's NATs.

plucky imp
#

glad you did lols

#

poggingggggg

#

just finished these

#

the args were horrendous

tawdry moss
#

He6

#

Hey

#

Fix Dio bot

plucky imp
#

what

tawdry moss
#

Reset it because it error

plucky imp
#

sigh

#

Please don't come into development unless your developing a bot/something related to coding.

#

if there is a bot error take it up with the owner you can find there discord on top.gg website on the bottom right corner of the bots page

#

thank you and enjoy your day rxq_bouncyheart CatOk

tawdry moss
#

Uh

#

Ok

#

Pls fix it

plucky imp
#

did you not read what i said lol

tawdry moss
#

Fuck

#

It not work

lyric mountain
#

User in a nutshell

tawdry moss
#

How fix it???

lyric mountain
#

Have you tried asking in its support server?

#

Inb4: no, I don't have the server invite

tawdry moss
#

Yes

#

I'm try

#

Ask support

plucky imp
#

hi kuhaku

lyric mountain
#

Heyo

plucky imp
#

bruh

#

why won't my status appear?

lyric mountain
#

is that the proper way of doing it?

#

like, idk much about d.js

spark flint
#

promise is pending so try await

plucky imp
#

okey

lament rock
# plucky imp

url only supports twitch links or yt live stream links.
Use name instead

#

url also only shows when using type STREAMING

plucky imp
#

ohh kk

hidden gorge
lament rock
#

what dont you understand

hidden gorge
#

how to declare message.guilds.member as a function

lament rock
#

Pretty sure you're trying to get a member by ID, right?

hidden gorge
#

yes

lament rock
#

message.guild.members.cache.get

hidden gorge
#

even without id it does that

hidden gorge
lament rock
#

replace message.guild.member with that

hidden gorge
#

ok

#

keep (args[0])?

lament rock
#

yes

hidden gorge
#

ok

lament rock
#

get is a function

hidden gorge
#

ok running it

#

testing

#

@lament rock thank you

hidden gorge
#

module.exports.config = {
    name: "serverinfo",
    description: "Shows Information about the server",
    group: 'info',
    usage: '.serverinfo',
    example: '.serverinfo'
,   botperms: ['EMBED_LINKS']
}

module.exports.run = async(client, message, args) => {
    
    const {MessageEmbed} = require('discord.js')

    const owner = message.guild.ownerID
    const cato =        message.guild.channels.cache.filter(ch => ch.type === 'category').size
let embed = new MessageEmbed()
.setColor(client.color)
.setTitle(`${message.guild.name}`)
.addField("**Owner:**", `<@${owner}>` , true)
.addField("Region", message.guild.region, true)
.addField("Text Channels", message.guild.channels.cache.size, true)
.addField("Members", message.guild.memberCount, true)
.addField("**Role list**", message.guild.roles.cache.size, true)//a70f3e9169546b2c67d301aaeef38.gif
.addField("**Catogory size**", cato, true)
.setThumbnail(message.guild.iconURL())
.setFooter(`${message.author.username}`, message.author.displayAvatarURL())
message.channel.send({ embeds: [ embed ] });
}```
#

when i run that code i get that

lament rock
#

change client.on("message" to client.on("messageCreate"

hidden gorge
earnest phoenix
lament rock
#

that's the whole code right there

earnest phoenix
#

Yes, and use the messageCreate event instead of message like PapiOphidian said, as it's deprecated and will be removed soon

hidden gorge
#

ok i can’t find where to put client.on("messageCreate"

lament rock
#

wherever you had your on("message"

hidden gorge
#

ok

hidden gorge
#

the*

lament rock
#

I highly doubt that, but okay

earnest phoenix
#

It seems like you're using an event handler, rename the message event to the messageCreate event

hidden gorge
#

like anything they says message. ?

lament rock
#

That one specifically might not have it, but your entire project has it

hidden gorge
lament rock
#

wherever you handle your message event from your client

#

change it

earnest phoenix
hidden gorge
lament rock
#

very much so

hidden gorge
#

oh god then i’m really tired

hidden gorge
hidden gorge
#

I MIS RESD

#

ima just remove the command

simple stump
#

I'm attempting to play audio via @discordjs/voice, but for some reason the bot doesn't play anything. I have the GUILD_VOICE_STATES intent enabled, and the file is in the correct directory and in the correct format (see screenshot). I mostly copied from the DJS Guide website to learn a bit on how the package works.
Code:
https://sourceb.in/6sv8XBdOij

plucky imp
#

uhhh

#

i have a question

#

wait nvm

#

ghat was weird

#

it was like my client just died , i'd restart it and the ready event would'nt fire and then my bot went offline but nothing was wrong with my code

#

js being very wonky imo

lament rock
#

oh wait

#

My brain is literally fried

hidden gorge
#
const Discord = require('discord.js')

module.exports = {
    config: {
        name: "lockdown",
        category: 'mod',
        group: "moderation",
        description: "lock server",
        aliases: []
    },
    run: async (bot, message, args) => {
        let lockPermErr = new Discord.MessageEmbed()
        .setTitle("**User Permission Error!**")
        .setDescription("**Sorry, you don't have permissions to use this! ❌**")
        
        if(!message.channel.permissionsFor(message.member).has("MANAGE_CHANNELS") ) return message.channel.send(lockPermErr);
        
        if(!args[0]) {
        return message.channel.send("Please specify something.`Either on/off`")
        };

        const channels = message.guild.channels.cache.filter(ch => ch.type !== 'category');
        if (args[0] === 'on') {
            channels.forEach(channel => {
                channel.updateOverwrite(message.guild.roles.everyone, {
                    SEND_MESSAGES: false
                })
            })
            
            let lockEmbed = new Discord.MessageEmbed()
                
                .setThumbnail(`https://media.giphy.com/media/JozO6wdFcC81VPO6RS/giphy.gif`)
                .setDescription(`**\n\nDone! Server Fully Locked! 🔒**`)
                .setColor('#2F3136')
            return message.channel.send({ embeds: [ lockEmbed ] });

        } else if (args[0] === 'off') {
            channels.forEach(channel => {
                channel.updateOverwrite(message.guild.roles.everyone, {
                    SEND_MESSAGES: true
                })
            })
            
            let lockEmbed2 = new Discord.MessageEmbed()
                .setColor('#2F3136')    
                .setThumbnail(`https://media.giphy.com/media/JozO6wdFcC81VPO6RS/giphy.gif`)
                .setDescription(`**\n\nDone! Server Fully Unlocked! 🔓**`)
            return message.channel.send({ embeds: [ lockEmbed2 ] });
        }
    }
}
#

and add

let mm;

if (channel === args[0]) mm = await message.guild.channels.cache.get(args[0]); else mm = await message.mentions.channels.first();
earnest phoenix
simple stump
earnest phoenix
#

You're subscribing the player after calling the <AudioPlayer>.play() method

simple stump
#

ah i see. mb, thank you for the help!

hidden gorge
#

i added let channel = message.mentions.channels.first() to my code and still get this error

simple stump
hidden gorge
#

it’s meant to lockdown the whole server

earnest phoenix
simple stump
hidden gorge
simple stump
simple stump
hidden gorge
#

so i switch it for permissionOverwrites?

simple stump
#

Yep

hidden gorge
#

ok

simple stump
#

I didn't say remove it. As I said before, .updateOverwrite isn't a function.

hidden gorge
#

ok

#

so i added it

spark flint
hidden gorge
#

userid is not defined

simple stump
#

The variable isn't defined then. Define it.

hidden gorge
#

i’m so confused

plucky imp
#

i have been summonded

#

who needs help

earnest phoenix
#

I would suggest learning JavaScript fundamentals first before making a Discord bot in discord.js, TW rblx

hidden gorge
#

i do know it i’m just tired

earnest phoenix
#

Then take a break

plucky imp
plucky imp
#

@earnest phoenix look at pog advancement

earnest phoenix
#

That's pretty epic

plucky imp
#

ues

#

the args are horrendous but i figured it out

earnest phoenix
#

Maybe you should switch to slash-commands sometime, their argument handling is really good and all the functionality it brings

hidden gorge
#

@earnest phoenix i added const user = message.guild.users.cache.get(args[0]);

#

and it worked

#

nvm

earnest phoenix
#

The <Guild>.users property does not exist

hidden gorge
#

undefined reading cache

earnest phoenix
hidden gorge
#

I A

#

am*

earnest phoenix
plucky imp
#

y e s

#

i did it

#

@spark flint

spark flint
#

hi

#

nice

plucky imp
#

ues

#

i had to make my code a lil snazzy doe

spark flint
#

we stan urban dictionary

plucky imp
#

ues

#

we stan

spark flint
#

we stan

simple stump
#

No way urban dictionary has an API

#

thats crazy

#

i gotta add that

solemn latch
#

you would be surprised how many sites have an api

simple stump
#

prob. ive only used like 3 sites w/ apis

plucky imp
#

okay so

#

in my code i have

#

oh nvm my console gave me a error

spark flint
#

whats the best way of doing a search system with mongodb

plucky imp
#

okay so i get this error whenever i run my spotify command

#

but i have presence defined

spark flint
#

i think

#

its because you're getting from user

#

not member

plucky imp
#

ill try it

#

okay so

#
if(command === "spotify") {
    let user = message.mentions.users.first() || message.author;
    if(!user) return message.channel.send('invalid user');
    
      let spotify = message.member.presence.activities.filter(x => x.name == 'Spotify' && x.type == 'LISTENING')[0];
      if (spotify) {

        let trackIMG = `https://i.scdn.co/image/${spotify.assets.largeImage.slice(8)}`;
        let trackURL = `https://open.spotify.com/track/${spotify.syncID}`;
        let trackName = spotify.details;
        let trackAuthor = spotify.state;
        let trackAlbum = spotify.assets.largeText;

        const embed = new Discord.MessageEmbed()
          .setColor("RANDOM")
          .setAuthor(client.user.username, client.user.displayAvatarURL())
          .setThumbnail(trackIMG)
          .addField('Song Name', trackName)
          .addField('Album', trackAlbum)
          .addField('Author', trackAuthor)
          .addField('Listen to Track', `${trackURL}`)
          .setFooter(message.member.displayName, message.author.displayAvatarURL())
          .setTimestamp()

        message.channel.send(embed);
  }
  }
#

full command btw

#

i don't get any errors and it doesn't send anything in the channel

spark flint
#

try await?

plucky imp
#

where lol

spark flint
#

await message.channel.send

#

idk

plucky imp
#

kk

spark flint
#

i'm just thinking of random fixes KEKW

plucky imp
#

nope

#

still nothing

#

@solemn latch halp please sad

solemn latch
#

djs version?

plucky imp
#

12.5.0

#

12.5.1*

solemn latch
simple stump
#

I updated my code a bit and found that the issue is in getting the mp3 file. However, the directory looks fine and the file is in the correct folder. I uninstalled ffmpeg and ffmpeg-static since that was causing some weird issue with the file ending before I even play it.
Code: https://sourceb.in/arcrl6VM10
Logging resource results in ended returning in true along with autoDestroy, destroyed, and closed returning true.

plucky imp
#

uhh i don't think so

simple stump
plucky imp
#

cause it used to work

solemn latch
simple stump
#

message.channel.send({ embeds: [embed] });

simple stump
#

mb

plucky imp
#

your okay lol

simple stump
#

could u try sending a normal msg

#

?

plucky imp
#

I would update to 13 but I'd have to recode my boy

simple stump
#

instead of an embed

plucky imp
#

bot*

plucky imp
#

Uhh sure

simple stump
#

¯_(ツ)_/¯

plucky imp
#

Cause it doesn't even register the user args

simple stump
#

dang

plucky imp
#

i don't get like a error message in my console either

simple stump
#

update to v13 🙏

plucky imp
#

they acting like apple

simple stump
#

frfr

solemn latch
#

I wonder how long until v12 stops working 👀

plucky imp
#

same cs my bot is already almost finished

#

which is why i didn't switch in the first place KEKW

simple stump
#

solution is for discord devs to not update their api at all

simple stump
#

or wait nvm interactioncreate is kinda similar

plucky imp
#

yep

simple stump
#

i didnt want to switch to slash cmds but then i realized that the two events are almost the exact same

#

Repost
I updated my code a bit and found that the issue is in getting the mp3 file. However, the directory looks fine and the file is in the correct folder. I uninstalled ffmpeg and ffmpeg-static since that was causing some weird issue with the file ending before I even play it.
Code: https://sourceb.in/arcrl6VM10
Logging resource results in ended returning in true along with autoDestroy, destroyed, and closed returning true.

Changing resource to let resource = DiscordVoice.createAudioResource(createReadStream(join(__dirname, 'file.mp3')));, however, results in ended being false, but nothing is played.

plucky imp
#

H u h

simple stump
#

idk tbh lol ¯_(ツ)_/¯

plucky imp
#

Lmao

#

Ima try the message thing

simple stump
#

aight gl

plucky imp
#

Yeah i think it's not registering the cmd

#

Still no message in channel or console

simple stump
#

rip

plucky imp
#

Yep jus gonna void it all together

#

Not really important anyways mainly for style points

dusky notch
#

as you can see, the tester tried to use my bot but didn't respond, and asked someone in my server to use it but was able to, any idea why?

slender thistle
#

In d.js, does client.application become available in the ready event automatically?

earnest phoenix
slender thistle
#

What the fuck then

slender thistle
#

Oh, it's UNDEFINED?

plucky imp
#

Why does it still not send a message though or give console error

#

If it was a intent error it'd be like can't access or missing permission right?

solemn latch
earnest phoenix
# slender thistle Oh, it's UNDEFINED?

The client application is known to be undefined in certain cases, either when it can't establish a gateway connection properly due to network limitations, or something similar, you can listen to the debug and warn event listeners and see what those tell you in the console

solemn latch
# dusky notch nop

Have you tried making a second server, giving your bot no other perms than basic everyone permissions and seeing if it responds?

dusky notch
#

i did that even before applying xd

earnest phoenix
slender thistle
#

Pain in the ass. Can fetching the application directly from Discord API via client.api.applications() be an alternative solution?

plucky imp
#

volt

#

i

#

can

#

kiss you

solemn latch
plucky imp
#

ty bubs rxq_bouncyheart Catpeek

earnest phoenix
earnest phoenix
slender thistle
#

Do I blame Discord or d.js in those edge cases?

plucky imp
#

i thought i already enabled my intents but i guess i didn't save my changed

slender thistle
#

Coding js on repl.it on phone isn't fun

earnest phoenix
#

Both are kinda blamable in this case, best to listen to the debug and warn event listeners to find out

#

I haven't seen much people encountering this issue

slender thistle
#

Oh I'm just special dw

#

Thanks man, you're a savior

simple stump
earnest phoenix
simple stump
#

Thank you! That's really helpful.

plucky imp
#

How do you get your genius api key

#

after this cmd my bottums should be finished colorpawri

#

nvm i got it

#

okay so

#

@earnest phoenix

#

i get this error whenever i run my lyric command

#

but the song i search has lyrics on the genius website

earnest phoenix
#

Show code

plucky imp
#
if (command === "lyrics") {
    let songs = args.join(" ")
    if (!songs) return message.channel.send('No song lyrics to search');
    const searches = await Client.songs.search(songs);
    
    let firstSong = searches[0]
    
    const lyrics = await firstSong.lyrics();
    
    if (!lyrics) return message.channel.send('No lyrics found');
    
    let embed = new Discord.MessageEmbed()
      .setColor("RANDOM")
      .setAuthor(client.user.username, client.user.displayAvatarURL())
      .setDescription(`Lyrics of the Song:\n\n ${lyrics}`)


    message.channel.send(embed);
  }
#

im using the genius api btw

earnest phoenix
#

🤔

plucky imp
#

u h

#

must've been a typo

#

....

#

oh wait

#

i forgot this part

slender thistle
#

No

#

Is Client the client for Genuis?

plucky imp
#
const Genius = require("genius-lyrics");
const Client = new Genius.Client(config.api);
#

ues

#

it is lol

earnest phoenix
plucky imp
#

okey

slender thistle
#

Give Sabaton songs a try!

plucky imp
#

nope

#

all said no results