Haven
Haven
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Fix is this. I'm silly.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Was recommended, not sure why, but plenty of people seemed to have it working so I assumed it had to be something else, but yes, that clearly wasn't what was needed.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
I'm annoyed that it was that damn simple. Irritating but sometimes I remind myself how much of an amateur I am.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
I thought that src/index.ts would define entry point
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Yeah, I just found that out.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Is there a way to get typescript to preserve file structure?
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
tsup-node src/index.ts; node dist/index.js
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
That does not seem to be the problem either.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Though I was missing import helpers as well
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
It is not.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
I did yes, though there is one thing I have not tried changing, could src/**/*.ts be my issue?
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
1. I'll link one such in a moment. 2. I am aware, but typescript should be checking dependencies right? Isn't that how people tend to do this with import() or readsync and such? Maybe I am entirely mistaken. But the example I saw and some others show the commands and events folder within the src directory. 3. Curiously I feel I have the answer and don't for this. When I said static I meant the string with __dirname, "events" which is a mistake, but I'm sure is not the problem, just an artifact of me switching from glob back to this. But yes, thinking more of course it could not know which files in this string I want access to. Bit of a silly thought there. 4. Typescript is around at compile time, and maybe I'm wrong but does it not check template strings with constants in them?
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Hold on one moment. My brain dead self messed up that code, but I believe my mistake is not the issue
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
None of the examples provided show that, and the files are certainly in the file I mean to target, and typescript should be static checking that target string right?
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
Yeah, I might have mispoken, but are they supposed to be in dist???
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
I don't know how typescript compilation is supposed to handle this
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
As you might guess, it is targeting F:\\...\\dist\\events yet not including my events dir in there.
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/18/2024 in #djs-questions
fs.readdir, glob, fast-glob all won't match any files while using Typescript
@Qjuh As requested :)
22 replies
DIAdiscord.js - Imagine an app
Created by Haven on 4/17/2024 in #djs-questions
Extending Client and making Interaction.client use that new Client
For future people: I'm going with the route of passing client to my commands in the handler, so instead of
function mycommand(interaction: CommandInteraction, arg1: string) ...
function mycommand(interaction: CommandInteraction, arg1: string) ...
I can do
function mycommand(client: ExtendedClient, interaction: CommandInteraction, arg1: string) ...
function mycommand(client: ExtendedClient, interaction: CommandInteraction, arg1: string) ...
6 replies