#Kiter8758 still no success but thank you
1 messages · Page 1 of 1 (latest)
idk
i dont mind
yeah why not
ill need a reminder what your issue was tho
whats the problem
im a complete scatterbrain xd
if i can help too
too many ppl asking things
lmao ik what u mean
and all new names
same
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,
}
})
ts or js?
ts
ye
no worries 😄
yeah
sorry idk typescript and dont understand anything int here lmao
ts is js but with types
surprisingly easy to go from ts to js, the other way around is pita
and idk classes that well either so
yeah ðŸ˜
But you have a constructor
yeah
so you can use that to pass a parameter
ooh
you put yourself through a lot of pain
in this.registercommands
you call it somewhere
I need the class to use the database for my api globally
you pass the commands as a parameter
I tried but I need to use get() so this ain't gonna work
yeah I know that's why I feel bad for putting you through this pain, sorry
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
yeah but it's needed for the project to scale
me neither
coming from a background in starting with c# lol
hmm
i wouldnt do it like that, but i only create custom bots for singular clients so that doesnt help either xd
yeah, my team's bot runs on 3 docker containers, 1 database (cockroachdb) 2 Bot 3 API and soon web interface
dayum nice
thanks my friend (the second biggest contributor) couldn't get the guildid either
Yea I'm afraid that's gonna be a tough cookie to crack
yeah Imma get it maybe using the api by getting the value of a event like "ready" and then send it to the client
nestjs routing much harder than expressjs
Express is great
I need nestjs cuz the web interface requires it
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
yeah I use express too but nestjs is a hard dependency
Ooferz
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
:) ty
alright