#Kiter8758 still no success but thank you

1 messages · Page 1 of 1 (latest)

past barn
#

t

#

can i help more?

kindred plaza
#

idk

past barn
#

i dont mind

kindred plaza
#

yeah why not

past barn
#

ill need a reminder what your issue was tho

timid sparrow
#

whats the problem

past barn
#

im a complete scatterbrain xd

timid sparrow
#

if i can help too

past barn
#

too many ppl asking things

timid sparrow
past barn
#

and all new names

timid sparrow
#

same

past barn
#

shouldnt ask a small amount of money to make a bot, ask a lot

#

off topic

kindred plaza
#

so this is my Client class

class ExtendedClient extends Client {
  public commands: Collection<string, Command> = new Collection();
  public events: Collection<string, Event> = new Collection();
  public prisma: PrismaClient = new PrismaClient();
  public distube: DisTube | undefined;
  public config: Config = ConfigJson;
  public constructor() {
    super({
      intents: 32767,
    });
  }
  private async registerCommands({ commands }: RegisterCommandOptions) {
    await this.application?.commands.set(commands);
  }

and I want do do

this.prisma.guildConfigs.findUnique({
  where: {
    guildId: //INSERT GUILD ID
  },
  select: {
    musicIsEnabled: true,
  }
})
past barn
#

ts or js?

kindred plaza
#

ts

past barn
#

this is ts right

#

ye okay

kindred plaza
#

ye

past barn
#

hmm

#

wrong case fuck me dead

kindred plaza
#

no worries 😄

past barn
#

hmmm

#

thinking hard here

#

cant you pass something into the constructor

kindred plaza
#

yeah

timid sparrow
#

sorry idk typescript and dont understand anything int here lmao

past barn
#

ts is js but with types

timid sparrow
#

yeah

#

i know

#

but

#

idk what prisma client is

#

or

past barn
#

surprisingly easy to go from ts to js, the other way around is pita

timid sparrow
#

and idk classes that well either so

past barn
#

xd

#

all good

#

classes arent easy

kindred plaza
#

yeah 😭

past barn
#

But you have a constructor

kindred plaza
past barn
#

so you can use that to pass a parameter

kindred plaza
past barn
#

idk why you made a class for this tho

#

but thats completely up to you xd

kindred plaza
#

I needed it to define other stuff too
sooo this is the whole class

past barn
#

you put yourself through a lot of pain

#

in this.registercommands

#

you call it somewhere

kindred plaza
past barn
#

you pass the commands as a parameter

kindred plaza
past barn
#

hmm

#

this is complex

kindred plaza
#

yeah I know that's why I feel bad for putting you through this pain, sorry

past barn
#

dw dw

#

its cool to see

#

its just

#

classes make things hard

#

api calls arent the worst to spread across files

#

events neither

#

but classes

#

im never able to work with them fully

kindred plaza
#

yeah but it's needed for the project to scale

kindred plaza
past barn
#

coming from a background in starting with c# lol

past barn
#

i wouldnt do it like that, but i only create custom bots for singular clients so that doesnt help either xd

kindred plaza
#

yeah, my team's bot runs on 3 docker containers, 1 database (cockroachdb) 2 Bot 3 API and soon web interface

past barn
#

dayum nice

kindred plaza
past barn
#

Yea I'm afraid that's gonna be a tough cookie to crack

kindred plaza
#

nestjs routing much harder than expressjs

past barn
#

Express is great

kindred plaza
#

I need nestjs cuz the web interface requires it

past barn
#

I have been using it for my streams actually, obs takes an html page and I can call the info from the express server through the html

kindred plaza
past barn
#

Ooferz

kindred plaza
#

still REALLY appreciate the help

#

cuz I don't get help even close to this

#

due to my project being weird

#

thank you too @timid sparrow just for wanting to help, really appreciated

timid sparrow
#

:) ty

kindred plaza
#

you can leave the thread if you want

#

@timid sparrow

timid sparrow
#

alright